Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleSpeech into add_tolite
commit
d0eea5814d
@ -0,0 +1,100 @@
|
||||
([简体中文](./README_cn.md)|English)
|
||||
# ASR Deployment by SpeechX
|
||||
|
||||
## Introduction
|
||||
|
||||
ASR deployment support U2/U2++/Deepspeech2 asr model using c++, which is good practice in industry deployment.
|
||||
|
||||
More info about SpeechX, please see [here](../../speechx/README.md).
|
||||
|
||||
## Usage
|
||||
### 1. Environment
|
||||
|
||||
* python - 3.7
|
||||
* docker - `registry.baidubce.com/paddlepaddle/paddle:2.2.2-gpu-cuda10.2-cudnn7`
|
||||
* os - Ubuntu 16.04.7 LTS
|
||||
* gcc/g++/gfortran - 8.2.0
|
||||
* cmake - 3.16.0
|
||||
|
||||
More info please see [here](../../speechx/README.md).
|
||||
|
||||
### 2. Compile SpeechX
|
||||
|
||||
Please see [here](../../speechx/README.md).
|
||||
|
||||
### 3. Usage
|
||||
|
||||
For u2++ asr deployment example, please to see [here](../../speechx/examples/u2pp_ol/wenetspeech/).
|
||||
|
||||
First go to `speechx/speechx/examples/u2pp_ol/wenetspeech` dir.
|
||||
|
||||
- Source path.sh
|
||||
```bash
|
||||
source path.sh
|
||||
```
|
||||
|
||||
- Download Model, Prepare test data and cmvn
|
||||
```bash
|
||||
run.sh --stage 0 --stop_stage 1
|
||||
```
|
||||
|
||||
- Decode with WAV
|
||||
|
||||
```bash
|
||||
# FP32
|
||||
./local/recognizer.sh
|
||||
|
||||
# INT8
|
||||
./local/recognizer_quant.sh
|
||||
```
|
||||
|
||||
Output:
|
||||
```bash
|
||||
I1026 16:13:24.683531 48038 u2_recognizer_main.cc:55] utt: BAC009S0916W0495
|
||||
I1026 16:13:24.683578 48038 u2_recognizer_main.cc:56] wav dur: 4.17119 sec.
|
||||
I1026 16:13:24.683595 48038 u2_recognizer_main.cc:64] wav len (sample): 66739
|
||||
I1026 16:13:25.037652 48038 u2_recognizer_main.cc:87] Pratial result: 3 这令
|
||||
I1026 16:13:25.043697 48038 u2_recognizer_main.cc:87] Pratial result: 4 这令
|
||||
I1026 16:13:25.222124 48038 u2_recognizer_main.cc:87] Pratial result: 5 这令被贷款
|
||||
I1026 16:13:25.228385 48038 u2_recognizer_main.cc:87] Pratial result: 6 这令被贷款
|
||||
I1026 16:13:25.414669 48038 u2_recognizer_main.cc:87] Pratial result: 7 这令被贷款的员工
|
||||
I1026 16:13:25.420714 48038 u2_recognizer_main.cc:87] Pratial result: 8 这令被贷款的员工
|
||||
I1026 16:13:25.608129 48038 u2_recognizer_main.cc:87] Pratial result: 9 这令被贷款的员工们请
|
||||
I1026 16:13:25.801620 48038 u2_recognizer_main.cc:87] Pratial result: 10 这令被贷款的员工们请食难安
|
||||
I1026 16:13:25.804101 48038 feature_cache.h:44] set finished
|
||||
I1026 16:13:25.804128 48038 feature_cache.h:51] compute last feats done.
|
||||
I1026 16:13:25.948771 48038 u2_recognizer_main.cc:87] Pratial result: 11 这令被贷款的员工们请食难安
|
||||
I1026 16:13:26.246963 48038 u2_recognizer_main.cc:113] BAC009S0916W0495 这令被贷款的员工们请食难安
|
||||
```
|
||||
|
||||
## Result
|
||||
|
||||
> CER compute under aishell-test.
|
||||
> RTF compute with feature and decoder, which is more end to end.
|
||||
> Machine Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz avx512_vnni
|
||||
|
||||
### FP32
|
||||
|
||||
```
|
||||
Overall -> 5.75 % N=104765 C=99035 S=5587 D=143 I=294
|
||||
Mandarin -> 5.75 % N=104762 C=99035 S=5584 D=143 I=294
|
||||
English -> 0.00 % N=0 C=0 S=0 D=0 I=0
|
||||
Other -> 100.00 % N=3 C=0 S=3 D=0 I=0
|
||||
```
|
||||
|
||||
```
|
||||
RTF is: 0.315337
|
||||
```
|
||||
|
||||
### INT8
|
||||
|
||||
```
|
||||
Overall -> 5.83 % N=104765 C=98943 S=5675 D=147 I=286
|
||||
Mandarin -> 5.83 % N=104762 C=98943 S=5672 D=147 I=286
|
||||
English -> 0.00 % N=0 C=0 S=0 D=0 I=0
|
||||
Other -> 100.00 % N=3 C=0 S=3 D=0 I=0
|
||||
```
|
||||
|
||||
```
|
||||
RTF is: 0.269674
|
||||
```
|
@ -0,0 +1,10 @@
|
||||
0001 考古人员<speak>西<say-as pinyin='zang4'>藏</say-as>布达拉宫里发现一个被隐<say-as pinyin="cang2">藏</say-as>的装有宝<say-as pinyin="zang4">藏</say-as></speak>箱子。
|
||||
0002 <speak>有人询问中国银<say-as pinyin='hang2'>行</say-as>北京分<say-as pinyin='hang2 hang2'>行行</say-as>长是否叫任我<say-as pinyin='xing2'>行</say-as></speak>。
|
||||
0003 <speak>市委书记亲自<say-as pinyin='shuai4'>率</say-as>领审计员对这家公司进行财务审计,发现企业的利润<say-as pinyin='lv4'>率</say-as>数据虚假</speak>。
|
||||
0004 <speak>学生们对代<say-as pinyin='shu4'>数</say-as>理解不深刻,特别是小<say-as pinyin='shu4'>数</say-as>点,在<say-as pinyin='shu3 shu4'>数数</say-as>时容易弄错</speak>。
|
||||
0005 <speak>赵<say-as pinyin='chang2'>长</say-as>军从小学习武术,擅<say-as pinyin='chang2'>长</say-as>散打,<say-as pinyin='zhang3'>长</say-as>大后参军,担任连<say-as pinyin='zhang3'>长</say-as></speak>。
|
||||
0006 <speak>我说她<say-as pinyin='zhang3'>涨</say-as>了工资,她就<say-as pinyin='zhang4'>涨</say-as>红着脸,摇头否认</speak>。
|
||||
0007 <speak>请把这封信交<say-as pinyin='gei3'>给</say-as>团长,告诉他,前线的供<say-as pinyin='ji3'>给</say-as>一定要有保障</speak>。
|
||||
0008 <speak>矿下的<say-as pinyin='hang4'>巷</say-as>道,与北京四合院的小<say-as pinyin='xiang4'>巷</say-as>有点相似</speak>。
|
||||
0009 <speak>他常叹自己命<say-as pinyin='bo2'>薄</say-as>,几亩<say-as pinyin='bao2'>薄</say-as>田,种点<say-as pinyin='bo4'>薄</say-as>荷</speak>。
|
||||
0010 <speak>小明对天相很有研究,在<say-as pinyin='su4'>宿</say-as>舍说了一<say-as pinyin='xiu3'>宿</say-as>有关星<say-as pinyin='xiu4'>宿</say-as>的常识</speak>。
|
@ -0,0 +1 @@
|
||||
../../../../utils
|
Loading…
Reference in new issue