Android Question SpeechRecognizer language

brelto85

Active Member
Licensed User
Longtime User
Hi all,

I use the SpeechRecognizer library but i don't find the language setting?
How to sets it?

thanks
Alberto
 

brelto85

Active Member
Licensed User
Longtime User
Anyone know this?
Also in this link is asked the same thing but the author seems not to answer

Is very important (essential) in my opinion for a library to handle speech recognition languages
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Hi,
I think the library is not a voice recognition engine, but it merely sends the spoken words to Google server
and then returns the received reco.
Check the library and see if there is a way to also send formatting tags or language IDs.. I didn't check that
as I am not working with voice reco.
 
Upvote 0

XverhelstX

Well-Known Member
Licensed User
Longtime User
Hi

My apologies.
As stated on the topic, you could create your own intent and pass it as a parameter in the method.
You can find all constants here:
http://developer.android.com/reference/android/speech/RecognizerIntent.html

B4X:
Dim sr As SpeechRecognizer
sr.Initialize("SpeechRecog")

Dim i As Intent
'Initialize intent through the constants of the API
i.Initialize("android.speech.action.RECOGNIZE_SPEECH", "")
i.PutExtra("android.speech.extra.LANGUAGE_MODEL", "free_form")
i.PutExtra("calling_package", "your package name")
i.PutExtra("android.speech.extra.MAX_RESULTS", 5)
i.PutExtra("android.speech.extra.LANGUAGE", "en-US")
sr.StartListening(sr.CreateRecognizeIntent2(i)) 'This will create a recognizer intent based on your custom one.

I will look into this matter as soon when I have the time.
 
Upvote 0
Top