Merge pull request #244 from alaister123/main

Fix Error: short_audio_transcribe.py ValueError with whisper
This commit is contained in:
Songting
2023-05-24 10:17:49 +08:00
committed by GitHub
+1 -1
View File
@@ -23,7 +23,7 @@ def transcribe_one(audio_path):
print(f"Detected language: {max(probs, key=probs.get)}")
lang = max(probs, key=probs.get)
# decode the audio
options = whisper.DecodingOptions(beam_size=5, best_of=5)
options = whisper.DecodingOptions(beam_size=5)
result = whisper.decode(model, mel, options)
# print the recognized text