Search code examples
javaxmlswingspeech-to-textspeech-synthesis

How to locate the grammar file in sphinx java


i am making a speech to text application using sphinx But the location of the grammar file in the config.xml is not correct or i am not getting the right path.

<!-- ******************************************************** -->
    <!-- The Grammar  configuration                               -->
    <!-- ******************************************************** -->

    <component name="jsgfGrammar" type="edu.cmu.sphinx.jsapi.JSGFGrammar">
        <property name="dictionary" value="dictionary"/>
        <property name="grammarLocation" 
             value="resource:/com/stt/project/" />
        <property name="grammarName" value="Grammer"/>
    <property name="logMath" value="logMath"/>
    </component>

The structure of the files are in the image here : File Hiererchy of the project

This problem has been resolved by using the cmusphinx api


Solution

  • You can look at CMUSphinks api for Speech-to-text as it seems all the implementations at the moment are for the other way around.