Skip to content

Commit

Permalink
add transcribe
Browse files Browse the repository at this point in the history
  • Loading branch information
dimastatz committed Apr 3, 2024
1 parent fc6e2fe commit 239b53f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions python/tests/test_transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ def test_whisper_transcribe_chunks():
"""test whisper in memory processing for streaming"""
path = os.getcwd() + "/tests/resources/harvard.wav"

transcriber = whisper.get_transcriber()
# transcriber = whisper.get_transcriber()

with open(path, "rb") as wav:
chunk = wav.read()
rate, data = wv.read(io.BytesIO(chunk))
text = transcriber(data)
content = wav.read()
rate, _ = wv.read(io.BytesIO(content))

assert rate > 0 and len(text) > 0
assert rate > 0

0 comments on commit 239b53f

Please sign in to comment.