I’m having a problem with a grammar script.
public <final_rule> = ( <s1> | <s2> | <s3> | <s4> | <s5> | <s6> ) <element> ( <f1> | <f2> | <f3> | <f4> | <f5> );
<s1> = <count> <shape>;
<s2> = <count> <direction>;
<s3> = <count> <direction> <shape>;
<s4> = <shape>;
<s5> = <direction>;
<s6> = <direction> <shape>;
<f1> = <range> <rate>;
<f2> = <range> <rate> <intent>;
<f3> = <range> <intent>;
<f4> = <intent>;
<f5> = <count>;
<element> = ( roth | mara | corda | ashti | kava | dolo | hana );
<shape> = ( vort | para | nama | haku | mado );
<direction> = ( chiya | kanto | vanti | bren );
<count> = ( mapa | haya );
<range> = ( juna | toda | wato );
<intent> = ( dema | cora | seto );
<rate> = ( gen | turb | rata );
Is anyone able to see what’s wrong with that? The words all exist in the dictionary and if I Enable Grammar Mode with the “numbers” script it starts fine. But if I use the script above I get “Speech recognition thread failed to start”.
Is there any way to debug this?
Edit: fixed it. I’ll share how I debugged it since it’s pretty non-obvious.
Even if you’re using grammar mode, switch to keyword mode and feed it all of your new words in a word list. Then comment all of your new words out in the .dict file using a semi-colon ;
After that, re-enable them one at a time and hit play. If it “fails to start utterance” then your syllables in the word you just uncommented are wrong. I kept getting caught out by G (should be JH), H (HH) and O (OW).