Hello,
I installed FreeSwitch and enabled PocketSphinx and Javascript modules successfully. When I called an extension to execute the default Pizza demo program (Java script), I am getting the below error:
EXECUTE [depth=0] sofia/chandramouli/1101@test.abc.in:5072 javascript(ps_pizza.js)
2024-03-09 18:32:09.423106 99.27% [ERR] undefined:188 Exception: SyntaxError: Invalid or unexpected token (near: " console_log("debug", "----Hit score " + result.interpretation.@confidence + "/" + ")
2024-03-09 18:32:09.423106 99.27% [NOTICE] switch_core_state_machine.c:382 sofia/chandramouli/1101@test.abc.in:5072 has executed the last dialplan instruction, hanging up.
Based on the error line number in console log, I noticed that It is showing the error in scripts/js_modules/SpeechTools.jm file at the below line:
console_log("debug", "----Hit score " + result.interpretation.@confidence + "/" +
grammar_object.min_score + "/" + grammar_object.confirm_score + "\n");
I haven't changed anything in the source code. Is there any issue in the above source code? Any help would be appreciated. Thank you.
Best Regards,
Chandramouli.
I installed FreeSwitch and enabled PocketSphinx and Javascript modules successfully. When I called an extension to execute the default Pizza demo program (Java script), I am getting the below error:
EXECUTE [depth=0] sofia/chandramouli/1101@test.abc.in:5072 javascript(ps_pizza.js)
2024-03-09 18:32:09.423106 99.27% [ERR] undefined:188 Exception: SyntaxError: Invalid or unexpected token (near: " console_log("debug", "----Hit score " + result.interpretation.@confidence + "/" + ")
2024-03-09 18:32:09.423106 99.27% [NOTICE] switch_core_state_machine.c:382 sofia/chandramouli/1101@test.abc.in:5072 has executed the last dialplan instruction, hanging up.
Based on the error line number in console log, I noticed that It is showing the error in scripts/js_modules/SpeechTools.jm file at the below line:
console_log("debug", "----Hit score " + result.interpretation.@confidence + "/" +
grammar_object.min_score + "/" + grammar_object.confirm_score + "\n");
I haven't changed anything in the source code. Is there any issue in the above source code? Any help would be appreciated. Thank you.
Best Regards,
Chandramouli.