lighting-asr-en / README.md
GCFzz's picture
Update README.md
aef1656
metadata
license: cc-by-nc-sa-4.0

Lighting ASR英文语音识别模型

环境依赖

- Python3.7+  
- PyTorch 1.8.1+
- torchaudio
- soundfile 
- librosa 

安装lighting-asr

下载源代码并添加到python路径

export PYTHONPATH=/path/to/lasrfolder/:$PYTHONPATH

源文件安装

git clone https://github.com/gaochangfeng/lighting-asr.git
cd lighting-asr
python setup.py install

PIP 安装

pip install git+https://github.com/gaochangfeng/lighting-asr.git

使用

from lasr.process.asrprocess import ASRProcess
train_config="hparams.yaml" 
decode_config="decode.yaml"
model_path="model.ckpt"
asrpipeline = ASRProcess(
    train_config=train_config, 
    decode_config=decode_config, 
    model_path=model_path
)
token, text = asrpipeline("test.wav")
print(token)
print(text)

模型训练

参考https:https://github.com/gaochangfeng/lighting-asr.git