Javadoc link
Setup

example

 

This speech recognizer service is accurate in noisy environment, fast and globalized. It can worky OFFLINE if needed.
With or without external microphone ( wireless or jack ) 
Apk not tested on a lot of real devices, it's beta for now. Please report for bad results.

This can save precious ram & cpu on a "small" machine because external process chrome not used.

This depend on an external device : an android phone ( with or without sim ). 

Socket ( single connection ) is used between the server ( mrl ) and the device , so you need a shared network connection between client & server. Multiple solutions :

- 1 Phone is on the same wifi as the robot

- 2 Wifi modem ( shared connection )

- 3 Usb modem

- 4 Nat

- 5 Mqtt

Set Server IP from preferences and relaunch app ( server ip displayed from swingui tab ) :

If you want offline recognition you need to download offline language pack recognition:

You can also check useful options like offensive words and Bluetooth devices .

This is based on MaVo project, thank to him : http://myrobotlab.org/content/voice-recognition-android-programab-mrl-s…

APK : https://github.com/moz4r/SpeechRecognitionMRL/blob/master/app/release/a…
Client sources : https://github.com/moz4r/SpeechRecognitionMRL

Example code (from branch develop):
#########################################
# AndroidSpeechRecognition.py
# more info @: http://myrobotlab.org/service/AndroidSpeechRecognition
#########################################
 
# start the service
androidspeechrecognition = runtime.start("androidspeechrecognition","AndroidSpeechRecognition")
 
# start mouth
marySpeech = runtime.start("marySpeech", "MarySpeech")
 
# shutdown microphone if robot speaking
androidspeechrecognition.attach(marySpeech)
 
# auto rearm microphone
androidspeechrecognition.setAutoListen(True)
androidspeechrecognition.addCommand("turn on the light", "python", "lightOn")
androidspeechrecognition.addCommand("turn off the light", "python", "lightOff")
 
def lightOn():
  marySpeech.speakBlocking("light is on")
 
def lightOff():
  marySpeech.speakBlocking("light is off")

Ray.Edgley

6 years 11 months ago

Just tested this with a Samsung Galaxy Tab A (2016) with S Pen, no sim installed and Bluetooth head set.

Works a treat with both Auto Listening on and off. Works as advertised.

This is awesome..