nl8590687 / ASRT_SpeechRecognition

A Deep-Learning-Based Chinese Speech Recognition System 基于深度学习的中文语音识别系统
https://asrt.ailemon.net
GNU General Public License v3.0
7.77k stars 1.89k forks source link

docker1.20.0的服务随便跑自己的wav file报错, 采样率是16000,通道是1 #278

Closed 13ye closed 2 years ago

13ye commented 2 years ago

{'result': '', 'status_code': 500000, 'status_message': 'could not broadcast input array from shape (149135,200,1) into shape (1600,200,1)'}

13ye commented 2 years ago

只有shape<=1600的音频文件能够识别吗 (时长>20s不支持?)

nl8590687 commented 2 years ago

请看ASRT项目文档中的 “FAQ常见问题答疑” https://wiki.ailemon.net/docs/asrt-doc/asrt-doc-1deoeud494h4f

进行训练和测试的时候不能使用超过16秒的音频片段,因为你的机器的内存或显存大概率是不够用的,太长时间的音频只会加大内部存储空间的开销。 如果要识别长度超过16秒的音频或文件,建议在实际使用的时候,采用音频分割的方法进行切分后再识别,一次用于识别的片段短于16秒就可以。在训练的时候,如果有时间过长的音频,可采用删除、忽略该条数据或人为处理进行再次切分等方法。

否则会出现诸如“ValueError: could not broadcast input array from shape (2928,200,1) into shape (1600,200,1)”的报错信息