feat(tts/chatterbox-nano): extended ~30 s output capacity + honest budget errors - #925
Conversation
…dget errors (#924) The documented caps (prefillLength 512, flowTokenBucket 500) hide the voice's own footprint: the built-in voice's 376 conditioning rows + 1 BOS leave 135 usable text BPE tokens, and its 250 prompt tokens + 3 silence tokens leave 247 generated speech tokens ~= 9.9 s of audio per call. The output cap binds first in practice. - ChatterboxNanoOutputCapacity (.standard N500/T1000, .extended N1000/T2000 ~= 29.9 s) selected at ChatterboxNanoManager init; the extended pair is a separate ~280 MB download from FluidInference/chatterbox-nano-coreml (exported in mobius PR #93 with N500-class fp16 parity) and roughly doubles flow/vocoder latency per call, so it stays opt-in - decode now fails the moment the generation budget is exhausted instead of decoding to EOS first, and textTooLong/generationTooLong report the usable budget (text tokens vs prefill-minus-conditioning, generated tokens vs bucket-minus-prompt, with seconds) for both Nano and MTL - doc comments + Documentation/TTS/Chatterbox.md state the effective budget table; CLI gains --extended-output - unit tests for budget math, capacity model sets, and repo variant mapping Verified e2e (M5 Pro, release): 95-word text -> 25.6 s WAV on .extended with verbatim Parakeet round-trip; same text on .standard fails fast with generationTooLong(tokens: 248, max: 247); short-text .standard unchanged. T3 models need no re-export (M1536 decode headroom ~1020 tokens).
Parakeet EOU Benchmark Results ✅Status: Benchmark passed Performance Metrics
Streaming Metrics
Test runtime: 0m58s • 09/14/2026, 04:59 PM EST RTFx = Real-Time Factor (higher is better) • Processing includes: Model inference, audio preprocessing, state management, and file I/O |
Supertonic3 Smoke Test ✅
Runtime: 0m21s 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. |
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 • 128.9s processing • Test runtime: 2m 13s • 09/14/2026, 05:08 PM EST |
The Multilingual guard still passed prompt+generated vs the raw bucket while the shared error description now speaks in generated-vs-usable terms. Align it with the Nano path: report generated speech tokens vs bucket minus the voice's prompt tokens. (MTL appends no silence tokens, so no further reserve applies.)
VAD Benchmark ResultsPerformance Comparison
Dataset Details
✅: Average F1-Score above 70% |
Sortformer High-Latency Benchmark ResultsES2004a Performance (30.4s latency config)
Sortformer High-Latency • ES2004a • Runtime: 2m 55s • 2026-09-14T21:15:08.628Z |
PocketTTS Smoke Test ✅
Runtime: 0m6s 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. |
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: 7m50s • 09/14/2026, 05:06 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 |
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 • 53.8s diarization time • Test runtime: 3m 34s • 09/14/2026, 05:14 PM EST |
Closes #924
Problem
As #924 documents (and this PR's investigation confirmed against the shipped safetensors), the raw caps hide the voice's own footprint:
The output cap binds first in practice. The buckets are conversion-time static-shape choices, not model limits — the checkpoint's
wpeis[8196, 768]and the decode model'sM1536KV cache already supports ~1020 generated tokens, so only the S3Gen pair needed a larger export.Changes
ChatterboxNanoOutputCapacity—.standard(N500/T1000, ≈9.9 s) or.extended(N1000/T2000, ≈29.9 s), chosen atChatterboxNanoManager(outputCapacity:). The extended pair is a separate ~280 MB download from FluidInference/chatterbox-nano-coreml (exported in feat(tts/chatterbox-nano): --bucket arg for S3Gen export; N1000/T2000 extended pair mobius#93, fp16 parity in the N500 class) and roughly doubles flow/vocoder latency per call, so it stays opt-in. T3 prefill/decode are shared.textTooLong/generationTooLongnow report the usable budget (text tokens vs prefill-minus-conditioning; generated tokens vs bucket-minus-prompt, with seconds) for both Nano and Multilingual.Documentation/TTS/Chatterbox.md+ doc comments on the constants; CLI--extended-output.Verification (M5 Pro, release build)
--extended-output: 25.6 s WAV, verbatim Parakeet round-trip.standard: fails fast withgenerationTooLong(tokens: 248, max: 247)(previously decoded to EOS before throwing).standard: unchanged (3.0 s, same seed)