We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 
word recognition? (Read 13003 times)
Re: word recognition?
Reply #15 - Apr 1st, 2010, 10:49pm
 
Thanks for all the information. The replies had been quite helpful for me.
Re: word recognition?
Reply #16 - Apr 19th, 2010, 2:44pm
 
Has anyone gotten this to work with processing?  If so can you post up the pde?  It would be insanely helpful.
Re: word recognition?
Reply #17 - May 24th, 2010, 6:41am
 
Hi!

I'm using Voce and it's very very powerful!!

These are some useful steps:
. extract the Voce.zip into the processing library;
. rename the "lib" directory into "library";
. copy, paste and save the sketch below;
. create a dir for "*.gram" file (fill it with code at the end of page) into sketch dir;
. set the right paths;
. enjoy it!

The Sketch:
Code:

import voce.*;

void setup() {
 size(200,200);
 background(0);
 voce.SpeechInterface.init("[Voce library Path]", true, true,
 "[grammar Path]", "[grammar file name]");
 System.out.println("This is a speech recognition test. ");
}

void draw() {
 stroke(255);
 while (voce.SpeechInterface.getRecognizerQueueSize() > 0){
   String s = voce.SpeechInterface.popRecognizedString();
   println("You said: " + s);
   voce.SpeechInterface.synthesize(s);
 }
}



Grammar file:
Code:

#JSGF V1.0;

/**
* JSGF Test Grammar file
*/

grammar Test;

public <TEST> = (hi | one | two | ok) * ;
Re: word recognition?
Reply #18 - Jun 15th, 2010, 9:40am
 
Hello Saki_Kawa,
I can't seem to make it work, I keep getting errors that I don't know where they originate.

Believing it was a path problems I have tried many different combinations, could you give an example including paths?

Code:
[Voce ERROR] Cannot configure speech recognizer: 
Property Exception component:'jsgfGrammar' property:'grammarLocation' - value (C:/Documents and Settings/Administrator/My Documents/Processing/testvoce/grammar/) is not a valid Resource


and my config:
Code:
  voce.SpeechInterface.init("c:/Program Files/processing/libraries/voce/library/", true, true, 
 "C:/Documents and Settings/Administrator/My Documents/Processing/testvoce/grammar/", "gram");
 System.out.println("This is a speech recognition test. ");
Pages: 1 2