I am trying to integrate speech recognition to my camera app, more specifically I want my camera to open up and you click a button "Listen" and it listens for the word "snap" and then it takes a picture. I have a button on the app already, it is just adding the voice portion to it. How do you get it to check for specfic words?
feedback
|
Refer http://developer./resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html It shows how to add Voice Recognition to your app. http://developer./reference/android/speech/package-summary.html This package is useful for a reference too. | |||
feedback
|
This shows a complete usage of TTS and Speech Recognition https://github.com/gmilette/Say-the-Magic-Word- Also you need the following: A simple way to match is to use this loop:
and this class:
And your activity needs this:
| |||||
Was this post useful to you?
|
To actually take the photo once you get the signal that the user has said 'Snap' you have to implement a replacement for the Camera app. You can look at the Camera preview sample app (in API Demos / graphics) to see how to show the preview image. And the Camera class overview has detailed information on how to actually capture the image. | |||
feedback
|