Skip to content

fix(asr/tdt): default v3 long-form to the no-mel path (silence-aligned starts) - #869

Merged
Alex-Wengg merged 2 commits into
mainfrom
fix/803-no-mel-default
Aug 19, 2026
Merged

fix(asr/tdt): default v3 long-form to the no-mel path (silence-aligned starts)#869
Alex-Wengg merged 2 commits into
mainfrom
fix/803-no-mel-default

Conversation

@Alex-Wengg

@Alex-Wengg Alex-Wengg commented Aug 19, 2026

Copy link
Copy Markdown
Member

Addresses #803 for the v3 default path. The opt-in mel-context path (--mel-context / explicit melChunkContext: true) and v2/110m — which keep the PR #264 prepend they were validated with — retain the interior-silence limitation; #803 stays open as the tracker for those paths (documented in LongTranscription.md → Known Limitations).

Problem

A sliding window whose fixed-stride boundary interacts with quiet speech near long silence runs decodes degenerately, silently dropping content mid-file (#803's librivox-0000 quiet chapter outro is the acceptance case).

Why not the trim fix the issue sketched

The issue proposed snapping a window's declared end back past a trailing dead-silence run. Implemented and validated — not viable:

  • The failing outro window decodes all-blank (rawNonBlank=0, probed in TdtDecoderV3) even when trimmed and backfilled to a full 15s of real audio ending in speech — trailing silence is not the trigger.
  • Applying the trim to the silence-aligned path regressed the case that path already handled.

The real trigger is fixed-stride window starts landing mid-word on quiet speech (the #594 SOS-collapse family). The v3 no-mel path's silenceAlignedChunkStarts avoids the class — it already recovers the librivox outro on main behind melChunkContext = false.

Change

The mel-context setting becomes tri-state, stored as ASRConfig.melChunkContextOverride: Bool?. nil (new default) resolves per model version at load: false on v3 (no-mel + silence-aligned starts), true elsewhere. Explicit opt-ins in either direction are preserved; CLI gains --mel-context to force the prepend back on.

API compatibility: the init parameter label is unchanged (melChunkContext: — existing constructor call sites compile as-is, Bool promotes to Bool?), and the old melChunkContext: Bool property remains as a deprecated computed view, so consumers that read the flag keep compiling with a deprecation warning steering them to the tri-state.

Validation

check result
librivox-0000 (444s, quiet outro ~428–438s), new default outro present ("…End of four classes that constitute a menace by Grace Duffield Goodwin.")
same file, --mel-context (old default) outro dropped (ends "They would be overwhelmed.")
single-window clips byte-identical to main (layout only differs multi-window)
Earnings-22 4× hour-long A/B (mel vs no-mel, prior run) net-neutral: 16.69% vs 16.86% aggregate WER, per-file within ±1.5%
concatenated FLEURS long-form A/B (prior run) no-mel better or tied on every v3 language: en 6.38→5.47, de 3.98→3.10, es 5.01→3.13, fr 16.61→15.61, it 4.67→2.64, pt 7.66→5.11

Unit test added for the tri-state resolution (testMelChunkContextAutoResolution). Docs updated (LongTranscription.md: Current Paths table + Known Limitations bullet rewritten with the measured mechanism).

🤖 Generated with Claude Code

…d starts)

Fixes #803's quiet-speech drops near long mid-file silence runs.

The issue's proposed fix — trimming a window's declared end back past a
trailing dead-silence run — was implemented and validated as not viable:
the failing window decodes all-blank (rawNonBlank=0) even when trimmed
AND backfilled to a full window of real audio ending in speech, and
applying the trim to the silence-aligned path regressed the case it
already handled. The actual trigger is fixed-stride window *starts*
landing mid-word on quiet speech (the #594 SOS-collapse family), which
the no-mel path's silence-aligned chunk starts avoid.

ASRConfig.melChunkContext becomes a tri-state (Bool?): nil (the new
default) resolves per model version — false on v3, true elsewhere —
so v2/110m keep the PR #264 prepend they were validated with, and
explicit opt-ins in either direction are preserved. The CLI gains
--mel-context to force the prepend back on for v3.

Validation (release binary, M-series):
- musan librivox-0000 (444s, quiet chapter outro at ~428-438s): outro
  PRESENT on the new default; DROPPED with --mel-context (old default).
- Single-window clips byte-identical to main (layout only differs for
  multi-window files).
- Prior A/B (2026-08-01, main binary): mel vs no-mel is net-neutral on
  4x hour-long Earnings-22 (16.69% vs 16.86% aggregate WER, per-file
  within ±1.5%), and no-mel is better or tied on every v3-supported
  language on concatenated FLEURS long-form (en 6.38→5.47, de
  3.98→3.10, es 5.01→3.13, fr 16.61→15.61, it 4.67→2.64, pt 7.66→5.11).
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

PocketTTS Smoke Test ✅

Check Result
Build
Model download
Model load
Synthesis pipeline
Output WAV ✅ (146.3 KB)

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.

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Supertonic3 Smoke Test ✅

Check Result
Build
Model download (incl. VectorEstimatorVariants/ int4 buckets)
Model load
Synthesis pipeline (--ve-variant int4)
Output WAV ✅ (364.7 KB)

Runtime: 0m36s

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.

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Speaker Diarization Benchmark Results

Speaker Diarization Performance

Evaluating "who spoke when" detection accuracy

Metric Value Target Status Description
DER 15.1% <30% Diarization Error Rate (lower is better)
JER 24.9% <25% Jaccard Error Rate
RTFx 19.17x >1.0x Real-Time Factor (higher is faster)

Diarization Pipeline Timing Breakdown

Time spent in each stage of speaker diarization

Stage Time (s) % Description
Model Download 15.233 27.8 Fetching diarization models
Model Compile 6.529 11.9 CoreML compilation
Audio Load 0.084 0.2 Loading audio file
Segmentation 16.417 30.0 Detecting speech regions
Embedding 27.362 50.0 Extracting speaker voices
Clustering 10.945 20.0 Grouping same speakers
Total 54.738 100 Full pipeline

Speaker Diarization Research Comparison

Research baselines typically achieve 18-30% DER on standard datasets

Method DER Notes
FluidAudio 15.1% On-device CoreML
Research baseline 18-30% Standard dataset performance

Note: RTFx shown above is from GitHub Actions runner. On Apple Silicon with ANE:

  • M2 MacBook Air (2022): Runs at 150 RTFx real-time
  • Performance scales with Apple Neural Engine capabilities

🎯 Speaker Diarization Test • AMI Corpus ES2004a • 1049.0s meeting audio • 54.7s diarization time • Test runtime: 3m 7s • 08/19/2026, 12:59 PM EST

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Offline VBx Pipeline Results

Speaker Diarization Performance (VBx Batch Mode)

Optimal clustering with Hungarian algorithm for maximum accuracy

Metric Value Target Status Description
DER 10.4% <20% Diarization Error Rate (lower is better)
RTFx 11.77x >1.0x Real-Time Factor (higher is faster)

Offline VBx Pipeline Timing Breakdown

Time spent in each stage of batch diarization

Stage Time (s) % Description
Model Download 27.520 30.9 Fetching diarization models
Model Compile 11.794 13.2 CoreML compilation
Audio Load 0.120 0.1 Loading audio file
Segmentation 25.147 28.2 VAD + speech detection
Embedding 88.870 99.7 Speaker embedding extraction
Clustering (VBx) 0.128 0.1 Hungarian algorithm + VBx clustering
Total 89.150 100 Full VBx pipeline

Speaker Diarization Research Comparison

Offline VBx achieves competitive accuracy with batch processing

Method DER Mode Description
FluidAudio (Offline) 10.4% VBx Batch On-device CoreML with optimal clustering
FluidAudio (Streaming) 17.7% Chunk-based First-occurrence speaker mapping
Research baseline 18-30% Various Standard dataset performance

Pipeline Details:

  • Mode: Offline VBx with Hungarian algorithm for optimal speaker-to-cluster assignment
  • Segmentation: VAD-based voice activity detection
  • Embeddings: WeSpeaker-compatible speaker embeddings
  • Clustering: PowerSet with VBx refinement
  • Accuracy: Higher than streaming due to optimal post-hoc mapping

🎯 Offline VBx Test • AMI Corpus ES2004a • 1049.0s meeting audio • 114.1s processing • Test runtime: 2m 13s • 08/19/2026, 01:07 PM EST

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

VAD Benchmark Results

Performance Comparison

Dataset Accuracy Precision Recall F1-Score RTFx Files
MUSAN 94.0% 89.3% 100.0% 94.3% 393.0x faster 50
VOiCES 94.0% 89.3% 100.0% 94.3% 427.7x faster 50

Dataset Details

  • MUSAN: Music, Speech, and Noise dataset - standard VAD evaluation
  • VOiCES: Voices Obscured in Complex Environmental Settings - tests robustness in real-world conditions

✅: Average F1-Score above 70%

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Parakeet EOU Benchmark Results ✅

Status: Benchmark passed
Chunk Size: 320ms
Files Tested: 100/100

Performance Metrics

Metric Value Description
WER (Avg) 7.03% Average Word Error Rate
WER (Med) 4.17% Median Word Error Rate
RTFx 9.40x Real-time factor (higher = faster)
Total Audio 470.6s Total audio duration processed
Total Time 50.4s Total processing time

Streaming Metrics

Metric Value Description
Avg Chunk Time 0.050s Average chunk processing time
Max Chunk Time 0.101s Maximum chunk processing time
EOU Detections 0 Total End-of-Utterance detections

Test runtime: 1m36s • 08/19/2026, 01:05 PM EST

RTFx = Real-Time Factor (higher is better) • Processing includes: Model inference, audio preprocessing, state management, and file I/O

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

ASR Benchmark Results ✅

Status: All benchmarks passed

Parakeet v3 (multilingual)

Dataset WER Avg WER Med RTFx Status
test-clean 0.57% 0.00% 3.53x
test-other 1.19% 0.00% 2.36x

Parakeet v2 (English-optimized)

Dataset WER Avg WER Med RTFx Status
test-clean 0.80% 0.00% 4.61x
test-other 1.40% 0.00% 3.07x

Streaming (v3)

Metric Value Description
WER 0.00% Word Error Rate in streaming mode
RTFx 0.41x Streaming real-time factor
Avg Chunk Time 2.228s Average time to process each chunk
Max Chunk Time 3.334s Maximum chunk processing time
First Token 2.696s Latency to first transcription token
Total Chunks 31 Number of chunks processed

Streaming (v2)

Metric Value Description
WER 0.00% Word Error Rate in streaming mode
RTFx 0.50x Streaming real-time factor
Avg Chunk Time 1.800s Average time to process each chunk
Max Chunk Time 2.573s Maximum chunk processing time
First Token 2.003s Latency to first transcription token
Total Chunks 31 Number of chunks processed

Streaming tests use 5 files with 0.5s chunks to simulate real-time audio streaming

25 files per dataset • Test runtime: 14m46s • 08/19/2026, 01:04 PM EST

RTFx = Real-Time Factor (higher is better) • Calculated as: Total audio duration ÷ Total processing time
Processing time includes: Model inference on Apple Neural Engine, audio preprocessing, state resets between files, token-to-text conversion, and file I/O
Example: RTFx of 2.0x means 10 seconds of audio processed in 5 seconds (2x faster than real-time)

Expected RTFx Performance on Physical M1 Hardware:

• M1 Mac: ~28x (clean), ~25x (other)
• CI shows ~0.5-3x due to virtualization limitations

Testing methodology follows HuggingFace Open ASR Leaderboard

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Sortformer High-Latency Benchmark Results

ES2004a Performance (30.4s latency config)

Metric Value Target Status
DER 30.3% <35%
Miss Rate 28.2% - -
False Alarm 0.9% - -
Speaker Error 1.2% - -
RTFx 17.8x >1.0x
Speakers 4/4 - -

Sortformer High-Latency • ES2004a • Runtime: 3m 7s • 2026-08-19T16:53:32.782Z

…ted shim

Review follow-up on #869: the tri-state moved to a new stored property
melChunkContextOverride, and the old public melChunkContext name remains
as a deprecated Bool computed view (explicit setting, or the non-v3
default true, when unset). Existing consumers that read the flag keep
compiling; the init parameter label is unchanged so constructor call
sites were never affected. Internal pass-throughs read the override
directly to preserve nil-ness.
@Alex-Wengg
Alex-Wengg merged commit c92e4ae into main Aug 19, 2026
12 checks passed
@Alex-Wengg
Alex-Wengg deleted the fix/803-no-mel-default branch August 19, 2026 16:53
@github-actions

Copy link
Copy Markdown

✅ Japanese ASR Benchmark Results (CTC)

Status: Passed

Metric Value
CER 9.07%
Samples 50
Avg RTFx 1.9x
Decoder CTC

✅ Benchmark completed successfully. The TDT Japanese hybrid model (CTC preprocessor/encoder + TDT decoder/joint) is working correctly.

View benchmark log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant