fix(tts/kokoro-ane): restore long-text chunking in synthesizeDetailed(text:) (#940) - #965
Conversation
…(text:) (#940) #790 rewrote synthesizeDetailed(text:) for NeMo normalization and dropped the #717 PhonemeChunker call, so text past 510 phonemes threw phonemeSequenceTooLong again (#712 regression). - Chunk the resolved phonemes again (after normalization / G2P) and join the per-chunk results. synthesizeFromPhonemes stays strict. - Count the cap in Unicode scalars (new PhonemeChunker countsUnicodeScalars mode): the vocab encoder counts scalars, so French nasal vowels (U+0303) would overflow a Character-counted chunk. StyleTTS2 / Inflect keep Character counting. - KokoroAneSynthesisResult.concatenating joins samples, inputIds and predictedDurations (fields added after #717; one BOS/EOS per chunk, so ids and durations stay index-aligned), sums counts and timings. normalizedText / phonemes report the full input. E2E: 916-char English paragraph (am_michael): phonemeSequenceTooLong(936) -> 58.7 s, ASR WER 0. 766-char French paragraph: phonemeSequenceTooLong(681) -> 35.2 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PocketTTS Smoke Test ✅
Runtime: 0m22s Note: PocketTTS uses CoreML MLState (macOS 15) KV cache + Mimi streaming state. CI VM lacks physical GPU — audio quality and performance may differ from Apple Silicon. |
Supertonic3 Smoke Test ✅
Runtime: 0m30s Note: CI VMs lack a physical Neural Engine; the ANE-bucketed VectorEstimator falls back to CPU here. This validates download + variant resolution + synthesis, not ANE residency/perf. |
Speaker Diarization Benchmark ResultsSpeaker Diarization PerformanceEvaluating "who spoke when" detection accuracy
Diarization Pipeline Timing BreakdownTime spent in each stage of speaker diarization
Speaker Diarization Research ComparisonResearch baselines typically achieve 18-30% DER on standard datasets
Note: RTFx shown above is from GitHub Actions runner. On Apple Silicon with ANE:
🎯 Speaker Diarization Test • AMI Corpus ES2004a • 1049.0s meeting audio • 59.3s diarization time • Test runtime: 4m 11s • 09/25/2026, 04:25 PM EST |
Parakeet EOU Benchmark Results ✅Status: Benchmark passed Performance Metrics
Streaming Metrics
Test runtime: 1m23s • 09/25/2026, 04:29 PM EST RTFx = Real-Time Factor (higher is better) • Processing includes: Model inference, audio preprocessing, state management, and file I/O |
Sortformer High-Latency Benchmark ResultsES2004a Performance (30.4s latency config)
Sortformer High-Latency • ES2004a • Runtime: 4m 33s • 2026-09-25T20:30:01.896Z |
Offline VBx Pipeline ResultsSpeaker Diarization Performance (VBx Batch Mode)Optimal clustering with Hungarian algorithm for maximum accuracy
Offline VBx Pipeline Timing BreakdownTime spent in each stage of batch diarization
Speaker Diarization Research ComparisonOffline VBx achieves competitive accuracy with batch processing
Pipeline Details:
🎯 Offline VBx Test • AMI Corpus ES2004a • 1049.0s meeting audio • 122.0s processing • Test runtime: 2m 14s • 09/25/2026, 04:30 PM EST |
ASR Benchmark Results ✅Status: All benchmarks passed Parakeet v3 (multilingual)
Parakeet v2 (English-optimized)
Streaming (v3)
Streaming (v2)
Streaming tests use 5 files with 0.5s chunks to simulate real-time audio streaming 25 files per dataset • Test runtime: 8m55s • 09/25/2026, 04:31 PM EST RTFx = Real-Time Factor (higher is better) • Calculated as: Total audio duration ÷ Total processing time Expected RTFx Performance on Physical M1 Hardware:• M1 Mac: ~28x (clean), ~25x (other) Testing methodology follows HuggingFace Open ASR Leaderboard |
VAD Benchmark ResultsPerformance Comparison
Dataset Details
✅: Average F1-Score above 70% |
Fixes #940.
#790 rewrote
synthesizeDetailed(text:)and dropped the #717PhonemeChunkercall. Text past 510 phonemes throwsphonemeSequenceTooLongagain.synthesizeFromPhonemesstays strict.countsUnicodeScalarsmode onPhonemeChunker. The vocab encoder counts scalars, so French nasal vowels (ɑ̃= two scalars) could overflow a Character-counted chunk. StyleTTS2 and Inflect are unchanged.KokoroAneSynthesisResult.concatenatingalso joinsinputIdsandpredictedDurations, which were added after feat(tts): auto-chunk long text in KokoroAne high-level synthesize (#712) #717. Each chunk keeps its own BOS/EOS, so ids and durations stay index-aligned for word timing.normalizedTextandphonemesreport the full input.Verification
am_michael):phonemeSequenceTooLong(936)→ 58.7 s, ASR WER 0%.phonemeSequenceTooLong(681)→ 35.2 s.🤖 Generated with Claude Code