瀏覽代碼

Changed sampling rate

master
6vision 6 月之前
父節點
當前提交
be13cc3194
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      voice/baidu/baidu_voice.py

+ 1
- 1
voice/baidu/baidu_voice.py 查看文件

@@ -62,7 +62,7 @@ class BaiduVoice(Voice):
# 识别本地文件
logger.debug("[Baidu] voice file name={}".format(voice_file))
pcm = get_pcm_from_wav(voice_file)
res = self.client.asr(pcm, "pcm", 8000, {"dev_pid": self.dev_id})
res = self.client.asr(pcm, "pcm", 16000, {"dev_pid": self.dev_id})
if res["err_no"] == 0:
logger.info("百度语音识别到了:{}".format(res["result"]))
text = "".join(res["result"])


Loading…
取消
儲存