A decision hook for TDT v3 batch decoding: favoring a user's terms at decode time
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- swift
調査の方向性
Read the TDT v3 batch decode loops and the batch v3 decode sites reachable from the [Float] call, then compare their handling of language filters, top-K logits, and blank labels with the fork commit and tests described here. Done means an optional decision-bias hook reaches each listed decode path, preserves behavior when absent, and has tests for token replacement and confidence; coordinate with the work in #1168.
索引モデルが issue の本文から書いたものです。
説明
We use FluidAudio's Parakeet TDT v3 batch path, on CPU, in an on-device dictation app, with a Ukrainian fine-tune of parakeet-tdt-0.6b-v3. Users want the decoder to get their own terms right: team jargon, tool names, people's names.
Today's options don't reach these words on that path. The CTC-spotter rescoring has no non-ASCII pieces, as discussed in #967. NemotronVocabularyBias serves only the streaming Nemotron models. Fixing the text after recognition can't recover a word the decoder never emitted.
We added a small, language-neutral hook to TDT v3 batch decoding in a fork, and would like to offer it upstream if it's useful:
public protocol TdtDecisionBias: AnyObject {
func adjust(label: Int, topKIds: [Int], topKLogits: [Float], blankId: Int) -> Int
func didEmit(_ token: Int)
}
// transcribe(_ samples: [Float], decoderState:, language:, decisionBias: (@Sendable () -> any TdtDecisionBias)? = nil)
- Where it's called: in both decode loops, after the existing language filter and English blocklist. It's skipped for a blank label (a token there would inherit the blank step's duration), when the top-K is missing, and while the last chunk is flushed. A returned label outside the top-K is ignored.
- What it sees:
didEmitreports every decoded non-blank token, suppressed ones included, so a bias can follow the decoder state. - Where the factory goes: it travels with
languageto every batch v3 decode site reachable from the[Float]call: the single window, each parallel window, seam-gap repair probes, empty-decode recovery retries, and dual-decode arbitration. Each decoder call makes its own instance. - Confidence of a replaced token:
exp(z_i − z_max) · p_argmax, taken from the raw token probability rather than the filtered top-K softmax. - With no factory: nothing changes. Outputs and confidences were byte-identical to v0.18.3 on 130 inputs, including long ones up to 71 s.
The matcher itself, which knows the terms, lives in our app and stays out of FluidAudio. It's a case-sensitive adaptation of NemotronVocabularyBias's piece-text matching, with a small start bonus, given only to a word-start piece of two letters or more as upstream does, and a larger continuation bonus. A candidate without a bonus never replaces the label.
Measurements. Read speech from one speaker, two sets: a pilot that picked the setting and a held-out set that confirmed it. Each set has term, lookalike, neutral and silence clips. Recall counts term forms; changed clips are compared with no bias.
| set | term recall, case-insensitive | exact | lookalike clips changed | neutral clips changed | words on silence |
|---|---|---|---|---|---|
| pilot | 30 → 37 / 56 | 26 → 33 | 0 / 15 | 0 / 42 | 0 |
| held-out | 31 → 40 / 55 | 24 → 35 | 0 / 20 | 0 / 40 | 0 |
The results are identical with the language set to Ukrainian, so the alphabet filter still holds wherever no term applies, and with 300 extra generated terms in the list.
Fork: https://github.com/vladislawfox/FluidAudio/tree/chrrp-1, one commit on v0.18.3: https://github.com/vladislawfox/FluidAudio/commit/346ac139a0c3744a352a47c3d4f94a6aa323f461. It includes static-step tests in the style of EnglishBlocklistTests, and the full suite passes offline.
We know #1168 touches the same top-K code; we'd rebase onto it. If you're interested, we'll open a PR. If not, no worries: the fork works for us.
- 主要言語
- Swift
- スター
- 3k
- フォーク
- 451
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 87
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FluidInference/FluidAudio のほかの issue
-
Kokoro ANE legacy: Alignment still runs the graph that traps at 48 tokens (#1172 fixed v3 only)オープンbug text-to-speech
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
FluidInference/FluidAudio#1201 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
FluidInference/FluidAudio#1200 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
FluidInference/FluidAudio#1194 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
FluidInference/FluidAudio#1193 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
FluidInference/FluidAudio#1191 ·
メンテナーはふだん 1 日以内に返信
FluidInference/FluidAudio の issue をすべて見る
似ている issue
-
area: build-and-ci S3: minor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
manaflow-ai/cmux#65734 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OneBusAway/onebusaway-ios#2025 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
erkamyaman/rust-anything#930 ·
メンテナーはふだん 1 日以内に返信
-
contributor: external iOS needs review sdk-58 severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
SwiftOldDriver/iOS-Weekly#5528 ·
メンテナーはふだん 1 日以内に返信