<div dir="ltr">João,<div><br></div><div>O cadastro já tenho somente não sabia que realmente tenho que está escrito no grupo
<span style="color:rgba(0,0,0,0.85);font-family:"Helvetica Neue";font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">chromium-dev , me escrevendo neste grupo eu preciso pedir algo nele ?</span></div><div><span style="color:rgba(0,0,0,0.85);font-family:"Helvetica Neue";font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-01 14:47 GMT-03:00 Jose <span dir="ltr"><<a href="mailto:jasanchez113@gmail.com" target="_blank">jasanchez113@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Voce precisa ter o cadastro no google , precisa também se inscrever no grupo <span style="color:rgba(0,0,0,0.85098);font-family:'Helvetica Neue'">chromium-dev</span><span class=""><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal"><div style="line-height:normal"><div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif">Atenciosamente<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"> </span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif">Eng. Jose Antonio Sanchez<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif">Erimat Oeste Telecom<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="http://www.pbxerix.com.br" style="color:purple" target="_blank">www.pbxerix.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="http://www.virtualpbxip.com.br" style="color:purple" target="_blank">www.virtualpbxip.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="http://www.erimatoeste.com.br" style="color:purple" target="_blank">www.erimatoeste.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="mailto:jasanchez@terra.com.br" style="color:purple" target="_blank">jasanchez@terra.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="tel:(17)%202139-3970" value="+551721393970" target="_blank">17-21393970</a> 17-81437977<u></u><u></u></span></div></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"> </span></div></div></div></div><span><img id="m_5170756495596541163CC3FB3B4-7E89-48B8-B32E-1ABFA2FAEF45" src="cid:97CE70A1-F8F4-410A-B75A-94F9B572205D@ERIMAT-OESTE"></span>
</div>
<br></span><div><blockquote type="cite"><div><div class="h5"><div>Em 1 de fev de 2018, à(s) 15:26, Nuno Cunha <<a href="mailto:nuno.cunha@engdb.com.br" target="_blank">nuno.cunha@engdb.com.br</a>> escreveu:</div><br class="m_5170756495596541163Apple-interchange-newline"></div></div><div><div><div class="h5"><div dir="ltr">Ola José,<div><br></div><div> Mesmo comportamento!</div><div><br></div><div> Não vejo algum erro na chamada do google recognizer no CLI... apenas meu AGI pegando o valor da variável "<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">confidence" (que deve ser = 0...) e o playback de endereço não compreendido.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> Forcei uma chave errada e vi que não há informação sobre isto no debug do console do Asterisk... </span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> Coloquei aqui o que saiu no CLI. Se tiver um tempo para dar uma olhada e ver se há algo estranho ai, agradeço demais.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Obrigado,</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><br></div><div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Rx << EXEC "Playback" "PerguntarEnderecoOrigem"</font></div><div><font face="monospace, monospace"> -- AGI Script Executing Application: (Playback) Options: (PerguntarEnderecoOrigem)</font></div><div><font face="monospace, monospace"> -- <PJSIP/6001-00000000> Playing 'PerguntarEnderecoOrigem.gsm' (language 'en')</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> 200 result=0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Rx << EXEC "Agi" "speech-recog.agi,pt-BR"</font><font face="monospace, monospace"> -- AGI Script Executing Application: (Agi) Options: (speech-recog.agi,pt-BR)</font></div><div><font face="monospace, monospace"> -- Launched AGI Script /var/lib/asterisk/agi-bin/<wbr>speech-recog.agi</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_request: speech-recog.agi</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_channel: PJSIP/6001-00000000</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_language: en</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_type: PJSIP</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_uniqueid: 1517504895.0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_version: 13.19.0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_callerid: 6001</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_calleridname: Nuno</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_callingpres: 0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_callingani2: 0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_callington: 0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_callingtns: 0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_dnid: 100</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_rdnis: unknown</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_context: SolicitarEnderecosOrigemDestin<wbr>o</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_extension: s</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_priority: 2</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_enhanced: 0.0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_accountcode:</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_threadid: 139981899122432</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> agi_arg_1: pt-BR</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >></font></div><div><font face="monospace, monospace"> -- <PJSIP/6001-00000000>AGI Script speech-recog.agi completed, returning 0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> 200 result=0</font></div><div><span style="font-family:monospace,monospace"><PJSIP/6001-00000000>AGI Rx << GET VARIABLE "confidence"</span><br></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> 200 result=0</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Rx << EXEC "Playback" "<wbr>AvisoDesculpeNaoCompreendiEnde<wbr>reco"</font></div><div><font face="monospace, monospace"> -- AGI Script Executing Application: (Playback) Options: (<wbr>AvisoDesculpeNaoCompreendiEnde<wbr>reco)</font></div><div><font face="monospace, monospace"> -- <PJSIP/6001-00000000> Playing '<wbr>AvisoDesculpeNaoCompreendiEnde<wbr>reco.gsm' (language 'en')</font></div><div><font face="monospace, monospace"><PJSIP/6001-00000000>AGI Tx >> 200 result=0</font></div><div><br></div></div></div></div></div><div class="gmail_extra"><div><div class="h5"><br clear="all"><div><div class="m_5170756495596541163gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>----</div><div><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;color:rgb(102,102,102);font-family:Montserrat,sans-serif;font-size:13px;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/logo.png" style="border:0px;vertical-align:middle"></td><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/element.png" style="border:0px;vertical-align:middle"></td><td style="padding:0px"><div style="color:rgb(196,0,75);font-size:14px;line-height:14px;font-weight:bold">Nuno Correia dos Santos Cunha</div><br><div style="font-size:12px;line-height:12px">Analista de sistemas</div><div style="font-size:12px;line-height:12px;font-weight:bold">Automação & Controle - Serviços Logann - T&T</div></td><td style="padding:0px"> <wbr> </td><td style="padding:0px"><div style="color:rgb(0,47,85);font-weight:bold;font-size:12px;line-height:12px">Office:</div><div style="color:rgb(0,47,85);font-weight:bold;font-size:12px;line-height:12px">Skype:</div></td><td style="padding:0px"> </td><td style="padding:0px"><div style="font-size:12px;line-height:12px"><a href="tel:(31)%203211-7396" value="+553132117396" target="_blank">(31) 3211-7396</a></div><div style="font-size:12px;line-height:12px">nuno.cunha.engdb</div></td></tr></tbody></table><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/element2.png" style="border:0px;vertical-align:middle"></td></tr></tbody></table><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><a href="http://www.engdb.com.br/" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/eng-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.facebook.com/engdb/" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/face-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.linkedin.com/company-beta/27862?pathWildcard=27862" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/in-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.youtube.com/channel/UCEUvHtjrY3-kD1tFryzCJyA" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/youtube-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"> </td><td style="padding:0px">Avenida Getúlio Vargas, nº 1.300, 9º e 10º andares | Belo Horizonte – MG | CEP 30112-021</td></tr></tbody></table></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div>
<br></div></div><div class="gmail_quote"><div><div class="h5">2018-02-01 14:47 GMT-02:00 Jose <span dir="ltr"><<a href="mailto:jasanchez113@gmail.com" target="_blank">jasanchez113@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5">Essa funciona so coloque sua chave:<div><br></div><div><br></div></div></div><div><div><div class="h5"><div>#!/usr/bin/env perl</div><div><br></div><div><br></div><div>use warnings;</div><div>use strict;</div><div>use URI::Escape;</div><div>use File::Copy qw(move);</div><div>use File::Temp qw(tempfile);</div><div>use LWP::UserAgent;</div><div>use JSON;</div><div>use Encode qw(encode);</div><div><br></div><div>$| = 1;</div><span><div><br></div><div># ----------------------------- #</div><div># User defined parameters: #</div><div># ----------------------------- #</div><div># Speech API key #</div></span><div>my $key = sua chave do google";</div><span><div><br></div><div># Default language #</div><div>my $language = "pt-BR";</div><div><br></div><div># Default max silence timeout #</div><div>my $timeout = 2;</div><div><br></div><div># Absolute Recording timeout #</div><div>my $abs_timeout = -1;</div><div><br></div><div># Default interrupt key #</div><div>my $intkey = "#";</div><div><br></div><div># Input audio sample rate #</div><div># Leave blank to auto-detect #</div><div>my $samplerate = "";</div><div><br></div><div># Profanity filter #</div></span><div>my $pro_filter = 0;</div><div><br></div><div># Use speex #</div><div>my $use_speex = 0;</div><div><br></div><div># Use SSL #</div><div>my $use_ssl = 1;</div><span><div><br></div><div># Verbose debugging messages #</div><div>my $debug = 0;</div><div><br></div><div># ----------------------------- #</div><div><br></div></span><div>my %AGI;</div><div>my $ua;</div><div>my $fh;</div><div>my $tmpname;</div><div>my $format;</div><div>my @result;</div><div>my $name;</div><div>my $audio;</div><div>my $uaresponse;</div><div>my %response;</div><div>my $endian;</div><div>my $url;</div><div>my $silence;</div><div>my $filetype;</div><div>my $flac;</div><div>my $speex;</div><div>my $results = 1;</div><div>my $grammar = "builtin:dictation"; #"builtin:search";</div><span><div>my $beep = "BEEP";</div><div>my $comp_level = -8;</div></span><div>my $ua_timeout = 10;</div><div>my $tmpdir = "/tmp";</div><div>my $host = "<a href="http://www.google.com/speech-api/v2/recognize" target="_blank">www.google.com/speech-api/v2/<wbr>recognize</a>";</div><div><br></div><div># Store AGI input #</div><div>($AGI{arg_1}, $AGI{arg_2}, $AGI{arg_3}, $AGI{arg_4}) = @ARGV;</div><div>while (<STDIN>) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>chomp;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>last if (!length);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$AGI{$1} = $2 if (/^agi_(\w+)\:\s+(.*)$/);</div><div>}</div><div><br></div><div>$name = " -- $AGI{request}:";</div><div><br></div><div># Reset variables. #</div><div>%response = (</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>utterance => -1,</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>confidence => -1,</div><div>);</div><div>warn "$name Clearing channel variables.\n" if ($debug);</div><div>foreach (keys %response) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>print "SET VARIABLE \"$_\" \"$response{$_}\"\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>checkresponse();</div><div>}</div><div><br></div><div># Abort if key is missing or required programs not found. #</div><div>if (!$key) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>print "VERBOSE \"API key is missing. Aborting.\" 3\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>checkresponse();</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>die "$name API key is missing. Aborting.\n";</div><div>}</div><div>if ($use_speex) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$speex = `/usr/bin/which speexenc`;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>die "$name speexenc is missing. Aborting.\n" if (!$speex);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>chomp($speex);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>warn "$name Found speexenc in: $speex\n" if ($debug);</div><div>} else {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$flac = `/usr/bin/which flac`;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>die "$name flac is missing. Aborting.\n" if (!$flac);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>chomp($flac);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>warn "$name Found flac in: $flac\n" if ($debug);</div><div>}</div><div><br></div><div># Setting language, timeout, interrupt keys and BEEP indication #</div><div>if (length($AGI{arg_1})) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$language = $AGI{arg_1} if ($AGI{arg_1} =~ /^[a-z]{2}(-[a-zA-Z]{2,6})?$/)<wbr>;</div><div>}</div><div><br></div><div>if (length($AGI{arg_2})) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>if ($AGI{arg_2} == -1) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>$silence = "";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>} elsif ($AGI{arg_2} =~ /^\d+$/) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>$silence = "s=$AGI{arg_2}";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>} else {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>$silence = "s=$timeout";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>}</div><div>} else {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$silence = "s=$timeout";</div><div>}</div><div><br></div><div>if (length($AGI{arg_3})) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$intkey = "0123456789#*" if ($AGI{arg_3} eq "any");</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$intkey = $AGI{arg_3} if ($AGI{arg_3} =~ /^[0-9*#]+$/);</div><div>}</div><div><br></div><div>if (length($AGI{arg_4})) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$beep = "" if ($AGI{arg_4} eq "NOBEEP");</div><div>}</div><div><br></div><div># Answer channel if not already answered #</div><div>warn "$name Checking channel status.\n" if ($debug);</div><div>print "CHANNEL STATUS\n";</div><div>@result = checkresponse();</div><div>if ($result[0] == 4) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>warn "$name Answering channel.\n" if ($debug);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>print "ANSWER\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>@result = checkresponse();</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>if ($result[0] != 0) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>die "$name Failed to answer channel.\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>}</div><div>}</div><div><br></div><div># Setting recording file format according to sample rate. #</div><div>if (!$samplerate) { ($format, $samplerate) = detect_format(); }</div><div>elsif ($samplerate == 12000) { $format = "sln12"; }</div><div>elsif ($samplerate == 16000) { $format = "sln16"; }</div><div>elsif ($samplerate == 32000) { $format = "sln32"; }</div><div>elsif ($samplerate == 44100) { $format = "sln44"; }</div><div>elsif ($samplerate == 48000) { $format = "sln48"; }</div><div>else { ($format, $samplerate) = ("sln", 8000); }</div><div><br></div><div># Initialise User angent #</div><div>if ($use_ssl) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$url = "https://" . $host;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$ua = LWP::UserAgent->new(ssl_opts => {verify_hostname => 1});</div><div>} else {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$url = "http://" . $host;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$ua = LWP::UserAgent->new;</div><div>}</div><div>$language = uri_escape($language);</div><div>$grammar = uri_escape($grammar);</div><div>$url .= "?key=$key&lang=$language&pfil<wbr>ter=$pro_filter&lm=$grammar&<wbr>maxresults=$results";</div><div>$ua->agent("Asterisk AGI speeech recognition script");</div><div>$ua->env_proxy;</div><div>$ua->timeout($ua_timeout);</div><div><br></div><div># Hnadle interrupts #</div><div>$SIG{'INT'} = \&int_handler;</div><div>$SIG{'HUP'} = \&int_handler;</div><div><br></div><div># Record file #</div><div>($fh, $tmpname) = tempfile("stt_XXXXXX", DIR => $tmpdir, UNLINK => 1);</div><div>print "RECORD FILE $tmpname $format \"$intkey\" \"$abs_timeout\" $beep \"$silence\"\n";</div><div>@result = checkresponse();</div><div>die "$name Failed to record file, aborting...\n" if ($result[0] == -1);</div><div><br></div><div>if ($debug) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>warn "$name Recording Format: $format, Rate: $samplerate Hz, ",</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>"Encoding format: ", ($use_speex) ? "speex" : "flac", "\n",</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>"$name Languge: $language, SSL: ", ($use_ssl) ? "yes, " : "no, ",</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>"$silence, Interrupt keys: $intkey\n";</div><div>}</div><div><br></div><div># Encode sound data #</div><div>if ($use_speex) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$filetype = "x-speex-with-header-byte";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$endian = (unpack("h*", pack("s", 1)) =~ /01/) ? "--be" : "--le";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span># Encode file to speex. #</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>system($speex, "--vbr", "--rate", $samplerate, "--headerbyte", "--quiet", $endian,</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>"$tmpname.$format", "$tmpname.spx") == 0 or die "$name $speex failed: $?\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>open($fh, "<", "$tmpname.spx") or die "Can't read file: $!";</div><div>} else {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$filetype = "x-flac";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>$endian = (unpack("h*", pack("s", 1)) =~ /01/) ? "big" : "little";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span># Encode file to flac. #</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>system($flac, $comp_level, "--totally-silent", "--channels=1", "--endian=$endian",</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>"--sign=signed", "--bps=16", "--force-raw-format", "--sample-rate=$samplerate",</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>"$tmpname.$format") == 0 or die "$name $flac failed: $?\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>open($fh, "<", "$tmpname.flac") or die "Can't read file: $!";</div><div>}</div><div><br></div><div>$audio = do { local $/; <$fh> };</div><div>close($fh);</div><div><br></div><div># Send adio data for analysis #</div><div>$uaresponse = $ua->post(</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>"$url",</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>Content_Type => "audio/$filetype; rate=$samplerate",</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>Content => "$audio",</div><div>);</div><div>if (!$uaresponse->is_success) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>print "VERBOSE \"Unable to get recognition data.\" 3\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>checkresponse();</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>die "$name Unable to get recognition data.\n";</div><div>}</div><div><br></div><div>foreach (split(/\n/,$uaresponse->conte<wbr>nt)) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>my $jdata = decode_json($_);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>for ( $jdata->{result}[0]->{alternat<wbr>ive}[0] ) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>$response{utterance} = encode('utf8', $_->{transcript});</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>$response{confidence} = $_->{confidence};</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>}</div><div>}</div><div>warn "$name The response was:\n", $uaresponse->content if ($debug);</div><div><br></div><div>foreach (keys %response) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>warn "$name Setting variable: $_ = $response{$_}\n" if ($debug);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>print "SET VARIABLE \"$_\" \"$response{$_}\"\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>checkresponse();</div><div>}</div><div>exit;</div><div><br></div><div>sub checkresponse {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>my $input = <STDIN>;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>my @values;</div><div><br></div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>chomp $input;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>if ($input =~ /^200 result=(-?\d+)\s?(.*)$/) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>warn "$name Command returned: $input\n" if ($debug);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>@values = ("$1", "$2");</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>} else {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>$input .= <STDIN> if ($input =~ /^520-Invalid/);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>warn "$name Unexpected result: $input\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>@values = (-1, -1);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>}</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>return @values;</div><div>}</div><div><br></div><div>sub detect_format {</div><div># Detect the sound format used #</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>my @format;</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>print "GET FULL VARIABLE \${CHANNEL(audionativeformat)}<wbr>\n";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>my @reply = checkresponse();</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>for ($reply[1]) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>if (/(silk|sln)12/) { @format = ("sln12", 12000); }</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>elsif (/(speex|slin|silk)16|g722|sir<wbr>en7/) { @format = ("sln16", 16000); }</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>elsif (/(speex|slin|celt)32|siren14/<wbr>) { @format = ("sln32", 32000); }</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>elsif (/(celt|slin)44/) { @format = ("sln44", 44100); }</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>elsif (/(celt|slin)48/) { @format = ("sln48", 48000); }</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>else { @format = ("sln", 8000); }</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>}</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>return @format;</div><div>}</div><div><br></div><div>sub int_handler {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>die "$name Interrupt signal received, terminating...\n";</div><div>}</div><div><br></div><div>END {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>if ($tmpname) {</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>warn "$name Cleaning temp files.\n" if ($debug);</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">                </span>unlink glob "$tmpname.*";</div><div><span class="m_5170756495596541163m_-955535683590563047Apple-tab-span" style="white-space:pre-wrap">        </span>}</div><div>}</div><div><br></div></div></div><div><div><div class="h5">
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal"><div style="line-height:normal"><div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif">Atenciosamente<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"> </span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif">Eng. Jose Antonio Sanchez<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif">Erimat Oeste Telecom<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="http://www.pbxerix.com.br/" style="color:purple" target="_blank">www.pbxerix.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="http://www.virtualpbxip.com.br/" style="color:purple" target="_blank">www.virtualpbxip.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="http://www.erimatoeste.com.br/" style="color:purple" target="_blank">www.erimatoeste.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="mailto:jasanchez@terra.com.br" style="color:purple" target="_blank">jasanchez@terra.com.br</a><u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><a href="tel:(17)%202139-3970" value="+551721393970" target="_blank">17-21393970</a> 17-81437977<u></u><u></u></span></div></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"> </span></div></div></div></div></div></div><span><span id="m_5170756495596541163cid:97CE70A1-F8F4-410A-B75A-94F9B572205D@ERIMAT-OESTE"><logo.erix.teste.fw.png></span></span>
</div><div><div class="h5"><div><div class="m_5170756495596541163h5">
<br><div><blockquote type="cite"><div>Em 1 de fev de 2018, à(s) 14:44, Nuno Cunha <<a href="mailto:nuno.cunha@engdb.com.br" target="_blank">nuno.cunha@engdb.com.br</a>> escreveu:</div><br class="m_5170756495596541163m_-955535683590563047Apple-interchange-newline"><div><div dir="ltr">Olas,<div><br></div><div> Também tentei: </div><div><br></div><div><div> p_channel.exec("Agi", "speech-recog.agi,pt-BR,2");</div></div><div><br></div><div> com o mesmo resultado.</div><div><br></div></div><div id="m_5170756495596541163m_-955535683590563047DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
        <tbody><tr>
