willblaschko / AlexaAndroid

A library and sample app to abstract access to the Amazon Alexa service for Android applications.
GNU General Public License v2.0
280 stars 132 forks source link

wake up alexa without tap the button to start listening #130

Open wantitmore opened 6 years ago

wantitmore commented 6 years ago

how to wake up the app to start listening by voice directly rather than tapping the button? thx :)

KushtrimPacaj commented 6 years ago

https://github.com/alexa/alexa-avs-sample-app

You can get wakewords from Kitt.AI or Sensory. Tried them both, sensory seemed more reliable.

tatasadi commented 6 years ago

@KushtrimPacaj Did you combine these two wakeword engins with AlexaAndroid? Can you describe what you did? Can you post an example of your code. It would be much appreciated.

KushtrimPacaj commented 6 years ago

@Ehsanta83 See this https://github.com/Kitt-AI/snowboy/tree/master/examples/Android for Kitt.Ai.

For Sensory, I'm afraid you'll have to contact them directly.

To combine them with this library, on the callback from wakeword lib, just "click" the alexa button.

tatasadi commented 6 years ago

@KushtrimPacaj Thank you. I did the same thing with another library. Another problem is end of speech detection. I want it to be complete handsfree. Do you have any idea about end of speach detection? I would like not to click the button at the end of speech.

KushtrimPacaj commented 6 years ago

@Ehsanta83 A simple way is included in this library ( check the method here ): https://github.com/willblaschko/AlexaAndroid/blob/35f259b9e1484b340498312ea0ba5bf6a2ddaca2/libs/speechutils-master/app/src/main/java/ee/ioc/phon/android/speechutils/AbstractAudioRecorder.java#L217

It's not optimal, so you might have to tinker with it to get the result you want