Skip to content

SpeechX Custom ASR

YangZhou edited this page May 24, 2022 · 8 revisions

定制化语音识别演示

介绍

在一些场景中,识别系统需要高精度的识别一些稀有词,例如导航软件中地名识别。而通过定制化识别可以满足这一需求。

相关demo: https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/demos/custom_streaming_asr

相关脚本:https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/speechx/examples/custom_asr

脚本的代码是一个详细的教程,用户可以根据自己的需求进行定制。

这个 demo 是打车报销单的场景识别,需要识别一些稀有的地名,可以通过如下操作实现。

  • G with slot: 打车到 "address_slot"。

  • 这是 address slot wfst, 可以添加一些需要识别的地名.

  • 通过 replace 操作, G = fstreplace(G_with_slot, address_slot), 最终可以得到定制化的解码图。

  • demo的结果:

0513 10:58:13.827821 41768 recognizer_test_main.cc:56] wav len (sample): 70208
I0513 10:58:13.884493 41768 feature_cache.h:52] set finished
I0513 10:58:24.247171 41768 paddle_nnet.h:76] Tensor neml: 10240
I0513 10:58:24.247249 41768 paddle_nnet.h:76] Tensor neml: 10240
LOG ([5.5.544~2-f21d7]:main():decoder/recognizer_test_main.cc:90)  the result of case_10 is 五月十二日二十二点三十六分加班打车回家四十一元
Clone this wiki locally