Go to file
nl 68171bbcb6 doc: 更新README文档 2021-12-09 21:24:23 +08:00
.github Update FUNDING.yml 2019-05-25 21:02:13 +08:00
datalist 更新st-cmds拼音标签 2020-10-23 20:05:05 +08:00
model_language fix: 去除其中的异形字和生僻字 2021-05-16 19:46:47 +08:00
speech_features style: 规范代码风格 2021-11-27 20:51:32 +08:00
utils test: 添加get_edit_distance的单元测试代码 2021-11-27 21:27:55 +08:00
.gitignore feat: 移除旧版本中本身已经不用的代码 2021-11-24 15:19:17 +08:00
LICENSE add license and gitignore.modify py code main.py 2017-08-22 17:56:05 +08:00
LanguageModel2.py perf: 改冒泡排序为sorted快排以提升速度 2021-12-05 23:06:11 +08:00
README.md doc: 更新README文档 2021-12-09 21:24:23 +08:00
README_EN.md doc: 更新README文档 2021-12-09 21:24:23 +08:00
asrserver.py style: 规范代码风格 2021-11-26 18:27:35 +08:00
asrt_config.json feat: 在配置文件中默认添加数据集到6个 2021-12-04 23:24:54 +08:00
client.py style: 优化代码风格 2021-11-20 21:43:34 +08:00
data_loader.py style: 规范代码风格 2021-11-24 15:11:08 +08:00
dict.txt fix: 纠正dict.txt中的错字 2021-12-04 22:15:55 +08:00
download_default_datalist.py feat: 添加下载默认datalist的程序 2021-12-05 01:47:41 +08:00
evaluate_speech_model.py fix: 修复默认加载的文件名问题 2021-11-25 17:45:06 +08:00
predict_speech_file.py style: 规范代码风格 2021-11-26 18:27:35 +08:00
requirements.txt feat: 更新requirements.txt 2021-11-19 00:29:33 +08:00
speech_model.py fix: 修复一个会在evaluate部分由于音频过长判断时没有跳出导致死循环的bug 2021-12-03 14:51:44 +08:00
speech_model_zoo.py fix: 修复24模型bug 2021-11-22 21:53:43 +08:00
speech_recorder.py style: 规范代码风格 2021-11-26 18:27:35 +08:00
train_speech_model.py perf: 修改默认训练的epoch数 2021-12-08 14:50:34 +08:00

README_EN.md

ASRT: A Deep-Learning-Based Chinese Speech Recognition System

GPL-3.0 Licensed TensorFlow Version Python Version

ReadMe Language | 中文版 | English |

ASRT Project Home Page | Released Download | View this project's wiki document (Chinese) | Experience Demo | Donate

If you have any questions in your works with this project, welcome to put up issues in this repo and I will response as soon as possible.

You can check the FAQ Page (Chinese) first before asking questions to avoid repeating questions.

A post about ASRT's introduction

About how to use ASRT to train and deploy

For questions about the principles of the statistical language model that are often asked, see:

For questions about CTC, see:

For more infomation please refer to author's blog website: AILemon Blog (Chinese)

Introduction

This project uses tensorFlow.keras based on deep convolutional neural network and long-short memory neural network, attention mechanism and CTC to implement.

  • Steps

First, clone the project to your computer through Git, and then download the data sets needed for the training of this project. For the download links, please refer to End of Document

$ git clone https://github.com/nl8590687/ASRT_SpeechRecognition.git

Or you can use the "Fork" button to copy a copy of the project and then clone it locally with your own SSH key.

After cloning the repository via git, go to the project root directory; create a subdirectory dataset/ (you can use a soft link instead) for datasets, and then extract the downloaded datasets directly into it.

$ cd ASRT_SpeechRecognition

$ mkdir dataset

$ tar zxf <dataset zip files name> -C dataset/ 

Then, you need to copy all the files in the 'datalist' directory to the dataset directory, that is, put them together with the data set.

Note that in the current version, in the configuration file, two data sets, Thchs30 and ST-CMDS, are added by default, please delete them if you dont need them. If you want to use other data sets, you need to add data configuration yourself, and use the standard format supported by ASRT to organize the data in advance.

$ cp -rf datalist/* dataset/

Currently available models are 24, 25 and 251

Before running this project, please install the necessary Python3 version dependent library

To start training this project, please execute:

$ python3 train_speech_model.py

To start the test of this project, please execute:

$ python3 evaluate_speech_model.py

Before testing, make sure the model file path filled in the code files exists.

ASRT API Server startup please execute:

$ python3 asrserver.py

Please note that after opening the API server, you need to use the client software corresponding to this ASRT project for voice recognition. For details, see the Wiki documentation to download ASRT Client Demo.

If you want to train and use other model(not Model 251), make changes in the corresponding position of the import speech_model_zoo in the code files.

If there is any problem during the execution of the program or during use, it can be promptly put forward in the issue, and I will reply as soon as possible.

Model

Speech Model

CNN/LSTM/GRU + CTC

The maximum length of the input audio is 16 seconds, and the output is the corresponding Chinese pinyin sequence.

  • Questions about downloading trained models

The released finished software that includes trained model weights can be downloaded from ASRT download page.

Github Releases page includes the archives of the various versions of the software released and it's introduction. Under each version module, there is a zip file that includes trained model weights files.

Language Model

Maximum Entropy Hidden Markov Model Based on Probability Graph.

The input is a Chinese pinyin sequence, and the output is the corresponding Chinese character text.

About Accuracy

At present, the best model can basically reach 80% of Pinyin correct rate on the test set.

However, as the current international and domestic teams can achieve 98%, the accuracy rate still needs to be further improved.

Python Dependency Library

  • tensorFlow (1.15 - 2.x)
  • numpy
  • wave
  • matplotlib
  • math
  • scipy
  • requests

If you have trouble when install those packages, please run the following script to do it as long as you have a GPU and CUDA 11.2 and cudnn 8.1 have been installed

$ pip install -r requirements.txt

Dependent Environment Details and Hardware Requirement

Data Sets

Some free Chinese speech datasets (Chinese)

  • Tsinghua University THCHS30 Chinese voice data set

    data_thchs30.tgz Download

    test-noise.tgz Download

    resource.tgz Download

  • Free ST Chinese Mandarin Corpus

    ST-CMDS-20170001_1-OS.tar.gz Download

  • AIShell-1 Open Source Dataset

    data_aishell.tgz Download

    Noteunzip this dataset

    $ tar xzf data_aishell.tgz
    $ cd data_aishell/wav
    $ for tar in *.tar.gz;  do tar xvf $tar; done
    
  • Primewords Chinese Corpus Set 1

    primewords_md_2018_set1.tar.gz Download

  • aidatatang_200zh

    aidatatang_200zh.tgz Download

  • MagicData

    train_set.tar.gz Download

    dev_set.tar.gz Download

    test_set.tar.gz Download

    metadata.tar.gz Download

Special thanks! Thanks to the predecessors' public voice data set.

If the provided dataset link cannot be opened and downloaded, click this link OpenSLR

License

GPL v3.0 © nl8590687 Author: ailemon

Contributors

Contributors Page

@nl8590687 (repo owner)