Adding external dictionary to Aka.Listen

Will84's icon

Hi,

Does anyone know if it's possible to add an external dictionary or text file to aka.listen rather than having to input a word or phrase one by one in a message box?

Any help would be great...thanks.

Macciza's icon

Not sure but there is a recognize object that does allow easier adding of words in grammar files . . .
Cheers

Will84's icon

I had a look at recognize, but i couldn't seem to get it to output actually text, it just seems to display phonetics. Any ideas on how to input a sound input from a microphone to output text from it?
Thanks.

Olivier Pasquet's icon

Hello,

This external is for both words and phonemes.
The easiest and most efficient way is to specify your words and/or their order in a grammar text file. Look at any *.gram file example and do the same thing with your own words. These files are in the distribution.
Basically each word has to be separated by a parenthesis; each possibility (or) by a I.
For advanced users, more info about the grammar syntax here :
http://java.sun.com/products/java-media/speech/forDevelopers/JSGF/JSGF.html

You first have to record the voice into a buffer~ using record~ for instance. You can then do the speech recognition. Try using two instances and silence detection for switching from one to another if you want an audio stream to be recognized.