<div dir="ltr">Code is from sample Grammar provided by Wiki, not my original code...</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 10, 2017 at 12:32 AM, Артур <span dir="ltr">&lt;<a href="mailto:findmeinwland@gmail.com" target="_blank">findmeinwland@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">But it&#39;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="HOEnZb"><div class="h5">&gt; Hi all,<br>
&gt;<br>
&gt; I&#39;m trying to install Speech Recognition engine.<br>
&gt;<br>
&gt; Version: FreeSWITCH (Version 1.6.13 -21-e755b43 64bit)<br>
&gt;<br>
&gt; Following this example:<br>
&gt;<br>
&gt; <a href="https://wiki.freeswitch.org/wiki/Mod_pocketsphinx" rel="noreferrer" target="_blank">https://wiki.freeswitch.org/<wbr>wiki/Mod_pocketsphinx</a><br>
&gt;<br>
&gt; &lt;include&gt;<br>
&gt;     &lt;extension name=&quot;pizza_demo&quot;&gt;<br>
&gt;       &lt;condition field=&quot;destination_number&quot; expression=&quot;^(pizza|74992)$&quot;/&gt;<br>
&gt;       &lt;condition field=&quot;${module_exists(mod_v8)<wbr>}&quot; expression=&quot;true&quot;/&gt;<br>
&gt;       &lt;condition field=&quot;${module_exists(mod_<wbr>pocketsphinx)}&quot;<br>
&gt; expression=&quot;true&quot;&gt;<br>
&gt;        &lt;action application=&quot;javascript&quot; data=&quot;ps_pizza.js&quot;/&gt;<br>
&gt;       &lt;/condition&gt;<br>
&gt;     &lt;/extension&gt;<br>
&gt; &lt;/include&gt;<br>
&gt;<br>
&gt; I&#39;m replacing mod_spidermonkey with mod_v8 based on this document and<br>
&gt; when I call this number I get:<br>
&gt;<br>
&gt; EXECUTE sofia/external/<a href="mailto:14088053951@104.236.190.206">14088053951@<wbr>104.236.190.206</a><br>
&gt; javascript(ps_pizza.js)<br>
&gt; 2017-01-10 03:04:39.099748 [ERR] SpeechTools.jm:191 Exception:<br>
&gt; SyntaxError: Unexpected identifier (near: &quot;                                   if<br>
&gt; (result.interpretation.@<wbr>confidence &gt;= grammar_object.min_score) {&quot;)<br>
&gt;<br>
&gt; If I change: result.interpretation.@<wbr>confidence to<br>
&gt; result.interpretation.[&#39;@<wbr>confidence&#39;]<br>
&gt;<br>
&gt; EXECUTE sofia/external/<a href="mailto:14088053951@104.236.190.206">14088053951@<wbr>104.236.190.206</a><br>
&gt; export(RFC2822_DATE=Tue, 10 Jan 2017 03:13:10 -0500)<br>
&gt; 2017-01-10 03:13:10.139816 [DEBUG] switch_channel.c:1296 EXPORT<br>
&gt; (export_vars) [RFC2822_DATE]=[Tue, 10 Jan 2017 03:13:10 -0500]<br>
&gt; EXECUTE sofia/external/<a href="mailto:14088053951@104.236.190.206">14088053951@<wbr>104.236.190.206</a><br>
&gt; javascript(ps_pizza.js)<br>
&gt; 2017-01-10 03:13:10.159763 [ERR] SpeechTools.jm:191 Exception:<br>
&gt; SyntaxError: Unexpected string (near: &quot;                                       if<br>
&gt; (result.interpretation.[&#39;@<wbr>confidence&#39;] &gt;= grammar_object.min_score) {&quot;)<br>
&gt;<br>
&gt; SpeechTools.jm from:<br>
&gt; <a 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/<wbr>master/scripts/javascript/js_<wbr>modules/SpeechTools.jm</a><br>
&gt;<br>
&gt; Similar discussion:<br>
&gt; <a href="http://lists.freeswitch.org/pipermail/freeswitch-users/2014-June/105818.html" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>pipermail/freeswitch-users/<wbr>2014-June/105818.html</a><br>
&gt;<br>
&gt; Any pointers?<br>
&gt; I get the mod_v8 module compiled from Freeswitch using this:<br>
&gt; <a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_v8" rel="noreferrer" target="_blank">https://freeswitch.org/<wbr>confluence/display/FREESWITCH/<wbr>mod_v8</a><br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>______________________________<wbr>_____________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
&gt; <a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
&gt; <a 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 href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></div></div></blockquote></div><br></div>