Code is from sample Grammar provided by Wiki, not my original code...

On Tue, Jan 10, 2017 at 12:32 AM, Артур <findmeinwland@gmail.com> wrote:
But it's a syntax error, no? I think you need to verify your code


10.01.2017 13:26, Gonzalo Gasca Meza пишет:
> Hi all,
>
> I'm trying to install Speech Recognition engine.
>
> Version: FreeSWITCH (Version 1.6.13 -21-e755b43 64bit)
>
> Following this example:
>
> https://wiki.freeswitch.org/wiki/Mod_pocketsphinx
>
> <include>
>     <extension name="pizza_demo">
>       <condition field="destination_number" expression="^(pizza|74992)$"/>
>       <condition field="${module_exists(mod_v8)}" expression="true"/>
>       <condition field="${module_exists(mod_pocketsphinx)}"
> expression="true">
>        <action application="javascript" data="ps_pizza.js"/>
>       </condition>
>     </extension>
> </include>
>
> I'm replacing mod_spidermonkey with mod_v8 based on this document and
> when I call this number I get:
>
> EXECUTE sofia/external/14088053951@104.236.190.206
> javascript(ps_pizza.js)
> 2017-01-10 03:04:39.099748 [ERR] SpeechTools.jm:191 Exception:
> SyntaxError: Unexpected identifier (near: "                                   if
> (result.interpretation.@confidence >= grammar_object.min_score) {")
>
> If I change: result.interpretation.@confidence to
> result.interpretation.['@confidence']
>
> EXECUTE sofia/external/14088053951@104.236.190.206
> export(RFC2822_DATE=Tue, 10 Jan 2017 03:13:10 -0500)
> 2017-01-10 03:13:10.139816 [DEBUG] switch_channel.c:1296 EXPORT
> (export_vars) [RFC2822_DATE]=[Tue, 10 Jan 2017 03:13:10 -0500]
> EXECUTE sofia/external/14088053951@104.236.190.206
> javascript(ps_pizza.js)
> 2017-01-10 03:13:10.159763 [ERR] SpeechTools.jm:191 Exception:
> SyntaxError: Unexpected string (near: "                                       if
> (result.interpretation.['@confidence'] >= grammar_object.min_score) {")
>
> SpeechTools.jm from:
> https://raw.githubusercontent.com/lordnull/FreeSWITCH/master/scripts/javascript/js_modules/SpeechTools.jm
>
> Similar discussion:
> http://lists.freeswitch.org/pipermail/freeswitch-users/2014-June/105818.html
>
> Any pointers?
> I get the mod_v8 module compiled from Freeswitch using this:
> https://freeswitch.org/confluence/display/FREESWITCH/mod_v8
>
> Thanks
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting@freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org