语音识别,同时用摄像机拍摄 [英] Speechrecognition while filming with camera

查看:160
本文介绍了语音识别,同时用摄像机拍摄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序,需要拍摄,并在同一时间使用语音识别。问题是,该相机使用麦克风让语音识别API不会有存取权限麦克风。

I'm developing an android app that needs to film and use speechrecognition at the same time. The problem is, that the camera uses the microphone so the speechrecognition api wont have acces to the microphone.

我的解决办法是在相机中禁用音频和仅录制视频。这种解决方案的问题是,当使用 RecognitionListener 你不能存取权限的音频文件。

My solution was to disable the audio in the camera and only record the video. Problem with this solution is that when using the RecognitionListener you can't acces the audio file.

然后我试图使用 RecognizerIntent startActivityForResult 。这种解决方案的问题在于,该活动将打开一个弹出和相机停止工作。有没有人有一个想法如何解决这个问题。

Then i tried to use the RecognizerIntent with startActivityForResult. The problem with this solution is that the activity will open a 'pop up' and the camera stops working. Does anyone have an idea how to fix this problem.

推荐答案

在录制视频。你有没有收到什么是记录任何回调?我的意思是,如果你能接收音频,可以节省单独音频,然后通过识别器访问它。

When you record video. did you receive any callback for what is recording? I mean if you can receive audio, you can save that audio alone, and then access it by recognizer

这篇关于语音识别,同时用摄像机拍摄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