<td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width:46px;height:29px"></a></td>
                <td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Livre de vírus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#4453ea" target="_blank">www.avast.com</a>.                 </td>
        </tr>
</tbody></table>
<a width="1" height="1"></a></div><div class="gmail_extra"><br clear="all"><div><div class="m_5170756495596541163m_-955535683590563047gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>----</div><div><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;color:rgb(102,102,102);font-family:Montserrat,sans-serif;font-size:13px;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/logo.png" style="border:0px;vertical-align:middle"></td><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/element.png" style="border:0px;vertical-align:middle"></td><td style="padding:0px"><div style="color:rgb(196,0,75);font-size:14px;line-height:14px;font-weight:bold">Nuno Correia dos Santos Cunha</div><br><div style="font-size:12px;line-height:12px">Analista de sistemas</div><div style="font-size:12px;line-height:12px;font-weight:bold">Automação & Controle - Serviços Logann - T&T</div></td><td style="padding:0px"> <wbr> </td><td style="padding:0px"><div style="color:rgb(0,47,85);font-weight:bold;font-size:12px;line-height:12px">Office:</div><div style="color:rgb(0,47,85);font-weight:bold;font-size:12px;line-height:12px">Skype:</div></td><td style="padding:0px"> </td><td style="padding:0px"><div style="font-size:12px;line-height:12px"><a href="tel:(31)%203211-7396" value="+553132117396" target="_blank">(31) 3211-7396</a></div><div style="font-size:12px;line-height:12px">nuno.cunha.engdb</div></td></tr></tbody></table><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/element2.png" style="border:0px;vertical-align:middle"></td></tr></tbody></table><table style="border-collapse:collapse;border-spacing:0px;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><a href="http://www.engdb.com.br/" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/eng-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.facebook.com/engdb/" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/face-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.linkedin.com/company-beta/27862?pathWildcard=27862" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/in-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.youtube.com/channel/UCEUvHtjrY3-kD1tFryzCJyA" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/youtube-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"> </td><td style="padding:0px">Avenida Getúlio Vargas, nº 1.300, 9º e 10º andares | Belo Horizonte – MG | CEP 30112-021</td></tr></tbody></table></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">Em 1 de fevereiro de 2018 14:23, Renato Santos <span dir="ltr"><<a href="mailto:renato473@gmail.com" target="_blank">renato473@gmail.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">Acho que está api foi descontinuada pois ela está na V1 e o Google usa a V3</div><br><div class="gmail_quote"><div><div class="m_5170756495596541163m_-955535683590563047h5"><div>Em qui, 1 de fev de 2018 às 13:11, Nuno Cunha <<a href="mailto:nuno.cunha@engdb.com.br" target="_blank">nuno.cunha@engdb.com.br</a>> escreveu:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_5170756495596541163m_-955535683590563047h5"><div>Ola,<div><br></div><div> Em meu AGI (fastAGI, em java) tenho estas duas linhas:</div><div><font face="monospace, monospace"><br></font></div><div><div><font face="monospace, monospace"> p_channel.exec("Playback", "Fale o endereço!");</font></div><div><font face="monospace, monospace"> p_channel.exec("Agi", "speech-recog.agi", "pt-BR");</font></div><div><br></div><div><br></div><div> O problema é que após ler a pergunta o tempo de fala parece estar sendo de zero segundos, mal começo a falar e já recebo a mensagem que o endereço não foi compreendido (que é a lógica logo a seguir a estas duas linhas).</div><div><br></div><div> No script
<span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">speech-recog.agi tenho as configurações:</span></div><div><span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="monospace, monospace"><div># ----------------------------- #</div><div># User defined parameters: #</div><div># ----------------------------- #</div><div># Speech API key #</div><div>my $key = "minha chave...";</div><div><br></div><div># Default language #</div><div>my $language = "pt-BR";</div><div><br></div><div># Default max silence timeout #</div><div>my $timeout = 2;</div><div><br></div><div># Absolute Recording timeout #</div><div>my $abs_timeout = -1;</div><div><br></div><div># Default interrupt key #</div><div>my $intkey = "#";</div><div><br></div><div># Input audio sample rate #</div><div># Leave blank to auto-detect #</div><div>my $samplerate = "";</div><div><br></div><div># Profanity filter #</div><div>my $pro_filter = "false";</div><div><br></div><div># Verbose debugging messages #</div><div>my $debug = 0;</div><div><br></div><div># ----------------------------- #</div></font></span></div><div><br></div><div><br></div><div> Testei colocando explicitamente na chamada do agi do Google o tempo de timeout, como mostrado abaixo, mas não mudou o comportamento.</div><div><br></div><div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"> p_channel.exec("Playback", "Fale o endereço!");</div>
<div> p_channel.exec("Agi", "speech-recog.agi", "
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">pt-BR</span>
", <font color="#ff0000">"2"</font>);</div></div><div><br></div><div> Alguma ideia de como ter mais tempo para falar o endereço?</div><div><br></div><div>Obrigado,</div><div><br></div><div><div class="m_5170756495596541163m_-955535683590563047m_3515590836011688728m_-8075362843129180750gmail_signature"><div><div><div><div><div><div><div><div><br></div><div>----</div><div><table style="border-collapse:collapse;background-color:transparent;color:rgb(102,102,102);font-family:Montserrat,sans-serif;font-size:13px;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><table style="border-collapse:collapse;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/logo.png" style="border:0px;vertical-align:middle"></td><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/element.png" style="border:0px;vertical-align:middle"></td><td style="padding:0px"><div style="color:rgb(196,0,75);font-size:14px;line-height:14px;font-weight:bold">Nuno Correia dos Santos Cunha</div><br><div style="font-size:12px;line-height:12px">Analista de sistemas</div><div style="font-size:12px;line-height:12px;font-weight:bold">Automação & Controle - Serviços Logann - T&T</div></td><td style="padding:0px"> <wbr> </td><td style="padding:0px"><div style="color:rgb(0,47,85);font-weight:bold;font-size:12px;line-height:12px">Office:</div><div style="color:rgb(0,47,85);font-weight:bold;font-size:12px;line-height:12px">Skype:</div></td><td style="padding:0px"> </td><td style="padding:0px"><div style="font-size:12px;line-height:12px"><a href="tel:(31)%203211-7396" value="+553132117396" target="_blank">(31) 3211-7396</a></div><div style="font-size:12px;line-height:12px">nuno.cunha.engdb</div></td></tr></tbody></table><table style="border-collapse:collapse;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><img src="http://assinatura.engdb.com.br/img/element2.png" style="border:0px;vertical-align:middle"></td></tr></tbody></table><table style="border-collapse:collapse;background-color:transparent;font-family:Montserrat,sans-serif;letter-spacing:0.1px"><tbody><tr><td style="padding:0px"><a href="http://www.engdb.com.br/" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/eng-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.facebook.com/engdb/" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/face-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.linkedin.com/company-beta/27862?pathWildcard=27862" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/in-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"><a href="https://www.youtube.com/channel/UCEUvHtjrY3-kD1tFryzCJyA" style="background-color:transparent;color:rgb(0,47,85)" target="_blank"><img src="http://assinatura.engdb.com.br/img/youtube-icon.png" style="border:0px;vertical-align:middle"></a></td><td style="padding:0px"> </td><td style="padding:0px">Avenida Getúlio Vargas, nº 1.300, 9º e 10º andares | Belo Horizonte – MG | CEP 30112-021</td></tr></tbody></table></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td><td style="padding:0px"></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div>
</div></div><div id="m_5170756495596541163m_-955535683590563047m_3515590836011688728m_-8075362843129180750DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
        <tbody><tr>
<td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width:46px;height:29px"></a></td>
                <td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Livre de vírus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#4453ea" target="_blank">www.avast.com</a>.                 </td>
        </tr>
</tbody></table>
<a width="1" height="1"></a></div></div></div>
______________________________<wbr>_________________<br>
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1<br>
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7<br>
Intercomunicador e acesso remoto via rede IP e telefones IP<br>
Conheça todo o portfólio em <a href="http://www.khomp.com/" rel="noreferrer" target="_blank">www.Khomp.com</a><br>
______________________________<wbr>_________________<br>
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@lis<wbr>tas.asteriskbrasil.org</a></blockquote></div></div><span class="m_5170756495596541163m_-955535683590563047HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div class="m_5170756495596541163m_-955535683590563047m_3515590836011688728gmail_signature" data-smartmail="gmail_signature">Enviado do Gmail para celular</div>
</font></span><br>______________________________<wbr>_________________<br>
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1<br>
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7<br>
Intercomunicador e acesso remoto via rede IP e telefones IP<br>
Conheça todo o portfólio em <a href="http://www.khomp.com/" rel="noreferrer" target="_blank">www.Khomp.com</a><br>
______________________________<wbr>_________________<br>
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@lis<wbr>tas.asteriskbrasil.org</a><br></blockquote></div><br></div>
______________________________<wbr>_________________<br>KHOMP: completa linha de placas externas FXO, FXS, GSM e E1<br>Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7<br>Intercomunicador e acesso remoto via rede IP e telefones IP<br>Conheça todo o portfólio em <a href="http://www.khomp.com/" target="_blank">www.Khomp.com</a><br>______________________________<wbr>_________________<br>Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@lis<wbr>tas.asteriskbrasil.org</a></div></blockquote></div><br></div></div></div></div></div></div><div><div class="h5"><br>______________________________<wbr>_________________<br>
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1<br>
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7<br>
Intercomunicador e acesso remoto via rede IP e telefones IP<br>
Conheça todo o portfólio em <a href="http://www.khomp.com/" rel="noreferrer" target="_blank">www.Khomp.com</a><br>
______________________________<wbr>_________________<br>
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@lis<wbr>tas.asteriskbrasil.org</a><br></div></div></blockquote></div><br></div><div><div class="h5">
______________________________<wbr>_________________<br>KHOMP: completa linha de placas externas FXO, FXS, GSM e E1<br>Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7<br>Intercomunicador e acesso remoto via rede IP e telefones IP<br>Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a><br>______________________________<wbr>_________________<br>Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@<wbr>listas.asteriskbrasil.org</a></div></div></div></blockquote></div><br></div><br>______________________________<wbr>_________________<br>
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1<br>
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7<br>
Intercomunicador e acesso remoto via rede IP e telefones IP<br>
Conheça todo o portfólio em <a href="http://www.Khomp.com" rel="noreferrer" target="_blank">www.Khomp.com</a><br>
______________________________<wbr>_________________<br>
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@<wbr>listas.asteriskbrasil.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Renato <br><br><b><i><span style="color:rgb(255,0,0)">you don't need a hero to succeed on the field....you need a team!</span></i></b><br><br><img src="http://static.crowdwisdomhq.com/rackspace/courses/cloudUwebBadge2014.png"><br><br></div></div>
</div>