Pārlūkot izejas kodu

Merge pull request #2013 from 6vision/fix_baidu_voice

Changed sampling rate
master
vision GitHub pirms 6 mēnešiem
vecāks
revīzija
c8d388f70f
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: B5690EEEBB952194
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      voice/baidu/baidu_voice.py

+ 1
- 1
voice/baidu/baidu_voice.py Parādīt failu

@@ -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"])


Notiek ielāde…
Atcelt
Saglabāt