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 13004 times)
word recognition?
Oct 3rd, 2007, 11:30am
 
hey there,

is it in any way possible to write an applet in processing that can recognize words?
i mean: the user says something through a microphone, and processing "understands" the words?

i'm totally new to processing, so please forgive my crazy ideas.

Re: word recognition?
Reply #1 - Oct 3rd, 2007, 12:52pm
 
there is speech recognition for java .. not sure what the status of that is, nor how good it performs:

http://java.sun.com/products/java-media/speech/forDevelopers/jsapi-guide/Recognition.html

reading in (sampling) sound can be done with some of the sound libraries (all?):
http://sonia.pitaru.com/
http://code.compartmental.net/tools/minim
http://www.tree-axis.com/Ess/

talking of applet are you planning to run it as applet (web, browser) or as application?

F
Re: word recognition?
Reply #2 - Oct 5th, 2007, 7:11pm
 
thanks!
i'll have a look at the link.

i'm planning to run it as an application.
or, more exactly, i will only present it once at university.

would i be better off using something like Jitter? i do have some max/msp skills.

EDIT:
i did not find a download link for the java speech API.
am i just blind?
Re: word recognition?
Reply #3 - Oct 6th, 2007, 11:42am
 
right, sound-api is just that an API without implementations. sorry, did not see that ...
i guess you have to see if there is an implementation for your system available, os-x is missing one.

if you happen to be on os-x you should have speech recognition built-in (check your system preferences). you might be able to link that to commands that are sent to processing ...

not sure what other non-commercial products are out there that have speech-rec.

jitter is a video extension to max-msp, don't think it can do speech recognition.

F
Re: word recognition?
Reply #4 - Oct 17th, 2007, 4:58pm
 
i'm also trying to do a project that involves seeing words on screen using voice recognition. anyone had any luck?

thanks
g
Re: word recognition?
Reply #5 - Nov 29th, 2007, 11:06am
 
hi,

there is a project called voce on sourceforge.
http://voce.sourceforge.net/

I successfuly imported it to processing and it works well with its synthesising functions.

The speech recognition functions caused an "out of memory" error on my computer.
I work with a P4 processor and 512 mb ram.

I'm not sure if there is any misconfiguration but it looks like that only my RAM is the problem.

If anyone is able to run it, so please notify me here.
Re: Text to Speech
Reply #6 - Dec 1st, 2007, 11:42pm
 
You said that there is a project called voce on sourceforge.
http://voce.sourceforge.net/ and you
successfuly imported it to processing and it works well with its text to speech synthesising functions. Please make an example of what you did and post it here because the only way  I can learn how to use Processing is to play with the pde examples.
Re: word recognition?
Reply #7 - Nov 1st, 2009, 11:32pm
 
OK,

I got voce to work with processing.
The "out of memory" exception arises when I try to run it from eclipse, but I managed to compile to bytecode and run on a VM outside of eclipse without any problem.

Edit:I got it working in eclipse. the trick was to pass it the memory argument as a VM argument ("-mx256m")

The program is simple: it displays a 200x200 black square. The words "let there be light" change the background to yellow, "lights out" changes it to black and "quit" exits the program.

The java file is the following:

Code:
/// A sample application to test voce's voice recognition 
/// capabilities.
import processing.core.*;
import voce.*;

public class recognitionTest extends PApplet
{
private boolean _quit;
private boolean _on;

public void setup() {
size(200,200);
background(0);
voce.SpeechInterface.init("../../../lib", false, true,
"./grammar", "ONOFF");

System.out.println("This is a speech recognition test. "
+ "Say ON or OFF in the microphone"
+ "Speak 'quit' to quit.");

_quit = false;
_on = false;
}

public void draw() {

stroke(255);
if (_on == true) {
background(255, 204, 0);
}
else {
background(0);
}

while (voce.SpeechInterface.getRecognizerQueueSize() > 0)
{
String s = voce.SpeechInterface.popRecognizedString();
if(-1 != s.indexOf("let there be light")){
_on = true;
}
else if(-1 != s.indexOf("lights off")){
_on = false;
}


// Check if the string contains 'quit'.
if (-1 != s.indexOf("quit"))
{
_quit = true;
}

System.out.println("You said: " + s);
//voce.SpeechInterface.synthesize(s);
}
if(_quit){
voce.SpeechInterface.destroy();
System.exit(0);
}
}

public static void main(String[] argv)
{
PApplet.main(new String[] { "--location=10,40", "recognitionTest" });
}
}


