You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
local-whisper/tests/unit/test_inference.py

10 lines
379 B
Python

from local_whisper.inference import transcribe
from local_whisper.audio import load_audio
def test_transcribe(sample_audio):
with open(sample_audio, mode="rb") as af:
audio = load_audio(af)
result = transcribe(audio)
assert result["text"].strip() == "Let's see, right now I'm playing Horizon Zero Dawn. I also had just recently finished BioShock Infinite."