Format failed-speech diagnostic helper and regression coverage
Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
(cherry picked from commit e81ae8f66f)
This commit is contained in:
1 parent
b9f77fdfbd
commit
39b69624c4
2 files changed
+4
-4
No files matched your search
@@ -1001,7 +1001,9 @@ def _assert_transcript_matches(
|
||||
)
|
||||
|
||||
|
||||
def _retain_failed_speech_audio(audio_bytes: bytes | None, transcript: str, expected_text: Any, error: AssertionError) -> None:
|
||||
def _retain_failed_speech_audio(
|
||||
audio_bytes: bytes | None, transcript: str, expected_text: Any, error: AssertionError
|
||||
) -> None:
|
||||
"""Retain the exact ASR input when a CI speech-content assertion fails."""
|
||||
directory = os.environ.get("VLLM_OMNI_FAILED_SPEECH_AUDIO_DIR")
|
||||
if not directory or not audio_bytes:
|
||||
|
||||
@@ -295,9 +295,7 @@ def test_failed_speech_capture_retains_exact_asr_input_and_original_failure(
|
||||
|
||||
@pytest.mark.parametrize("capture_enabled", [False, True])
|
||||
@pytest.mark.parametrize("content_failure", [False, True])
|
||||
def test_speech_capture_is_opt_in_and_does_not_write_successes(
|
||||
monkeypatch, tmp_path, capture_enabled, content_failure
|
||||
):
|
||||
def test_speech_capture_is_opt_in_and_does_not_write_successes(monkeypatch, tmp_path, capture_enabled, content_failure):
|
||||
directory = tmp_path / "failed_audio"
|
||||
if capture_enabled:
|
||||
monkeypatch.setenv("VLLM_OMNI_FAILED_SPEECH_AUDIO_DIR", str(directory))
|
||||
|
||||
Reference in new issue
Block a user