This library provides common speech features for ASR including MFCCs and filterbank energies. It is a fork of https://github.com/jameslyons/python_speech_features and https://github.com/ZitengWang/python_kaldi_features
Install from this repository:
git clone https://github.com/thomasZen/python_speech_features2 python setup.py install
Example for creating normalized logmel and delta features. This procedure is tested for CTC-based speech recognition on Tedlium.
import librosa
import numpy
from python_speech_features import logfbank, calculate_delta, normalize
y, sr = librosa.load("english.wav", sr=16000)
logmel = logfbank(y, samplerate=sr)
delta = calculate_delta(logmel)
features = numpy.concatenate([logmel, delta], axis=1)
features = normalize(features)Changes compared to https://github.com/ZitengWang/python_kaldi_features:
- Added normalize function
- Rewrote delta calculation
- Changed default parameters
- Cleanup and documentation