diff --git a/tests/transcriber/whisper_cpp_file_transcriber_test.py b/tests/transcriber/whisper_cpp_file_transcriber_test.py index 9683ba0f..921f58d5 100644 --- a/tests/transcriber/whisper_cpp_file_transcriber_test.py +++ b/tests/transcriber/whisper_cpp_file_transcriber_test.py @@ -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,