diff --git a/e2e/preview/components/test_whisper_local.py b/e2e/preview/components/test_whisper_local.py index d306aa57f..a097e225e 100644 --- a/e2e/preview/components/test_whisper_local.py +++ b/e2e/preview/components/test_whisper_local.py @@ -4,13 +4,14 @@ from haystack.preview.components.audio.whisper_local import LocalWhisperTranscri def test_whisper_local_transcriber(preview_samples_path): comp = LocalWhisperTranscriber(model_name_or_path="medium") comp.warm_up() - docs = comp.transcribe( + output = comp.run( audio_files=[ preview_samples_path / "audio" / "this is the content of the document.wav", str((preview_samples_path / "audio" / "the context for this answer is here.wav").absolute()), open(preview_samples_path / "audio" / "answer.wav", "rb"), ] ) + docs = output["documents"] assert len(docs) == 3 assert "this is the content of the document." == docs[0].content.strip().lower() diff --git a/e2e/preview/components/test_whisper_remote.py b/e2e/preview/components/test_whisper_remote.py index c95de478b..83d9d45c2 100644 --- a/e2e/preview/components/test_whisper_remote.py +++ b/e2e/preview/components/test_whisper_remote.py @@ -13,15 +13,13 @@ def test_whisper_remote_transcriber(preview_samples_path): comp = RemoteWhisperTranscriber(api_key=os.environ.get("OPENAI_API_KEY")) output = comp.run( - RemoteWhisperTranscriber.Input( - audio_files=[ - preview_samples_path / "audio" / "this is the content of the document.wav", - str((preview_samples_path / "audio" / "the context for this answer is here.wav").absolute()), - open(preview_samples_path / "audio" / "answer.wav", "rb"), - ] - ) + audio_files=[ + preview_samples_path / "audio" / "this is the content of the document.wav", + str((preview_samples_path / "audio" / "the context for this answer is here.wav").absolute()), + open(preview_samples_path / "audio" / "answer.wav", "rb"), + ] ) - docs = output.documents + docs = output["documents"] assert len(docs) == 3 assert "this is the content of the document." == docs[0].content.strip().lower()