更新版本信息和脚本
This commit is contained in:
parent
c4e668fcf4
commit
821dbf34ba
|
@ -30,16 +30,16 @@ RUN apt update && apt install -y python3 python3-pip
|
||||||
|
|
||||||
RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
||||||
RUN pip3 install wave scipy matplotlib tensorflow-cpu==2.5.3 numpy==1.19.2 requests flask waitress grpcio grpcio-tools protobuf
|
RUN pip3 install wave scipy matplotlib tensorflow-cpu==2.5.3 numpy==1.19.2 requests flask waitress grpcio==1.34.0 grpcio-tools==1.34.0 protobuf
|
||||||
|
|
||||||
RUN echo $'cd /asrt_server \n python3 asrserver_http.py' > /asrt_server/start.sh && chmod +x /asrt_server/start.sh
|
RUN echo $'cd /asrt_server \n python3 asrserver_http.py & \n python3 asrserver_grpc.py' > /asrt_server/start.sh && chmod +x /asrt_server/start.sh
|
||||||
|
|
||||||
# refer: https://docs.docker.com/engine/reference/builder/#expose
|
# refer: https://docs.docker.com/engine/reference/builder/#expose
|
||||||
EXPOSE 20001/tcp
|
EXPOSE 20001/tcp 20002/tcp
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "/asrt_server/start.sh"]
|
ENTRYPOINT ["/bin/bash", "/asrt_server/start.sh"]
|
||||||
|
|
||||||
# https://docs.docker.com/engine/reference/commandline/build/#options
|
# https://docs.docker.com/engine/reference/commandline/build/#options
|
||||||
# docker build --progress plain --rm --build-arg TAG=1.3.0 --tag asrt/api_server:1.3.0 .
|
# docker build --progress plain --rm --build-arg TAG=1.3.0 --tag asrt/api_server:1.3.0 .
|
||||||
# https://docs.docker.com/engine/reference/commandline/run/#options
|
# https://docs.docker.com/engine/reference/commandline/run/#options
|
||||||
# docker run --rm -it -p 20001:20001 --name asrt -d asrt/api_server:1.3.0
|
# docker run --rm -it -p 20001:20001 -p 20002:20002 --name asrt -d asrt/api_server:1.3.0
|
||||||
|
|
25
README.md
25
README.md
|
@ -3,7 +3,7 @@
|
||||||
[![GPL-3.0 Licensed](https://img.shields.io/badge/License-GPL3.0-blue.svg?style=flat)](https://opensource.org/licenses/GPL-3.0)
|
[![GPL-3.0 Licensed](https://img.shields.io/badge/License-GPL3.0-blue.svg?style=flat)](https://opensource.org/licenses/GPL-3.0)
|
||||||
[![Stars](https://img.shields.io/github/stars/nl8590687/ASRT_SpeechRecognition)](https://github.com/nl8590687/ASRT_SpeechRecognition)
|
[![Stars](https://img.shields.io/github/stars/nl8590687/ASRT_SpeechRecognition)](https://github.com/nl8590687/ASRT_SpeechRecognition)
|
||||||
[![TensorFlow Version](https://img.shields.io/badge/Tensorflow-1.15+-blue.svg)](https://www.tensorflow.org/)
|
[![TensorFlow Version](https://img.shields.io/badge/Tensorflow-1.15+-blue.svg)](https://www.tensorflow.org/)
|
||||||
[![Python Version](https://img.shields.io/badge/Python-3.6+-blue.svg)](https://www.python.org/)
|
[![Python Version](https://img.shields.io/badge/Python-3.7+-blue.svg)](https://www.python.org/)
|
||||||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5808434.svg)](https://doi.org/10.5281/zenodo.5808434)
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5808434.svg)](https://doi.org/10.5281/zenodo.5808434)
|
||||||
|
|
||||||
ASRT是一个基于深度学习的中文语音识别系统,如果您觉得喜欢,请点一个 **"Star"** 吧~
|
ASRT是一个基于深度学习的中文语音识别系统,如果您觉得喜欢,请点一个 **"Star"** 吧~
|
||||||
|
@ -37,7 +37,7 @@ ASRT是一个基于深度学习的中文语音识别系统,如果您觉得喜
|
||||||
|
|
||||||
### 软件
|
### 软件
|
||||||
* Linux: Ubuntu 18.04 + / CentOS 7 +
|
* Linux: Ubuntu 18.04 + / CentOS 7 +
|
||||||
* Python: 3.6 +
|
* Python: 3.7 +
|
||||||
* TensorFlow: 1.15, 2.x + (不建议使用最新版和大版本的x.x.0版)
|
* TensorFlow: 1.15, 2.x + (不建议使用最新版和大版本的x.x.0版)
|
||||||
|
|
||||||
## 快速开始
|
## 快速开始
|
||||||
|
@ -87,24 +87,34 @@ $ python3 evaluate_speech_model.py
|
||||||
$ python3 predict_speech_file.py
|
$ python3 predict_speech_file.py
|
||||||
```
|
```
|
||||||
|
|
||||||
ASRT API服务器启动请执行:
|
启动ASRT HTTP协议的API服务器启动请执行:
|
||||||
```shell
|
```shell
|
||||||
$ python3 asrserver_http.py
|
$ python3 asrserver_http.py
|
||||||
```
|
```
|
||||||
|
|
||||||
本地测试调用API服务是否成功:
|
本地测试调用HTTP协议API服务是否成功:
|
||||||
```shell
|
```shell
|
||||||
$ python3 client_http.py
|
$ python3 client_http.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
启动ASRT GRPC协议的API服务器启动请执行:
|
||||||
|
```shell
|
||||||
|
$ python3 asrserver_grpc.py
|
||||||
|
```
|
||||||
|
|
||||||
|
本地测试调用GRPC协议API服务是否成功:
|
||||||
|
```shell
|
||||||
|
$ python3 client_grpc.py
|
||||||
|
```
|
||||||
|
|
||||||
请注意,开启API服务器之后,需要使用本ASRT项目对应的客户端软件来进行语音识别,详见Wiki文档[下载ASRT语音识别客户端SDK和Demo](https://wiki.ailemon.net/docs/asrt-doc/download)。
|
请注意,开启API服务器之后,需要使用本ASRT项目对应的客户端软件来进行语音识别,详见Wiki文档[下载ASRT语音识别客户端SDK和Demo](https://wiki.ailemon.net/docs/asrt-doc/download)。
|
||||||
|
|
||||||
如果要训练和使用非251bn版模型,请在代码中 `import speech_model_zoo` 的相应位置做修改。
|
如果要训练和使用非251bn版模型,请在代码中 `from speech_model.xxx import xxx` 的相应位置做修改。
|
||||||
|
|
||||||
使用docker直接部署ASRT:
|
使用docker直接部署ASRT:
|
||||||
```shell
|
```shell
|
||||||
$ docker pull ailemondocker/asrt_service:1.2.0
|
$ docker pull ailemondocker/asrt_service:1.3.0
|
||||||
$ docker run --rm -it -p 20001:20001 --name asrt-server -d ailemondocker/asrt_service:1.2.0
|
$ docker run --rm -it -p 20001:20001 -p 20002:20002 --name asrt-server -d ailemondocker/asrt_service:1.3.0
|
||||||
```
|
```
|
||||||
仅CPU运行推理识别,不作训练
|
仅CPU运行推理识别,不作训练
|
||||||
|
|
||||||
|
@ -143,6 +153,7 @@ Github本仓库下[Releases](https://github.com/nl8590687/ASRT_SpeechRecognition
|
||||||
* requests
|
* requests
|
||||||
* flask
|
* flask
|
||||||
* waitress
|
* waitress
|
||||||
|
* grpcio / grpcio-tools / protobuf
|
||||||
|
|
||||||
不会安装环境的同学请直接运行以下命令(前提是有GPU且已经安装好 CUDA 11.2 和 cudnn 8.1):
|
不会安装环境的同学请直接运行以下命令(前提是有GPU且已经安装好 CUDA 11.2 和 cudnn 8.1):
|
||||||
|
|
||||||
|
|
25
README_EN.md
25
README_EN.md
|
@ -3,7 +3,7 @@
|
||||||
[![GPL-3.0 Licensed](https://img.shields.io/badge/License-GPL3.0-blue.svg?style=flat)](https://opensource.org/licenses/GPL-3.0)
|
[![GPL-3.0 Licensed](https://img.shields.io/badge/License-GPL3.0-blue.svg?style=flat)](https://opensource.org/licenses/GPL-3.0)
|
||||||
[![Stars](https://img.shields.io/github/stars/nl8590687/ASRT_SpeechRecognition)](https://github.com/nl8590687/ASRT_SpeechRecognition)
|
[![Stars](https://img.shields.io/github/stars/nl8590687/ASRT_SpeechRecognition)](https://github.com/nl8590687/ASRT_SpeechRecognition)
|
||||||
[![TensorFlow Version](https://img.shields.io/badge/Tensorflow-1.15+-blue.svg)](https://www.tensorflow.org/)
|
[![TensorFlow Version](https://img.shields.io/badge/Tensorflow-1.15+-blue.svg)](https://www.tensorflow.org/)
|
||||||
[![Python Version](https://img.shields.io/badge/Python-3.6+-blue.svg)](https://www.python.org/)
|
[![Python Version](https://img.shields.io/badge/Python-3.7+-blue.svg)](https://www.python.org/)
|
||||||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5808434.svg)](https://doi.org/10.5281/zenodo.5808434)
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5808434.svg)](https://doi.org/10.5281/zenodo.5808434)
|
||||||
|
|
||||||
ASRT is A Deep-Learning-Based Chinese Speech Recognition System. If you like this project, please **star** it.
|
ASRT is A Deep-Learning-Based Chinese Speech Recognition System. If you like this project, please **star** it.
|
||||||
|
@ -35,7 +35,7 @@ This project uses tensorFlow.keras based on deep convolutional neural network an
|
||||||
|
|
||||||
### Software
|
### Software
|
||||||
* Linux: Ubuntu 18.04 + / CentOS 7 +
|
* Linux: Ubuntu 18.04 + / CentOS 7 +
|
||||||
* Python: 3.6 +
|
* Python: 3.7 +
|
||||||
* TensorFlow: 1.15, 2.x + (The latest and x.x.0 are deprecated)
|
* TensorFlow: 1.15, 2.x + (The latest and x.x.0 are deprecated)
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
@ -84,7 +84,7 @@ To predict one wave audio file for speech recognition:
|
||||||
$ python3 predict_speech_file.py
|
$ python3 predict_speech_file.py
|
||||||
```
|
```
|
||||||
|
|
||||||
ASRT API Server startup please execute:
|
To startup ASRT API Server with HTTP protocol please execute:
|
||||||
```shell
|
```shell
|
||||||
$ python3 asrserver_http.py
|
$ python3 asrserver_http.py
|
||||||
```
|
```
|
||||||
|
@ -92,19 +92,29 @@ $ python3 asrserver_http.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 SDK & Demo](https://wiki.ailemon.net/docs/asrt-doc/download).
|
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 SDK & Demo](https://wiki.ailemon.net/docs/asrt-doc/download).
|
||||||
|
|
||||||
|
|
||||||
To test whether it is successful or not that calls api service interface:
|
To test whether it is successful or not that calls api service interface with HTTP protocol:
|
||||||
```shell
|
```shell
|
||||||
$ python3 client_http.py
|
$ python3 client_http.py
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to train and use other model(not Model 251bn), make changes in the corresponding position of the `import speech_model_zoo` in the code files.
|
To startup ASRT API Server with GRPC protocol please execute:
|
||||||
|
```shell
|
||||||
|
$ python3 asrserver_grpc.py
|
||||||
|
```
|
||||||
|
|
||||||
|
To test whether it is successful or not that calls api service interface with GRPC protocol:
|
||||||
|
```shell
|
||||||
|
$ python3 client_grpc.py
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to train and use other model(not Model 251bn), make changes in the corresponding position of the `from speech_model.xxx import xxx` 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.
|
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.
|
||||||
|
|
||||||
Deploy ASRT by docker:
|
Deploy ASRT by docker:
|
||||||
```shell
|
```shell
|
||||||
$ docker pull ailemondocker/asrt_service:1.2.0
|
$ docker pull ailemondocker/asrt_service:1.3.0
|
||||||
$ docker run --rm -it -p 20001:20001 --name asrt-server -d ailemondocker/asrt_service:1.2.0
|
$ docker run --rm -it -p 20001:20001 -p 20002:20002 --name asrt-server -d ailemondocker/asrt_service:1.3.0
|
||||||
```
|
```
|
||||||
It will start a api server for recognition rather than training.
|
It will start a api server for recognition rather than training.
|
||||||
|
|
||||||
|
@ -143,6 +153,7 @@ At present, the best model can basically reach 85% of Pinyin correct rate on the
|
||||||
* requests
|
* requests
|
||||||
* flask
|
* flask
|
||||||
* waitress
|
* waitress
|
||||||
|
* grpcio / grpcio-tools / protobuf
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue