feat(channels): voice transcription quality — annotation + optional LLM correction (#1215)#1217
Open
feat(channels): voice transcription quality — annotation + optional LLM correction (#1215)#1217
Conversation
…LM correction (#1215) Add two layers of post-processing for STT output in voice channels: - Layer A (always on): prepend a hint so the downstream LLM treats voice input as speech-recognised text that may contain errors. - Layer B (opt-in via stt.correction.enabled): run a fast LLM pass to fix obvious transcription mistakes before delivery. Failure is non-fatal — the adapter falls back to the raw transcription. Wires SttCorrectionConfig + the kernel driver registry into the Telegram and Web channel adapters. The driver registry is read from KernelHandle at message-handling time to avoid extra plumbing through polling loops. Closes #1215
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.
Summary
Adds two layers of post-processing for STT (voice → text) output in the Telegram and Web channel adapters.
[Voice transcription — may contain errors, interpret by context]so the downstream LLM interprets voice input with appropriate error tolerance.stt.correction.enabled: true): runs a fast LLM pass (e.g.glm-4-flash) to fix obvious speech-recognition mistakes before delivery. Correction failure is non-fatal — falls back to the raw transcription.The driver registry is read from
KernelHandle::driver_registry()at message-handling time, avoiding extra plumbing through the polling loops.Configuration
Type of change
enhancementComponent
backendCloses
Closes #1215
Test plan
cargo check --all --all-targetspassescargo test -p rara-channels -p rara-sttpasses (93 + 6 + 1 + 2 tests)cargo +nightly fmt --all -- --checkpassescargo clippy --workspace --all-targets --all-features --no-deps -- -D warningspassesRUSTDOCFLAGS="-D warnings" cargo +nightly doc --workspace --no-deps --document-private-itemspasses