Skip to content

fix(soniox): surface STT server errors#5864

Merged
tinalenguyen merged 1 commit into
livekit:mainfrom
he-yufeng:fix/soniox-stt-error-frame
May 27, 2026
Merged

fix(soniox): surface STT server errors#5864
tinalenguyen merged 1 commit into
livekit:mainfrom
he-yufeng:fix/soniox-stt-error-frame

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Fixes #5854

Summary

  • turn Soniox STT error_code / error_message frames into APIStatusError
  • preserve the existing final transcript / usage flush before surfacing the error
  • let APIError propagate through the receive loop and _run instead of being swallowed by broad exception handlers
  • add a unit test for an error frame without tokens

Tests

  • python -m pytest tests\test_plugin_soniox_stt.py -q -p no:cacheprovider
  • python -m ruff check livekit-plugins\livekit-plugins-soniox\livekit\plugins\soniox\stt.py tests\test_plugin_soniox_stt.py
  • python -m ruff format --check livekit-plugins\livekit-plugins-soniox\livekit\plugins\soniox\stt.py tests\test_plugin_soniox_stt.py
  • python -m py_compile livekit-plugins\livekit-plugins-soniox\livekit\plugins\soniox\stt.py tests\test_plugin_soniox_stt.py
  • git diff --check

@he-yufeng
Copy link
Copy Markdown
Contributor Author

I checked the failing test-stt job. The Soniox cases from this PR are skipped in that run because SONIOX_API_KEY is empty; the actual failures are in other hosted providers (openai, fireworksai, aws) plus the fork-comment 403 while posting the generated test summary.

The PR-specific local checks from the branch are still the focused Soniox regression tests plus repo lint/type checks. I don't see evidence in the CI log that the Soniox error-frame change caused the current hosted-provider failures.

Copy link
Copy Markdown
Member

@tinalenguyen tinalenguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks you for the PR!

@tinalenguyen tinalenguyen merged commit ef60a1b into livekit:main May 27, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

soniox: SpeechStream silently swallows server-side errors (error_code/error_message), breaking FallbackAdapter recovery

2 participants