Skip to content

Commit b984ac9

Browse files
authored
Merge pull request zhayujie#2013 from 6vision/fix_baidu_voice
Changed sampling rate
2 parents a7d299c + 98a0fc2 commit b984ac9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

voice/baidu/baidu_voice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def voiceToText(self, voice_file):
6262
# 识别本地文件
6363
logger.debug("[Baidu] voice file name={}".format(voice_file))
6464
pcm = get_pcm_from_wav(voice_file)
65-
res = self.client.asr(pcm, "pcm", 8000, {"dev_pid": self.dev_id})
65+
res = self.client.asr(pcm, "pcm", 16000, {"dev_pid": self.dev_id})
6666
if res["err_no"] == 0:
6767
logger.info("百度语音识别到了:{}".format(res["result"]))
6868
text = "".join(res["result"])

0 commit comments

Comments
 (0)