Results 1 to 5 of 5
- 01-28-2012, 06:44 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 12
- Rep Power
- 0
Sphinx HelloWorld - How can I add my own speech files?
Hi,
I have created a blackjack playing Lego NXT robot using the Lejos NXJ playform. I thought it would be great if my robot could respond to voice commands, so I installed sphinx and have the HelloWorld demo up and running in eclipse.
All I need my robot to respond to is "Stick" and "Twist". I cant seem to find any tutorials for creating my own recognition program. Am I able to modify the HelloWorld demo code to enable it to recognise "Stick" and "Twist" voice files?.
If not, what is the simplest way of achieving this?
Thanks in advance
- 01-28-2012, 06:47 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Re: Sphinx HelloWorld - How can I add my own speech files?
Maybe this helps: Speech to Text Conversion in Java | Swarm of XeBees
You have to create a grammar file and have to use it in the configuration file.
- 01-28-2012, 07:16 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 12
- Rep Power
- 0
Re: Sphinx HelloWorld - How can I add my own speech files?
great thanks!
- 01-28-2012, 10:17 PM #4
Member
- Join Date
- Jan 2012
- Posts
- 12
- Rep Power
- 0
Re: Sphinx HelloWorld - How can I add my own speech files?
Thanks aRaaaa, 'Speech to Text Conversion in Java | Swarm of XeBees' showed me where the file is with all vocabulary in it and the vocab I need to include ("stick" & "Twist") is already in that file.
Can anyone advise me on how I can change the grammar file and the configure file?
All I want the program to do is recognise "stick" an "Twist".
ThanksLast edited by treeface99; 01-29-2012 at 12:11 AM.
- 01-29-2012, 12:54 PM #5
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Re: Sphinx HelloWorld - How can I add my own speech files?
I think all your questions are explained on the page ?!
The example configuration file can be downloaded here: http://xebee.xebia.in/wp-content/upl...rld.config.txt
this part you have to change!Java Code:<!-- ******************************************************** --> <!-- The Grammar configuration --> <!-- ******************************************************** --> <component name="jsgfGrammar" type="edu.cmu.sphinx.jsapi.JSGFGrammar"> <property name="dictionary" value="dictionary"/> <property name="grammarLocation" value="src/main/java/com/hi/open_name_speech_to_text_convertor/"/> <property name="grammarName" value="hello"/> <property name="logMath" value="logMath"/> </component>
-> hello.gram
the grammar file could be (i think):Java Code:<property name="grammarLocation" value="your/package/here/"/> <property name="grammarName" value="hello"/>
Java Code:#JSGF V1.0; /** * JSGF Grammar for Hello World example */ grammar hello; public <choose> = (Twist | Stick);
Similar Threads
-
How to Run HelloWorld program?
By siji44 in forum New To JavaReplies: 8Last Post: 03-24-2010, 08:09 AM -
sphinx-4 with JCreator
By nassir in forum JCreatorReplies: 0Last Post: 03-04-2010, 06:29 AM -
HelloWorld in EJB!
By bdtagar in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 01-04-2010, 11:55 AM -
About Java HelloWorld
By Dankydoo in forum New To JavaReplies: 0Last Post: 01-11-2009, 10:08 PM -
Run a helloWorld in NetBeans
By mathias in forum NetBeansReplies: 1Last Post: 08-07-2007, 01:16 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks