python语言处理
pydrobert-speech的Python项目详细描述
Pydrobert语音
此纯Python库允许对语音特征进行灵活的计算。
例如,给定的功能配置称为fbanks.json
:
{"name":"stft","bank":"fbank","frame_length_ms":25,"include_energy":true,"pad_to_nearest_power_of_two":true,"window_function":"hanning","use_power":true}
importjsonfrompydrobert.speechimport*# get the feature computer readyparams=json.load(open('fbank.json'))computer=util.alias_factory_subclass_from_arg(compute.FrameComputer,params)# assume "signal" is a numpy float arrayfeats=computer.compute_full(signal)
如果您打算使用PyTorchDataLoader
或kaldi
在asr管道中的表中,可以通过
使用命令signals-to-torch-feat-dir
(需要pytorch包)
或者compute-feats-from-kaldi-tables
(需要pydrobert kaldi包)。
这个包可以计算比f-banks多得多的数据 排列。有关如何更深入地讨论 使用它。
文档
安装
pydrobert speech可通过pypi和conda获得。
conda install -c sdrobert pydrobert-speech
pip install pydrobert-speech
pip install git+https://github.com/sdrobert/pydrobert-speech # bleeding edge