我正在尝试开发一个法语学习应用程序,为此我使用 Python 语音识别 API 来检测一个人所说的内容,然后向他提供有关他所说内容以及他需要改进多少的反馈。但是API的响应非常非常慢。可能是什么原因。
在堆栈溢出的答案之一中,我发现要检查我的应用程序的输入源。我尝试使用内置麦克风和耳机麦克风,但没有任何效果。与此同时,我还使用 CMUSphinx 语音 API,它可以快速检测声音并做出响应,但准确性很差,因此我假设应用程序正在从麦克风接收声音。
with sr.Microphone() as source:
r.adjust_for_ambient_noise(source)
print("Testing Online ASR module. Backend Google Web Speech API..\n")
while(1):
print("Speak Now..\n")
audio = r.listen(source)
try:
text = r.recognize_google(audio, language='fr-FR')
response = json.dumps(text, ensure_ascii=False).encode('utf8')
print("You Said: " + str(response))
except Exception as e:
print(" ")
最佳答案
What could be the reason.
它首先将数据发送到计划的另一侧,由 NSA 存储和分析数据,只有当 NSA 批准时您才能得到结果
i am also using CMUSphinx speech API which detect the sound and responses quickly but the accuracy is very poor
正确的方法是尝试基于神经网络的东西,比如 Kaldi
关于Python语音识别API响应很慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57290242/