如何让我的相机应用程序用我的声音拍照?

时间:2022-03-20 09:16:50

I am trying to create an app which uses the camera, which I believe I have up and running, I want to be able to say snap and it works as the shutter and takes a picture.... Any help would be great help.

我正在尝试创建一个使用相机的应用程序,我相信我已经启动并运行,我希望能够说快照并且它可以作为快门并拍照......任何帮助都会有很大的帮助。

1 个解决方案

#1


0  

Now this is just guessing as it is not something I have done, but I have been reading up on voice recognition.

现在这只是猜测,因为它不是我做过的事情,但我一直在阅读语音识别。

You'd probably need to press a button that would start a voice recognition intent or one of the speech recognition listeners... I can't find the page I saw it, but this is a starting point: http://developer.android.com/reference/android/speech/RecognitionListener.html

您可能需要按一个启动语音识别意图的按钮或其中一个语音识别监听器......我找不到我看到的页面,但这是一个起点:http://开发人员。 android.com/reference/android/speech/RecognitionListener.html

Then when it hears speech it will have to analyse it and check if it said "snap", then if it did take a photo.

然后当它听到语音时,它将不得不分析它并检查它是否说“快照”,然后如果它确实拍了照片。

I can imagine there will be some complications as there may be background noise and I'm not sure how it would handle it as I think the intent just sits there listening! It probably wouldn't be immediate either as I am pretty sure it has to send off to google to check what was said..

我可以想象会有一些复杂因素,因为可能存在背景噪音而且我不确定它会如何处理它,因为我认为意图只是坐在那里听!它可能不会立即,因为我很确定它必须发送到谷歌检查说什么..

Starting at the page I gave have a dig around the developer docs and there an example there somewhere showing how to listen for speech, but I can't find it now I'm looking again.

从我给出的页面开始挖掘开发人员文档,并在那里展示如何听取语音的示例,但我现在找不到它我正在寻找。

I am curious what you find!

我很好奇你找到了什么!

#1


0  

Now this is just guessing as it is not something I have done, but I have been reading up on voice recognition.

现在这只是猜测,因为它不是我做过的事情,但我一直在阅读语音识别。

You'd probably need to press a button that would start a voice recognition intent or one of the speech recognition listeners... I can't find the page I saw it, but this is a starting point: http://developer.android.com/reference/android/speech/RecognitionListener.html

您可能需要按一个启动语音识别意图的按钮或其中一个语音识别监听器......我找不到我看到的页面,但这是一个起点:http://开发人员。 android.com/reference/android/speech/RecognitionListener.html

Then when it hears speech it will have to analyse it and check if it said "snap", then if it did take a photo.

然后当它听到语音时,它将不得不分析它并检查它是否说“快照”,然后如果它确实拍了照片。

I can imagine there will be some complications as there may be background noise and I'm not sure how it would handle it as I think the intent just sits there listening! It probably wouldn't be immediate either as I am pretty sure it has to send off to google to check what was said..

我可以想象会有一些复杂因素,因为可能存在背景噪音而且我不确定它会如何处理它,因为我认为意图只是坐在那里听!它可能不会立即,因为我很确定它必须发送到谷歌检查说什么..

Starting at the page I gave have a dig around the developer docs and there an example there somewhere showing how to listen for speech, but I can't find it now I'm looking again.

从我给出的页面开始挖掘开发人员文档,并在那里展示如何听取语音的示例,但我现在找不到它我正在寻找。

I am curious what you find!

我很好奇你找到了什么!