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

Merge branch 'main' into add-detection-confidence

parents c10bc56d 6d074b2e
Branches
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ Unreleased ...@@ -7,6 +7,7 @@ Unreleased
### Added ### Added
- Added detection confidence to langauge detection endpoint - Added detection confidence to langauge detection endpoint
- 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)
-------------------- --------------------
......
...@@ -48,7 +48,7 @@ def language_detection(audio): ...@@ -48,7 +48,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