Search code examples
javaspeech-to-textcmusphinx

how big hello.gram file be in sphinx java


I am new to sphinx java and started with small project of employee details.Download HelloWorld program and modifying it. how to get employee id (eg : T5438,Y7651,U9085) and department ( Auto, Support , Mobile) dynamically.

How to declare below in Hello.gram file :

public <greet> = ();  

I want to know how and what words i have to add in hello.gram and how to do it dynamically

Thanks in advance


Solution

  • you can try something like below :

    public <basicCmd> = <startPolite> <command> <endPolite>;
    
    <command> = <action> <object>;
    <action> = /10/ open |/2/ close |/1/ delete |/1/ move;
    <object> = [the | a] (window | file | menu);