Android Tutorial Short tip for working with voice commands

Forward Word

So, while I'm building my first app, suddenly I came over this example from Erel. Great for my app but, as you may know, even though 75% of the worlds phone calls, faxes and mails are done in english, a very select few are actually english or american. Speech-to-text is buggy even for them.
For the rest of us, it's a drudgery. When implementing text to speech in an app, you may want accuracy, finesse.

This can be done in a number of ways (I think) but I especially thought about 1.


You want users to be able to do stuff with your app. When the app detects certain keywords, something fires up. And, as you aren't doing an email writing app, you don't need the entire human dictionary.

So, when the users says: *true*! you want your app to do something.
The problem? You say: true.
App gets: on set, undressed, I'm set, upset, etc etc etc [note: gross exaggeration]



The solution?
Let's take a look at Erel's example. Specifically at the speakbutton class.

28vta28.png


6esiw.jpg

I am Doge and I approve this message!
You got it, didn't you?

Intercept the most common occurrences and voila. Not suitable in conversations with the handset but perfect for pinpoint accuracy.

I used this hack for offset. Now I can rest my phone on the table in front of me and when I say offset, in the thickest, most horrible chinese or indian accent I can fake, it still gets offset.

Now, if you want a nice alternative for asking your family members to talk like retards in fake accents around the house and log the results (like I did) you can try this:

Download muchWow.txt and open it with excel, calc or whatever strikes your fancy.

Let's say you're looking for homophones of dreaming.

You simply get a secondary column to look for words that (start with d or t) AND ( have at least 4-5 chars AND max 10 chars) AND (end in ing OR eng IND *etc) and so on.

You filter yourself a nice, respectable cell, use it on a array, store it in a db, etc etc etc.

Uses?

There's a chargeable library here. Listens on a loop. When it detects certain triggers, it does stuff.

So you build a touchless interface for a web player that connects to ****hub.com and streams entertainment media. Slap a "keep your screen clean" on top and you got a google play best seller.

PS: you can also use a phonetics dictionary to filter words. Php scripts lying somewhere on the internet.


Hope it helps someone or I just burned coding time in vain. Grr.

Best regards,
Paul
 

Attachments

  • muchWow.txt
    326.9 KB · Views: 468
Top