diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-11-08 06:42:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 06:42:52 +0100 |
commit | 2d28497197b30d7f47999b15fdf6aa64b0f5e9b0 (patch) | |
tree | 21e5a6ca0c458658eaa4a6f4b65303e5db81d41b /candle-transformers/src/models/whisper/mod.rs | |
parent | f3a4f3db768d46defc16de48208107db1b32159d (diff) | |
download | candle-2d28497197b30d7f47999b15fdf6aa64b0f5e9b0.tar.gz candle-2d28497197b30d7f47999b15fdf6aa64b0f5e9b0.tar.bz2 candle-2d28497197b30d7f47999b15fdf6aa64b0f5e9b0.zip |
Preliminary support for whisper v3. (#1294)
* Preliminary support for whisper v3.
* Add the missing files.
Diffstat (limited to 'candle-transformers/src/models/whisper/mod.rs')
-rw-r--r-- | candle-transformers/src/models/whisper/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-transformers/src/models/whisper/mod.rs b/candle-transformers/src/models/whisper/mod.rs index 35d35e77..bf24045a 100644 --- a/candle-transformers/src/models/whisper/mod.rs +++ b/candle-transformers/src/models/whisper/mod.rs @@ -18,6 +18,7 @@ pub struct Config { // pub n_text_state: usize, pub decoder_attention_heads: usize, // n_text_head pub decoder_layers: usize, // n_text_layer + #[serde(default)] pub suppress_tokens: Vec<u32>, } @@ -26,7 +27,6 @@ pub const DTYPE: candle::DType = candle::DType::F32; // Audio parameters. pub const SAMPLE_RATE: usize = 16000; pub const N_FFT: usize = 400; -pub const N_MELS: usize = 80; pub const HOP_LENGTH: usize = 160; pub const CHUNK_LENGTH: usize = 30; pub const N_SAMPLES: usize = CHUNK_LENGTH * SAMPLE_RATE; // 480000 samples in a 30-second chunk |