Skip to content

Commit a50593e

Browse files
fix: whisper tests using audio file from our github repo (#8454)
* adding audio file * temporary removing failing test * removing failing test
1 parent e7bfd80 commit a50593e

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
lines changed

test/components/audio/test_whisper_local.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,3 @@ def test_whisper_local_transcriber(self, test_files_path):
204204
assert docs[2].content.strip().lower() == "answer."
205205
# meta.audio_file should contain the temp path where we dumped the audio bytes
206206
assert docs[2].meta["audio_file"]
207-
208-
@pytest.mark.integration
209-
@pytest.mark.skipif(sys.platform in ["win32", "cygwin"], reason="ffmpeg not installed on Windows CI")
210-
def test_whisper_local_transcriber_pipeline_and_url_source(self):
211-
pipe = Pipeline()
212-
pipe.add_component("fetcher", LinkContentFetcher())
213-
pipe.add_component("transcriber", LocalWhisperTranscriber(model="tiny"))
214-
215-
pipe.connect("fetcher", "transcriber")
216-
result = pipe.run(
217-
data={
218-
"fetcher": {
219-
"urls": ["https://ia903102.us.archive.org/19/items/100-Best--Speeches/EK_19690725_64kb.mp3"]
220-
}
221-
}
222-
)
223-
assert "Massachusetts" in result["transcriber"]["documents"][0].content

test/components/audio/test_whisper_remote.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,3 @@ def test_whisper_remote_transcriber(self, test_files_path):
189189
assert str(test_files_path / "audio" / "the context for this answer is here.wav") == docs[1].meta["file_path"]
190190

191191
assert docs[2].content.strip().lower() == "answer."
192-
193-
@pytest.mark.skipif(
194-
not os.environ.get("OPENAI_API_KEY", None),
195-
reason="Export an env var called OPENAI_API_KEY containing the OpenAI API key to run this test.",
196-
)
197-
@pytest.mark.integration
198-
def test_whisper_remote_transcriber_pipeline_and_url_source(self):
199-
pipe = Pipeline()
200-
pipe.add_component("fetcher", LinkContentFetcher())
201-
pipe.add_component("transcriber", RemoteWhisperTranscriber())
202-
203-
pipe.connect("fetcher", "transcriber")
204-
result = pipe.run(
205-
data={
206-
"fetcher": {
207-
"urls": ["https://ia903102.us.archive.org/19/items/100-Best--Speeches/EK_19690725_64kb.mp3"]
208-
}
209-
}
210-
)
211-
assert "Massachusetts" in result["transcriber"]["documents"][0].content
1.02 MB
Binary file not shown.

0 commit comments

Comments
 (0)