You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
737 B
26 lines
737 B
from pathlib import Path |
|
|
|
import pytest |
|
|
|
from voice_transcriptor.models import AppSettings, MediaInfo |
|
from voice_transcriptor.services.transcription import ( |
|
TranscriptionNotImplementedError, |
|
TranscriptionService, |
|
) |
|
|
|
|
|
def test_transcribe_raises_milestone_exception_with_user_readable_message() -> None: |
|
media = MediaInfo( |
|
path=Path("sample.mp3"), |
|
size_bytes=1, |
|
duration_seconds=1.0, |
|
audio_codec="mp3", |
|
) |
|
settings = AppSettings( |
|
model="gpt-4o-mini-transcribe", |
|
language="en", |
|
output_directory=Path("output"), |
|
) |
|
|
|
with pytest.raises(TranscriptionNotImplementedError, match="(?i)not implemented"): |
|
TranscriptionService().transcribe(media, settings)
|
|
|