Introduction
kaldifeat implements speech feature extraction algorithms compatible with Kaldi using PyTorch, supporting CUDA as well as autograd.
kaldifeat has the following features:
Fully compatible with Kaldi
Note
The underlying C++ code is copied & modified from Kaldi directly. It is rewritten with PyTorch C++ APIs.
Provide not only
C++ APIs
but alsoPython APIs
Note
You can access kaldifeat from
Python
.Support autograd
Support
CUDA
andCPU
Note
You can use CUDA for feature extraction.
Support
online
(i.e.,streaming
) andoffline
(i.e.,non-streaming
) feature extractionSupport chunk-based processing
Note
This is especially usefull if you want to process audios of several hours long, which may cause OOM if you send them for computation at once. With chunk-based processing, you can process audios of arbirtray length.
Support batch processing
Note
With kaldifeat you can extract features for a batch of audios
Currently implemented speech features and their counterparts in Kaldi are listed in the following table.
Supported speech features |
Counterpart in Kaldi |
---|---|
Each feature computer needs an option. The following table lists the options for each computer and the corresponding options in Kaldi.
Hint
Note that we reuse the parameter names from Kaldi.
Also, both online feature computers and offline feature computers share the same option.
Options in kaldifeat |
Corresponding options in Kaldi |
---|---|
Read more to learn how to install kaldifeat and how to use each feature computer.