草庐IT

RECOGNIZE_SPEECH

全部标签

android - 使用 API key 在 Android 上通过 GRPC 验证 Google Cloud Speech

我已经通过GRPC在流模式下使用服务帐户,设法让GoogleCloudSpeech为我的Android应用程序工作。但是,根据我所读到的内容,出于安全原因,我不应该部署其中包含这些凭据的Android应用程序(当前存储为资源中的JSON文件)。正确的做法是创建一个APIkey,如下所述:https://cloud.google.com/speech/docs/common/auth这允许我限制对我的特定Android应用程序的访问。但是,我一直无法找到如何使用GRPC的APIkey。我目前正在从JSON文件创建一个GoogleCredentials实例,这工作正常。如何从APIkey中

Android Text to Speech连续添加语音文本

我目前正在为视障人士开发一个应用程序,该应用程序将读取.txt文件。我正在考虑以block的形式加载文本,即50个字符,类似于“页面”。问题是如何连接TTS中的那些“block”。我正在使用方法Tts.speak(speechText,TextToSpeech.QUEUE_ADD,null)block之间总是有一个空格。当单词或句子(因为语调)被语音空间分开时,这很烦人。难道没有像“stream”这样的东西可以连续向tts添加语音文本并且不提供语音空间吗?我知道我可以将文本分成句子而不是页面,但并非所有文本都在句子中,因此我必须定义一些如何划分文本的好方法。具有相同字符数的block的

android - 在 Android 中——我们如何获取 Text to Speech 中正在说话的单词?

有人帮我在文本转语音中提供提示吗?我的目标是提示设备正在读取哪个单词。文本到语音我的代码如下:-TextToSpeechtts=newTextToSpeech(this,this);if(txtText.getText().toString().length()==0)tts.speak("Youhaven'ttypedtext",TextToSpeech.QUEUE_FLUSH,null);elsetts.speak(txtText.getText().toString(),TextToSpeech.QUEUE_FLUSH,null);谢谢。 最佳答案

带有一些第 3 方语音识别器的 android.speech.RecognitionService SecurityException

我们创建了一个使用Google语音识别器的Android应用程序,我们首先在程序中选择要使用的Google语音识别器。大多数设备工作正常,只有少数设备(MEIZU_M5、U78-E、ApolloLite等)报告以下异常。好像和联发科的语音命令有些冲突?我们发现Mediatek的其他一些设备工作正常。这令人困惑。java.lang.SecurityException:NotallowedtobindtoserviceIntent{act=android.speech.RecognitionServicecmp=com.mediatek.voicecommand/.service.Voic

安卓的东西 :Use Speech to text in Raspberry Pi 3 using android things

我正在使用以下代码为RaspberryPi3语音转文本Intentintent=newIntent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE,"en-US");try{startActivityForResult(intent,RESULT_SPEECH);}

java - 发生点击时 RecognizerIntent.ACTION_RECOGNIZE_SPEECH 被阻止

在我的主要Activity中,我启动了一个新的Intent:Intentintent=newIntent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);intent.putExtra(RecognizerIntent.EXTRA_PROMPT,"Whatwouldyouliketofind?\nForexample\"Openheartsurgery\"");startActivityForResult(intent,SPEECH_REQUEST);然后我检索这里所说的关键字:@OverrideprotectedvoidonActivityResu

java - Google Speech API 中口语的语言代码检测

这个问题在这里已经有了答案:howtodetectlanguagespokeningooglecloudplatformmachinelearningspeechapi(2个答案)关闭2年前。是否有使用GoogleCloudPlatformMachineLearning的SpeechAPI自动检测口语的选项?https://cloud.google.com/speech/docs/languages表示支持的语言列表。但是,用户需要手动设置该参数才能进行语音转文本。我想自动执行此操作。

android - 英语美国语言代码更改了吗? Google Speech Api v2 没有返回正确的结果

刚刚注意到美国英语单词不再显示正确的拼写。这以前没问题-现在它显示英语UK拼写。下面是我找到的一些单词的列表。例如,如果我说center并将语言代码设置为en-US我得到的结果是centre这是英语英国。我正在使用GoogleAPIv2https://www.google.com/speech-api/v2/recognize?output=json&lang=en-US&key=my_key"以-RE结尾的单词以-re结尾的英式英语单词在美式英语中通常以-er结尾:英国和美国centrecenterfibrefiberlitrelitertheatretheaterortheatre

java - 无法在 Android 中导入 com.google.cloud.speech.v1.SpeechGrpc

我正在尝试使用Google'sSpeechAPI在安卓项目中。示例项目有效。我在自己的Android应用程序中使用它时遇到问题。build.gradle(模块:应用程序):applyplugin:'com.android.application'applyplugin:'com.google.protobuf'ext{supportLibraryVersion='25.4.0'grpcVersion='1.4.0'}android{compileSdkVersion25buildToolsVersion"25.0.3"defaultConfig{applicationId"Applic

安卓数据绑定(bind) : @BindingAdapter in Kotlin does not recognize lambdas

这是我的BindingAdapter:@BindingAdapter(value=*arrayOf("bind:commentsAdapter","bind:itemClick","bind:avatarClick","bind:scrolledUp"),requireAll=false)funinitWithCommentsAdapter(recyclerView:RecyclerView,commentsAdapter:CommentsAdapter,itemClick:(item:EntityCommentItem)->Unit,avatarClick:((item:Entity