Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Sources/FluidAudio/ModelNames.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,10 @@ public enum ModelNames {
public static let albert = "KokoroAlbert.mlmodelc"
public static let postAlbert = "KokoroPostAlbert.mlmodelc"
public static let alignment = "KokoroAlignment.mlmodelc"
public static let prosody = "KokoroProsody.mlmodelc"
// v2: fp32 compute. The fp16 CPU/ANE path corrupts F0/N at the start of
// the utterance for many T_a >= 400 (quiet/garbled onset). Renamed (not
// overwritten) so cached clients re-download. See issue #947.
public static let prosody = "KokoroProsody_v2.mlmodelc"
// v2: atan2 phase-correction in the noise-source STFT (removes broad-spectrum
// HF noise / "sharpness"). Renamed (not overwritten) so cached clients
// re-download. See mobius laishere-coreml docs/trials-and-errors.md.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public enum KokoroAneStage: String, CaseIterable, Sendable {
case .albert: return "KokoroAlbert.mlmodelc"
case .postAlbert: return "KokoroPostAlbert.mlmodelc"
case .alignment: return "KokoroAlignment.mlmodelc"
case .prosody: return "KokoroProsody.mlmodelc"
case .prosody: return "KokoroProsody_v2.mlmodelc" // v2: fp32 compute (long-utterance onset fix, #947)
case .noise: return "KokoroNoise_v2.mlmodelc" // v2: atan2 phase-correction (HF-noise fix)
case .vocoder: return "KokoroVocoder.mlmodelc"
case .tail: return "KokoroTail_v2.mlmodelc" // v2: COLA-normalized iSTFT (level fix, #852)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ import XCTest

@testable import FluidAudio

/// Stage bundle names must match the download set, including the renamed v2 bundles.
final class KokoroAneStageBundleNameTests: XCTestCase {

func testStageBundlesMatchRequiredDownloadSet() {
let bundles = Set(KokoroAneStage.allCases.map(\.bundleName))
XCTAssertEqual(bundles, ModelNames.KokoroAne.requiredCoreMLModels)
}

func testProsodyUsesFp32ComputeBundle() {
// v1 fp16 Prosody corrupts F0/N at the utterance onset for many T_a >= 400 (#947).
XCTAssertEqual(KokoroAneStage.prosody.bundleName, "KokoroProsody_v2.mlmodelc")
XCTAssertEqual(ModelNames.KokoroAne.prosody, "KokoroProsody_v2.mlmodelc")
}
}

/// Lightweight tests for the pure duration-rounding helper (no models needed).
final class KokoroAnePredictedDurationTests: XCTestCase {

Expand Down
Loading