Skip to content

Commit

Permalink
add transcribe
Browse files Browse the repository at this point in the history
  • Loading branch information
dimastatz committed Apr 4, 2024
1 parent 239b53f commit 30c8466
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/tests/test_transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ 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:
content = wav.read()
rate, _ = wv.read(io.BytesIO(content))
rate, buffer = wv.read(io.BytesIO(content))

text = transcriber(buffer)
print(text)

assert rate > 0

0 comments on commit 30c8466

Please sign in to comment.