Adaptation to whisper large-v3 update

This commit is contained in:
Songting
2023-11-14 17:13:54 +08:00
committed by GitHub
parent 3a19b67247
commit aa3b066668
+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)