chenmingxiang110 / Chinese-automatic-speech-recognition

Chinese speech recognition
MIT License
166 stars 23 forks source link

ValueError #11

Closed Alvin-LH closed 3 years ago

Alvin-LH commented 3 years ago

你好,打扰你了当我换一个语音文件的时候,就会报错: Traceback (most recent call last): File "C:/Users/lihao/Desktop/Chinese-automatic-speech-recognition-master/test.py", line 46, in data = zero_padding_1d(data, 160240) File "C:\Users\lihao\Desktop\Chinese-automatic-speech-recognition-master\lib\tools_math.py", line 46, in zero_padding_1d result = np.concatenate([vec, np.zeros(obj_length-len(vec))]) ValueError: negative dimensions are not allowed

是因为语音的采样率有限制吗,如果是这样,有什么好的解决办法吗,谢谢不胜感激

chenmingxiang110 commented 3 years ago

你好,我这做了最长音频的长度限制(大约10秒),你这个可能是超过最长的长度了

Mingxiang Chen

730 Escondido Rd,

Stanford, California 94305 650-441-8408

Alvin-LH @.***> 于2021年9月1日周三 下午9:56写道:

你好,打扰你了当我换一个语音文件的时候,就会报错: Traceback (most recent call last): File "C:/Users/lihao/Desktop/Chinese-automatic-speech-recognition-master/test.py", line 46, in data = zero_padding_1d(data, 160240) File "C:\Users\lihao\Desktop\Chinese-automatic-speech-recognition-master\lib\tools_math.py", line 46, in zero_padding_1d result = np.concatenate([vec, np.zeros(obj_length-len(vec))]) ValueError: negative dimensions are not allowed

是因为语音的采样率有限制吗,如果是这样,有什么好的解决办法吗,谢谢不胜感激

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chenmingxiang110/Chinese-automatic-speech-recognition/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFDRTSTA7LM2YJRW6DP5QDT7YWIPANCNFSM5DGRNZTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.