Menu

JSGF Grammar Support in Sphinx4

Help
MikeB
2008-03-01
2012-09-22
  • MikeB

    MikeB - 2008-03-01

    Hi all,

    I was wondering what level of support Sphinx4 has for JSGF grammars? I have found that it does not seem to work in accordance to the specification, such as with the following (simple) example:

    public <action> = <first> <second>;
    <first> = hello;
    <second> = world;

    In the above, the grammar would specify that only the phrase 'hello world' is acceptable, as it needs to have the rule <first> followed by the rule <second>; neither of the rules are optional, and it isn't a choice between one or the other. However, under Sphinx4, I have found that this grammar would allow for simply 'hello' or 'world' on their own. The recogniser also seems to favour the single words over the two-word phrase.

    I HAVE found that doing something along the lines of:

    public <action> = hello world | goodbye world | ...

    will work, where I specify each required utterance in a single rule of choices, but this isn't really efficient or elegant. Luckily, I only require a very small grammar, and so writing the rules out like this isn't a problem, but for anything more complex it would be cumbersome.

    So, is this a bug or a known limitation of the support that Sphinx4 has? If it is a limitation, it needs to be documented, as I've not found any mention of this in the tutorials or general information.

    Also, I have been getting fairly low accuracy with my recognition (although I'm sure some of it relates to the grammar problems and the background noise I have to work with). I'm using the WSJ AMs, which I assume are geared towards speech with US English accents. Is this correct? If so, is there any way to adapt the AMs to my British Engish accent easily, rather than having to train a new AM?

    Thanks
    Mike

     
    • Nickolay V. Shmyrev

      >So, is this a bug or a known limitation of the support that Sphinx4 has? If it is a limitation, it needs to be documented, as I've not found any mention of this in the tutorials or general information.

      it must be a bug

      >Also, I have been getting fairly low accuracy with my recognition (although I'm sure some of it relates to the grammar problems and the background noise I have to work with). I'm using the WSJ AMs, which I assume are geared towards speech with US English accents. Is this correct? If so, is there any way to adapt the AMs to my British Engish accent easily, rather than having to train a new AM?

      Probably it's better to adapt model and use sphinx3 decoder instead of sphinx4. sphinx3 supports mllr. Also review your dictionary, probably you can improve accuracy with a slight correction.

       

Log in to post a comment.