thilip an
thilip an

Reputation: 46

Issue in Freeswitch ASR with mod_unimrcp

While using mod_unimrcp in freeswitch (with license) in lua script, speech is detected but not matched correctly with grammar. It shows 001-no match,but actually it matches with grammar. While trying in javascript, grammar does not load and speech does not detect. How can I solve this? Exception: SyntaxError: missing ) after the argument list "

session.execute("play_and_detect_speech") data=(/thilip/welcome.wavdetect:unimrcp:uni2 {start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000} file:// /usr/local/freeswitch/grammar/sr.gram language=en-US;y=1;n=2 "

this is the line

Upvotes: 0

Views: 462

Answers (1)

Piglet
Piglet

Reputation: 28950

session.execute("play_and_detect_speech") is syntactically correct.

data=(/thilip/welcome.wavdetect:unimrcp:uni2 {start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000} file:// /usr/local/freeswitch/grammar/sr.gram language=en-US;y=1;n=2 " is not.

The only way to turn this into valid Lua code is to assign a string to data.

data="(/thilip/welcome.wavdetect:unimrcp:uni2 {start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000} file:// /usr/local/freeswitch/grammar/sr.gram language=en-US;y=1;n=2 "

You cannot have something like data=(/thili... and you cannot have a single double quote nor anyhting else of that stuff outside a string.

Upvotes: 0

Related Questions