我正在开发一个关于家庭自动化"的项目。系统与Android应用程序和微控制器,通过蓝牙模块连接。我已将"语音合并到文本"用于语音命令。虽然,它适用于内置的谷歌语音识别API。我需要的只是一个连续的语音识别,没有谷歌语音弹出窗口。 我在Playstore上看过类似的应用程序" speechnotes"这正是我希望发展的。它完全脱机工作。
答案 0 :(得分:2)
您应该尝试Droid Speech它支持连续语音识别,如果设备中安装了所需语言的语音包,也可以脱机工作。
在项目中设置库非常简单,只需几行代码就可以轻松开始使用语音识别。
一个例子,
在Gradle文件中添加以下内容,
compile 'com.github.vikramezhil:DroidSpeech:v2.0.3’
在您的活动中,
DroidSpeech droidSpeech = new DroidSpeech(this, null);
droidSpeech.setOnDroidSpeechListener(this);
启动droid语音听用户语音呼叫方法,
droidSpeech.startDroidSpeechRecognition();
语音结果将在
处触发@Override
public void onDroidSpeechFinalResult(String finalSpeechResult)
{
// Do whatever you want with the speech result
}