mirror of
https://github.com/openai/whisper.git
synced 2026-01-09 21:38:09 -05:00
Updating README and doc strings to reflect that n_mels can now be 128 (#2049)
This commit is contained in:
@@ -126,7 +126,7 @@ audio = whisper.load_audio("audio.mp3")
|
||||
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=model.dims.n_mels).to(model.device)
|
||||
|
||||
# detect the spoken language
|
||||
_, probs = model.detect_language(mel)
|
||||
|
||||
Reference in New Issue
Block a user