This requires a grammar file in ./grammar named "ONOFF.gram"

Code:

#JSGF V1.0;

/**
* JSGF OnOff Grammar file
*/

grammar OnOff;

public <miscellaneous> = (quit);

public <ONOFF> = (let there be light | lights off) * ;


I then compiled using

javac -classpath [path to voce];[path to processing] *.java

and run it with

java
java -classpath .;[path to voce];[path to processing] -mx512m recognitionTest

Hope this can help. I'm still trying to figure this whole thing out.

Francois.
Re: word recognition?
Reply #8 - Jan 20th, 2010, 4:18pm
 
can you guys please post a newbie  guide to the installation on windows xp from downloading the voce zip to a running demo program we are many interested in this subject but nobody goes all the way with the helping hand Smiley

what i want is to know what to do with the downloaded zip from voce, where to place it, how to load it in processing, how to run a demo sketch succesfully, what should be in the sketch folder, like code, jar files, etc. how to make custom gram files etc.

come on guys who's first on making a straight out of the box guide for us java newbies (i am ok to processing but never done straight java)

the most kind regards
johannes gardsted jorgensen
Re: word recognition?
Reply #9 - Feb 9th, 2010, 11:56am
 
erata wrote on Nov 1st, 2009, 11:32pm:
I then compiled using

javac -classpath [path to voce];[path to processing] *.java

and run it with

java
java -classpath .;[path to voce];[path to processing] -mx512m recognitionTest


@Francois

I tried out your code both with processing and eclipse and in both cases i was able to run it but I got the 'outOfMemory' exception.

I didn't understand how you manage to get it to work with eclipse.. I don't know how to change the default configuration of compiling and running.

Could you explain it a little bit more in details

Thanks a lot!
Re: word recognition?
Reply #10 - Feb 9th, 2010, 11:22pm
 
Thanks for the in formations. It would be a big help.
Re: word recognition?
Reply #11 - Feb 10th, 2010, 7:08pm
 
Is there anyone there who has a ready made voice processing program?....i kinda need this one...im willing to buy if its your sale...PM me....thanks...ill be waiting
Re: word recognition?
Reply #12 - Feb 11th, 2010, 7:48pm
 
I am also willing to pay for this program... pm please
Re: word recognition?
Reply #13 - Mar 14th, 2010, 4:45pm
 
Hi,

I have voice recognition working with the Sphinx4 engine, uses basic grammar files and Open Sound Control to send messages to Processing, max/msp and arduino. I compiled it in Eclipse using ANT build scripts  and its runs as a standard jar from msdos or TERMINAL on macosx. Will post on my youtube channel in next few days,

can't display my channel here as link as this is my first post, just go to youtube and search for 'interactiveartsni'
Re: word recognition?
Reply #14 - Mar 28th, 2010, 10:01pm
 
Hey Guys,
I am having trouble getting Voce to work in processing. I am just trying to get the sample code to work posted by erata above.

I don't think I am importing voc correctly. I tried dragging the jar files and recognitionTest.java on to the processing window. But then when I try and run it I get this error:

"Cannot parse error text: File /var/floders/zk/........./recognitionTest.java is specified more than once."

I am new to this so it is likely that what I am doing wrong is very obvious to some of you! Smiley Maybe I should be using eclipse. Maybe I am not importing voc correctly.

A point in the right direction would be great!!

Thanks.
Pages: 1 2