我正在使用以下代码为 Raspberry Pi3 语音转文本
Intent intent = new Intent(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);
} catch (ActivityNotFoundException a) {
a.printStackTrace();
}
但是代码不起作用 它给出了异常
device does not support Speech to text
是否有任何方法可以使用 android things 或需要在 Raspberry Pi 上安装任何软件包或 apk 来支持 Raspberry Pi 的语音转文本以支持语音转文本。 请帮忙
最佳答案
离线语音识别器无法在 Android Things 上运行,但可以通过基于云的方式将音频发送到服务器并取回用户转录,例如 Google Cloud Speech API .
如果您有一组正在收听的特定 Intent ,您可能需要查看 Dialogflow API ,它在幕后使用 Google Cloud Speech 进行自然语言处理。还有 Google Assistant SDK ,这样您就可以嵌入完整的 Google 智能助理。
关于安卓的东西 :Use Speech to text in Raspberry Pi 3 using android things,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49166326/