rnnt speech recognition
1.0.0
在 Tensorflow 2.0 中使用 RNN-Transducer 进行端到端语音识别
该语音识别模型基于 Google 的移动设备流式端到端语音识别研究论文,并使用 Tensorflow 2.0 在 Python 3 中实现
要设置您的环境,请运行以下命令:
git clone --recurse https://github.com/noahchalifour/rnnt-speech-recognition.git
cd rnnt-speech-recognition
pip install tensorflow==2.2.0 # or tensorflow-gpu==2.2.0 for GPU support
pip install -r requirements.txt
./scripts/build_rnnt.sh # to setup the rnnt loss
您可以在此处找到并下载 Common Voice 数据集
在 Common Voice 数据集上训练模型之前,必须首先将所有音频 mp3 文件类型转换为 wav。通过运行以下命令来执行此操作:
注意:确保您的计算机上安装了
ffmpeg
,因为它使用它将 mp3 转换为 wav
./scripts/common_voice_convert.sh <data_dir> <# of threads>
python scripts/remove_missing_samples.py
--data_dir <data_dir>
--replace_old
将所有 mp3 转换为 wav 后,您需要预处理数据集,可以通过运行以下命令来完成:
python preprocess_common_voice.py
--data_dir <data_dir>
--output_dir <preprocessed_dir>
要训练简单模型,请运行以下命令:
python run_rnnt.py
--mode train
--data_dir <path to data directory>