Repository navigation
Conversation
Some ASR models emit a marker such as <|nospeech|> for silence or non-speech, and that marker was spliced into the LLM prompt as if the user had said it. Add asr_no_speech_markers to GraniteSwitchConfig, set at compose time with a repeatable --asr-no-speech-marker flag. The markers are model-specific, so there is no default and nothing is removed unless configured. Every occurrence of each marker is removed from each transcribed window before long-audio windows are merged, so a marker next to speech, repeated, or inside one chunk is caught as well. Only the configured exact strings are removed; other tags such as timings, emotions or language tags are kept. The markers are part of the transcriber cache key and are documented in docs/AUDIO.md. Signed-off-by: aviv ron <rona@il.ibm.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
aviv1ron1
marked this pull request as ready for review
November 10, 2026 13:52
aviv1ron1
requested review from
antonpibm,
freunda and
yairallouche
as code owners
November 10, 2026 13:52
Collaborator
Author
|
/gpu-test-audio |
✅ GPU tests passed —
|
✅ GPU tests passed —
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #165
Problem
Some ASR models emit a marker such as
<|nospeech|>for silence or non-speech. That marker was spliced into the LLM prompt as if the user had said it.Change
asr_no_speech_markers: list[str] | None, set at compose time with a repeatable--asr-no-speech-markerflag. The marker depends on the ASR model, so there is no default: nothing is removed unless configured. Empty markers and a bare string (instead of a list) are rejected.self_chunks=Truepath.docs/AUDIO.md(compose flag andconfig.jsonform).Supersedes #169, which only dropped a transcript that was exactly
<|nospeech|>and hardcoded that string.Usage
python -m granite_switch.composer.compose_granite_switch \ --adapters ... --enable-audio \ --asr-no-speech-marker "<|nospeech|>"Existing checkpoints: add
"asr_no_speech_markers": ["<|nospeech|>"]toconfig.json.Tests
self_chunks=True, per-window before merge), cache key, config round-trip and validation, CLI flag parsing, processor passthrough.