<html xmlns:ns0="urn:schemas-microsoft-com:office:smarttags">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
/* List Definitions */
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I’ve been playing with the Lumenvox ASR engine (<a
href="http://www.lumenvox.com/">http://www.lumenvox.com</a>) and it works quite
well with Asterisk.</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>However, I have noticed several problems with the Speech
API:<br>
<br>
</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>(1)<font size=1
face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></font><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>When loading another grammar, it still appears to be
processing voice frames from a previous recognition cycle. This is noticeable as
SpeechBackground() is silent immediately when called without playing the sound file
and even after SpeechStart() is called again. I have been able to correct this
problem by introducing </span></font><b><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";font-weight:bold'>ast_clear_flag(speech,
AST_SPEECH_QUIET);</span></font></b><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> in the ast_speech_start() function
of res/res_speech.c, as follows:</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>void ast_speech_start(struct
ast_speech *speech)</span></font></p>
<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>{</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
/* Clear any flags that may affect things */</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
ast_clear_flag(speech, AST_SPEECH_SPOKE);</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
<b><span style='font-weight:bold'>ast_clear_flag(speech, AST_SPEECH_QUIET);</span></b></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
/* If results are on the structure, free them since we are starting again */</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
if (speech->results != NULL) {</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
ast_speech_results_free(speech->results);</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
speech->results = NULL;</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
}</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
/* If the engine needs to start stuff up, do it */</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
if (speech->engine->start != NULL) {</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
speech->engine->start(speech);</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
}</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>
return;</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>}</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> Can
someone confirm this as a reasonable fix and introduce it into the development
tree?</span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>(2)<font size=1
face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></font><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>SpeechCreate() does not seem to report the correct
status (${SPEECH(status)}) when using the Lumenvox engine and there are no more
available licenses. This causes a subsequent call to SpeechActivateGrammar() to
drop the call. In fact, it doesn’t make sense to me at all to have any of
the Speech…() functions return -1 and cause the call to be hung up. This
doesn’t allow for any DTMF fallback schemes. <br>
<br>
Can we have the Speech…() functions in apps/app_speech_utils.c set the
${SPEECH(status)} variable appropriately instead? Any comments?</span></font></p>
<p class=MsoNormal style='margin-left:.25in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>(3)<font size=1
face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></font><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>SpeechBackground(Sound File|timeout) should treat a
zero timeout as meaning “timeout immediately after playing the sound file”.
This allows you to call SpeechBackground() back-to-back without any delay. Presently,
a zero timeout means that it waits indefinitely for the user’s voice
response. If no timeout is specified as a parameter then it should behave with
an indefinite timeout. <br>
<br>
Any comments?</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Regards,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Stephan. <br>
<font color=navy><span style='color:navy'>--</span></font></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Stephan A. Edelman, B.Eng.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>NewAce Corporation</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Toll Free: 1-877-463-9223 x221</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>International: +1 519 336 4837 x221
(Outside US & </span></font><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'><font color=navy><span style='color:navy'>Canada</span></font><font
color=navy><span style='color:navy'>)</span></font></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Fax: +1 519 336 4046</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Cell: +1 519 346 1581</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>