csukuangfj / kaldifeat

Kaldi-compatible online & offline feature extraction with PyTorch, supporting CUDA, batch processing, chunk processing, and autograd - Provide C++ & Python API
https://csukuangfj.github.io/kaldifeat
Other
186 stars 35 forks source link

support whisper v3 #84

Closed csukuangfj closed 10 months ago

csukuangfj commented 10 months ago

See also https://github.com/openai/whisper/pull/1761

The difference is that whisper v3 uses 128-dim features, while it uses 80 previously for other kinds of models.

Usage

import kaldifeat

opts = kaldifeat.WhisperFbankOptions()
opts.num_mels = 128
opts.device = torch.device('cuda', 0)
fbank = kaldifeat.WhisperFbank(opts)
features = fbank(wave)