Repository navigation
DOC: Correct the audio scoring docstring's failure contract - #3523
Merged
Richard Lundeen (richlundeen) merged 2 commits intoOct 25, 2026
Merged
Richard Lundeen (richlundeen) merged 2 commits into
Richard Lundeen (richlundeen) merged 2 commits into
Conversation
_score_audio_async never raises ValueError: a failed transcription re-raises the converter's own exception, and an empty transcript returns an empty list of scores instead of erroring.
Richard Lundeen (richlundeen)
approved these changes
Oct 25, 2026
Richard Lundeen (richlundeen)
approved these changes
Oct 25, 2026
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.
Description
The docstring of
AudioTranscriptHelper._score_audio_asyncpromisesValueError: If transcription fails or returns empty text, but neither is true:_transcribe_audio_asynclogs and does a bareraise);test_score_piece_empty_transcript— instead of erroring.This corrects the contract: the Raises section now says the transcription step's original exception propagates unchanged, and Returns documents the empty-transcript behavior that was already implemented and tested.
Tests and Documentation
Docs-only change (docstring contract now matches the pinned behavior); no code or tests altered. Verified
tests/unit/score/test_audio_scorer.pystill passes (24 passed) and ruff check/format on the changed file. JupyText not affected — no code samples touched.