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

发布于 2024-12-16 21:01:38 字数 79 浏览 0 评论 0原文

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

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空名 2024-12-23 21:01:38

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

您可能需要按下一个按钮来启动语音识别意图或语音识别侦听器之一...我找不到我看到的页面,但这是一个起点:
http://developer.android.com/reference/android/speech/RecognitionListener.html

然后,当它听到语音时,它必须对其进行分析并检查它是否说“拍”,然后检查它是否确实拍了照片。

我可以想象会有一些复杂的情况,因为可能会有背景噪音,而且我不确定它将如何处理它,因为我认为意图只是坐在那里聆听!
它可能也不会立即生效,因为我很确定它必须发送到谷歌来检查所说的内容。

从我给出的页面开始,对开发人员文档进行了挖掘,并且在某个地方有一个示例展示了如何倾听用于语音,但我现在找不到它,我正在寻找。

我很好奇你发现了什么!

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

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文