Results 1 to 5 of 5
  1. #1
    treeface99 is offline Member
    Join Date
    Jan 2012
    Posts
    12
    Rep Power
    0

    Default 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

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    5

    Default 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.

  3. #3
    treeface99 is offline Member
    Join Date
    Jan 2012
    Posts
    12
    Rep Power
    0

    Default Re: Sphinx HelloWorld - How can I add my own speech files?

    great thanks!

  4. #4
    treeface99 is offline Member
    Join Date
    Jan 2012
    Posts
    12
    Rep Power
    0

    Default 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".

    Thanks
    Last edited by treeface99; 01-29-2012 at 12:11 AM.

  5. #5
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    5

    Default 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
    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>
    this part you have to change!
    -> hello.gram
    Java Code:
            <property name="grammarLocation" 
                 value="your/package/here/"/>
            <property name="grammarName" value="hello"/>
    the grammar file could be (i think):
    Java Code:
    #JSGF V1.0;
    /**
    * JSGF Grammar for Hello World example
    */
    grammar hello;
     
    public <choose> = (Twist | Stick);

Similar Threads

  1. How to Run HelloWorld program?
    By siji44 in forum New To Java
    Replies: 8
    Last Post: 03-24-2010, 08:09 AM
  2. sphinx-4 with JCreator
    By nassir in forum JCreator
    Replies: 0
    Last Post: 03-04-2010, 06:29 AM
  3. HelloWorld in EJB!
    By bdtagar in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 01-04-2010, 11:55 AM
  4. About Java HelloWorld
    By Dankydoo in forum New To Java
    Replies: 0
    Last Post: 01-11-2009, 10:08 PM
  5. Run a helloWorld in NetBeans
    By mathias in forum NetBeans
    Replies: 1
    Last Post: 08-07-2007, 01:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •