fix(stt): add batch language routing fallback#5293
Merged
Conversation
Route Char Pro multi-language batch requests through Deepgram language detection fallback when Soniox is unavailable, and allow longer Soniox async polling.
✅ Deploy Preview for old-char canceled.
|
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.
Route Char Pro multi-language batch requests through Deepgram language detection fallback when Soniox is unavailable, and allow longer Soniox async polling.
Note
Medium Risk
Changes batch STT routing behavior by conditionally appending Deepgram as a fallback provider and alters Deepgram query generation for multi-language batches; misclassification could route traffic differently or affect transcription accuracy. Soniox polling timeout increase is low risk but may extend request lifetimes.
Overview
Improves multi-language batch transcription resiliency by appending Deepgram as a last-resort fallback in the batch provider chain when the request has multiple languages, Deepgram isn’t already selected, and the language set supports Deepgram’s language-detection mode.
Updates Deepgram batch URL generation to prefer constrained language detection (multiple
detect_language=<code>params) when the requested languages are all supported for detection, instead of always usingdetect_language=true, with new unit/integration tests covering theen+plcase.Extends Soniox async batch polling to up to 1 hour via configurable constants and improves the timeout error message, with a small test asserting the new limit.
Reviewed by Cursor Bugbot for commit 9a083ae. Bugbot is set up for automated code reviews on this repo. Configure here.