StreamingUnifiedAsrManager (Parakeet Unified, 1120 ms tier) drops the first 3–5 s of a sentence after a pause; batch mode transcribes it

未关闭
#1,194 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
macos, swift

调研方向

Start with StreamingUnifiedAsrManager, UnifiedAsrManager, and UnifiedRnntDecoder, especially the decoder's hState, cState, and lastToken handling across chunk and sentence boundaries. Reproduce with the described VoxPopuli clip and the [70,7,7] streaming configuration, comparing stream offsets 0, 60, and 76 seconds against batch transcription. Done means the first words after a pause are emitted consistently at every stream offset, with a regression test covering the reported gap.

由索引模型根据 Issue 内容生成。

描述

FluidAudio: 0.18.4 (e0c6103)
Model: Parakeet Unified 0.6B, int8 encoder
Hardware: Apple M5, 16 GB, macOS 27.0.1

What happens

In long continuous streams (meetings, speeches), StreamingUnifiedAsrManager sometimes stops emitting tokens for several chunks right after a sentence ends and a short pause (about 0.6 s). It resumes partway into the next sentence, sometimes mid-word (one resumption began with the piece ually). finish() has the same gap, so this isn't consumeTokenTimings() failing to drain. The output is deterministic across runs.

UnifiedAsrManager (batch) on the same audio transcribes the missing words.

Whether a phrase is dropped depends on where the stream started, not only on the 6.7 s window the encoder sees:

Start of stream 80.6 s "Mr President, I would like to use the opportunity…"
0 s dropped entirely
60 s "I would like to use the opportunity" ("Mr President" dropped)
76 s "like to use the opportunity"
batch (UnifiedAsrManager) full sentence

Starting at 0 s and starting at 60 s put identical audio in the encoder window at 80 s, because both have more than 6.7 s of history. The streaming state that differs between them is the RNNT decoder state (hState/cState/lastToken in UnifiedRnntDecoder). We suspect the decoder state carried across the sentence boundary suppresses the next sentence's first emissions. We haven't confirmed this.

Reproduction

Audio: VoxPopuli (en) 2018-09-11 plenary segment, 250 s, 16 kHz mono (the clip with "…the Greek people. Mr President, I would like to use the opportunity to say that I withdraw…" at 80–86 s). We can share the exact file if useful.

let manager = StreamingUnifiedAsrManager(config: UnifiedConfig(leftFrames: 70, chunkFrames: 7, rightFrames: 7))
try await manager.loadModels()
// feed 0.56 s (8960 samples) at a time:
for chunk in chunks {
    try await manager.appendAudio(buffer(chunk))
    try await manager.processBufferedAudio()
    print(fed, await manager.consumeTokenTimings().map(\.token).joined())
}
print(try await manager.finish())

Raw tokens per step:

  • fed = 80.64 s: "reek people"
  • 80.64 → 85.68 s: 9 steps with no tokens
  • 85.68 s: " to say"

Batch, fluidaudiocli transcribe vox.wav --model-version unified, outputs "…the Greek people. Mr President, I would like to use the opportunity to say that I withdraw…".

Other configurations:

  • [70,13,13], fed 1.04 s at a time: writes "I would like to use the opportunity" but still drops "Mr President". The sentence at 138.6 s, which the 1120 ms tier also drops, comes out in full.
  • Feeding the [70,7,7] stream 1 s at a time instead of 0.56 s gives the same result as 0.56 s.

Scale

Across 18 English benchmark recordings, Nemotron streaming (also through FluidAudio) is better on close-talk AMI, Earnings-22 and one VoxPopuli clip, mostly because of these dropped runs. In one 25-minute AMI close-talk meeting we counted 22 gaps of 3 or more chunks where Nemotron wrote 4 or more words, 169 words in total. Most follow a speaker change or overlap, but single-speaker speeches show the same thing.

One open question: batch and streaming use different encoder files (full-context vs the 70_7_7 export). So we can't fully rule out the streaming encoder export rather than the decoder-state carry-over. A NeMo streaming reference run on the same clip would settle it.


Generated by Claude Code

主要语言
Swift
星标
3k
派生
451
平均合并
1 天 19 小时
30 天内合并 PR
87

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FluidInference/FluidAudio 的其他 Issue

查看 FluidInference/FluidAudio 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。