Skip to content
Snippets Groups Projects
Unverified Commit 252e5a7a authored by Aidan Crowther's avatar Aidan Crowther Committed by GitHub
Browse files

Merge branch 'main' into add-vram-flush

parents f01ea254 6d074b2e
Branches
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ Unreleased ...@@ -7,6 +7,7 @@ Unreleased
### Added ### Added
- Timeout configured to allow model to be unloaded when idle - Timeout configured to allow model to be unloaded when idle
- Set mel generation to adjust n_dims automatically to match the loaded model
[1.6.0] (2024-10-06) [1.6.0] (2024-10-06)
-------------------- --------------------
......
...@@ -90,7 +90,7 @@ def language_detection(audio): ...@@ -90,7 +90,7 @@ def language_detection(audio):
audio = whisper.pad_or_trim(audio) audio = whisper.pad_or_trim(audio)
# make log-Mel spectrogram and move to the same device as the model # 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, model.dims.n_mels).to(model.device)
# detect the spoken language # detect the spoken language
with model_lock: with model_lock:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment