<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
You can debug it by yourself, print to console different values.
Explore the code.<br>
<br>
<br>
<div class="moz-cite-prefix">11.01.2017 11:07, Gonzalo Gasca Meza
пишет:<br>
</div>
<blockquote
cite="mid:CAL+DTg+4eBpfjPyyqKOiMymg5KMXoE5a0uvq8S8CUKoOvPPtmg@mail.gmail.com"
type="cite">
<div dir="ltr">I renamed<span
style="color:rgb(36,39,41);font-family:arial,"helvetica
neue",helvetica,sans-serif;font-size:13px"> @confidence
to confidence helped solving this specific issue but still
getting errors when reading result.interpretation.</span>
<div><span
style="color:rgb(36,39,41);font-family:arial,"helvetica
neue",helvetica,sans-serif;font-size:13px"><br>
</span></div>
<div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif">2017-01-11 00:52:52.739773 [DEBUG]
mod_pocketsphinx.c:464 Recognized: takeout, Confidence:
99, Confidence-Threshold: 0</font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif">2017-01-11 00:52:52.759764 [DEBUG]
SpeechTools.jm:188 ----XML:</font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"><br>
</font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"><result
grammar="pizza_order"></font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"> <interpretation
grammar="pizza_order" confidence="99"></font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"> <input
mode="speech">takeout</input></font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"> </interpretation></font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"></result></font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"><br>
</font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif">2017-01-11 00:52:52.759764 [CRIT]
SpeechTools.jm:214 ----ERROR:</font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif">TypeError: Cannot read property
'interpretation' of undefined</font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif">2017-01-11 00:52:55.559759 [NOTICE]
sofia.c:1011 Hangup sofia/external/<a
moz-do-not-send="true"
href="mailto:14088053951@104.236.190.206">14088053951@104.236.190.206</a>
[CS_EXECUTE] [NORMAL_CLEARING]</font></div>
</div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"><br>
</font></div>
<div><font color="#242729" face="arial, helvetica neue,
helvetica, sans-serif"><br>
</font></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 10, 2017 at 12:37 AM,
Gonzalo Gasca Meza <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:gascagonzalo@gmail.com" target="_blank">gascagonzalo@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Code is from sample Grammar provided by Wiki,
not my original code...</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 10, 2017 at 12:32
AM, Артур <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:findmeinwland@gmail.com"
target="_blank">findmeinwland@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">But
it's a syntax error, no? I think you need to
verify your code<br>
<br>
<br>
10.01.2017 13:26, Gonzalo Gasca Meza пишет:<br>
<div class="m_4723325926794957998HOEnZb">
<div class="m_4723325926794957998h5">> Hi
all,<br>
><br>
> I'm trying to install Speech Recognition
engine.<br>
><br>
> Version: FreeSWITCH (Version 1.6.13
-21-e755b43 64bit)<br>
><br>
> Following this example:<br>
><br>
> <a moz-do-not-send="true"
href="https://wiki.freeswitch.org/wiki/Mod_pocketsphinx"
rel="noreferrer" target="_blank">https://wiki.freeswitch.org/wi<wbr>ki/Mod_pocketsphinx</a><br>
><br>
> <include><br>
> <extension name="pizza_demo"><br>
> <condition
field="destination_number"
expression="^(pizza|74992)$"/><br>
> <condition
field="${module_exists(mod_v8)<wbr>}"
expression="true"/><br>
> <condition
field="${module_exists(mod_poc<wbr>ketsphinx)}"<br>
> expression="true"><br>
> <action
application="javascript"
data="ps_pizza.js"/><br>
> </condition><br>
> </extension><br>
> </include><br>
><br>
> I'm replacing mod_spidermonkey with
mod_v8 based on this document and<br>
> when I call this number I get:<br>
><br>
> EXECUTE sofia/external/<a
moz-do-not-send="true"
href="mailto:14088053951@104.236.190.206"
target="_blank">14088053951@104<wbr>.236.190.206</a><br>
> javascript(ps_pizza.js)<br>
> 2017-01-10 03:04:39.099748 [ERR]
SpeechTools.jm:191 Exception:<br>
> SyntaxError: Unexpected identifier (near:
" if<br>
> (result.interpretation.@confid<wbr>ence
>= grammar_object.min_score) {")<br>
><br>
> If I change:
result.interpretation.@confide<wbr>nce to<br>
> result.interpretation.['@confi<wbr>dence']<br>
><br>
> EXECUTE sofia/external/<a
moz-do-not-send="true"
href="mailto:14088053951@104.236.190.206"
target="_blank">14088053951@104<wbr>.236.190.206</a><br>
> export(RFC2822_DATE=Tue, 10 Jan 2017
03:13:10 -0500)<br>
> 2017-01-10 03:13:10.139816 [DEBUG]
switch_channel.c:1296 EXPORT<br>
> (export_vars) [RFC2822_DATE]=[Tue, 10 Jan
2017 03:13:10 -0500]<br>
> EXECUTE sofia/external/<a
moz-do-not-send="true"
href="mailto:14088053951@104.236.190.206"
target="_blank">14088053951@104<wbr>.236.190.206</a><br>
> javascript(ps_pizza.js)<br>
> 2017-01-10 03:13:10.159763 [ERR]
SpeechTools.jm:191 Exception:<br>
> SyntaxError: Unexpected string (near: "
if<br>
> (result.interpretation.['@conf<wbr>idence']
>= grammar_object.min_score) {")<br>
><br>
> SpeechTools.jm from:<br>
> <a moz-do-not-send="true"
href="https://raw.githubusercontent.com/lordnull/FreeSWITCH/master/scripts/javascript/js_modules/SpeechTools.jm"
rel="noreferrer" target="_blank">https://raw.githubusercontent.<wbr>com/lordnull/FreeSWITCH/master<wbr>/scripts/javascript/js_modules<wbr>/SpeechTools.jm</a><br>
><br>
> Similar discussion:<br>
> <a moz-do-not-send="true"
href="http://lists.freeswitch.org/pipermail/freeswitch-users/2014-June/105818.html"
rel="noreferrer" target="_blank">http://lists.freeswitch.org/pi<wbr>permail/freeswitch-users/2014-<wbr>June/105818.html</a><br>
><br>
> Any pointers?<br>
> I get the mod_v8 module compiled from
Freeswitch using this:<br>
> <a moz-do-not-send="true"
href="https://freeswitch.org/confluence/display/FREESWITCH/mod_v8"
rel="noreferrer" target="_blank">https://freeswitch.org/conflue<wbr>nce/display/FREESWITCH/mod_v8</a><br>
><br>
> Thanks<br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>______________________________<wbr>_____________<br>
> Professional FreeSWITCH Consulting
Services:<br>
> <a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org"
target="_blank">consulting@freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com"
rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a moz-do-not-send="true"
href="http://www.freeswitch.org"
rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://confluence.freeswitch.org"
rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
> <a moz-do-not-send="true"
href="http://www.cluecon.com"
rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org"
target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
> UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
> <a moz-do-not-send="true"
href="http://www.freeswitch.org"
rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org"
target="_blank">consulting@freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com"
rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a moz-do-not-send="true"
href="http://www.freeswitch.org"
rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://confluence.freeswitch.org"
rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a moz-do-not-send="true"
href="http://www.cluecon.com"
rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org"
target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
<a moz-do-not-send="true"
href="http://www.freeswitch.org"
rel="noreferrer" target="_blank">http://www.freeswitch.org</a></div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a></pre>
</blockquote>
<br>
</body>
</html>