我正在开发一个应用程序,它利用了安卓系统中的SpeechRecognizer和RecognizerIntent。
这个应用程序的工作方式应该是:用户在屏幕上显示一些文本,用户必须将这个字符串/文本大声读入手机的麦克风( SpeechRecognizer就是这样使用的)。语音识别功能完美无缺!我的问题是通过以下目的发送的提示信息:
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "the quick brown fox jumps over the lazy dog");
这条提示信息显示在谷歌的语音识别器dialog box中,当它
我的应用程序使用谷歌的语音识别API。我希望它是一种免提体验,但当它无法识别语音时,它会提示用户通过单击对话框中的按钮重试。如何避免这种情况并自动重试?我知道我应该检查一下resultCode。这是我尝试过的:
if(resultCode == RecognizerIntent.RESULT_NO_MATCH){
/* I wasnt' able to retry voice recognition, so instead to check
if I'm able to actually check if resultCode == RecognizerIntent.RESUL
是否可以扩展语音搜索应用程序?我知道我可以在自己的应用程序中添加一个按钮来启动语音识别对话框,但我想知道是否可以扩展当你长时间按下物理的“搜索”键时自动启动的语音搜索应用程序。
send text to [contact] [message]
listen to [artist/song/album]
call [business]
call [contact]
send email to [contact] [message]
go to [website]
note to self [note]
navigate to [location/business name]
directions
我正在写一个程序,你可以和它对话,它的反应就像siri一样。我正在使用谷歌语音识别和espeak来听和说。然后将对话打印到文本框中。
当程序被要求使用语音识别进行收听时,它会冻结并再次单击图形用户界面,然后它会说“没有响应”,是我运行错了还是无法在tkinter中运行语音识别
为什么这么冷?
下面是我到目前为止写的所有代码:
import tkinter as tk
from subprocess import call as say
import winsound
import speech_recognition as sr
def cbc(tex):
return lambd