- Home /
How to use speech recognition / speech detection to trigger an audio source on an Android device
Hello everyone,
I would like to make an Android app in Unity that has speech recognition. For instance, I would say “How are you?” to my Android phone and the app detects this specific sentence and then triggers an audiosource that says “I’m fine, thank you”.
I came across a Unity asset called “Android Native Dialogs and Functions Plugin”. Link: https://assetstore.unity.com/packages/tools/gui/android-native-dialogs-and-functions-plugin-106497
This asset contains a Speech Recognizer. I opened the example scene of this asset (Path: Assets/FantomPlugin/Demo/Scenes/SpeechRecognizerTest). The image (please see attachment) shows how this app looks like on my phone. If I tap the “Speech here” button, the microphone gets activated and picks up my speech. If I say “how are you”, the app detects my speech and translate it into a text, as seen in the text field.
The next step that I would like to achieve is that this specific written sentence (“how are you”) could somehow serve as a trigger to activate an audiosource as mentioned above. Does anyone know how this can be done?
Answer by synok · Sep 06, 2019 at 06:11 PM
Late answer maybe. If you got that far to have it recognize your speech, it cannot be hard to implement what should happen if some specific words are spoken. I guess that if you can get hold of the result, you can easily manipulate whatever should happen, that part does not really have anything to do with the actual plugin, I guess. Didn't know about it, but will check into it! @wilbertllama
Your answer
Follow this Question
Related Questions
Using the Speech Recognition Library of Android 0 Answers
How to make speech recognizer on android? 2 Answers
Speech to text 3rd party Libraries - Kaldi or Pocketsphinx? 1 Answer
Detecting audio file attached to audio source at runtime. 1 Answer
Windows speak recognition only partially working, is there a limit set to the number of phrases? 0 Answers