mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 14:45:46 +01:00
Test adjustment
This commit is contained in:
parent
8bf7d02cc3
commit
adea64d759
1 changed files with 6 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from typing import List
|
||||
from unittest.mock import Mock
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from pytestqt.qtbot import QtBot
|
||||
|
|
@ -17,6 +18,7 @@ from tests.audio import test_audio_path, test_multibyte_utf8_audio_path
|
|||
from tests.model_loader import get_model_path
|
||||
|
||||
|
||||
# TODO Add test for CPU mode (BUZZ_FORCE_CPU=true)
|
||||
class TestWhisperCppFileTranscriber:
|
||||
@pytest.mark.parametrize(
|
||||
"word_level_timings,expected_segments",
|
||||
|
|
@ -32,7 +34,7 @@ class TestWhisperCppFileTranscriber:
|
|||
self, qtbot: QtBot, word_level_timings: bool, expected_segments: List[Segment]
|
||||
):
|
||||
file_transcription_options = FileTranscriptionOptions(
|
||||
file_paths=[test_audio_path]
|
||||
file_paths=[str(Path(test_audio_path).resolve())]
|
||||
)
|
||||
transcription_options = TranscriptionOptions(
|
||||
language="fr",
|
||||
|
|
@ -47,7 +49,7 @@ class TestWhisperCppFileTranscriber:
|
|||
model_path = get_model_path(transcription_options.model)
|
||||
transcriber = WhisperCppFileTranscriber(
|
||||
task=FileTranscriptionTask(
|
||||
file_path=test_audio_path,
|
||||
file_path=str(Path(test_audio_path).resolve()),
|
||||
transcription_options=transcription_options,
|
||||
file_transcription_options=file_transcription_options,
|
||||
model_path=model_path,
|
||||
|
|
@ -92,7 +94,7 @@ class TestWhisperCppFileTranscriber:
|
|||
self, qtbot: QtBot, word_level_timings: bool, expected_segments: List[Segment]
|
||||
):
|
||||
file_transcription_options = FileTranscriptionOptions(
|
||||
file_paths=[test_multibyte_utf8_audio_path]
|
||||
file_paths=[str(Path(test_multibyte_utf8_audio_path).resolve())]
|
||||
)
|
||||
transcription_options = TranscriptionOptions(
|
||||
language="lv",
|
||||
|
|
@ -107,7 +109,7 @@ class TestWhisperCppFileTranscriber:
|
|||
model_path = get_model_path(transcription_options.model)
|
||||
transcriber = WhisperCppFileTranscriber(
|
||||
task=FileTranscriptionTask(
|
||||
file_path=test_multibyte_utf8_audio_path,
|
||||
file_path=str(Path(test_multibyte_utf8_audio_path).resolve()),
|
||||
transcription_options=transcription_options,
|
||||
file_transcription_options=file_transcription_options,
|
||||
model_path=model_path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue