mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-11 08:38:24 +00:00
test(elevenlabs): cover the diarization fallback when soundfile is absent
This commit is contained in:
parent
f22b17a925
commit
25f8d676f4
1 changed files with 8 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import io
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from typing import Final
|
||||
|
||||
|
|
@ -212,6 +213,13 @@ def test_unreadable_audio_falls_back_to_acoustic_diarize():
|
|||
assert _form_data(b"not audio at all", {"diarize": True}) == {"model_id": "scribe_v2", "diarize": "True"}
|
||||
|
||||
|
||||
def test_stereo_audio_without_soundfile_installed_falls_back_to_acoustic_diarize(monkeypatch: pytest.MonkeyPatch):
|
||||
stereo: Final = _wav_bytes(2)
|
||||
monkeypatch.setitem(sys.modules, "soundfile", None)
|
||||
|
||||
assert _form_data(stereo, {"diarize": True}) == {"model_id": "scribe_v2", "diarize": "True"}
|
||||
|
||||
|
||||
def test_diarized_response_builds_speaker_segments():
|
||||
response: Final = _transform(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue