Update short_audio_transcribe.py

This commit is contained in:
Danu Kim
2023-11-13 16:56:55 -05:00
committed by GitHub
parent 3a19b67247
commit 1f102f3c09
+1 -1
View File
@@ -16,7 +16,7 @@ def transcribe_one(audio_path):
audio = whisper.pad_or_trim(audio)
# make log-Mel spectrogram and move to the same device as the model
mel = whisper.log_mel_spectrogram(audio).to(model.device)
mel = whisper.log_mel_spectrogram(audio, n_mels=128).to(model.device)
# detect the spoken language
_, probs = model.detect_language(mel)