<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT size=2>
<P>Hello John,</P>
<P>I'll see if I can create a few diffs and post this on the site you 
suggested.</P>
<P>The integration wasn't that straightforward: Sphinx's real-time decoder uses 
16KHz 16-bit PCM, whereas Asterisk provides a feed&nbsp;through the&nbsp;EAGI 
interface&nbsp;at 8KHz. I just used a crude average between successive samples 
to double up on the sampling rate.</P>
<P>I modified the livepretend program (for which I'll provide the patches) 
included in the Sphinx distribution to create a daemon that listens on a 
specific port and creates a thread for each connection to deal with the 
recognition process.</P>
<P>I had to add silence detection code to start and stop&nbsp;the recognition 
process and have the Sphinx software produce a hypothesis of the speech. I then 
send the hypothesis result to Asterisk and close the connection.</P>
<P>I only had to modify the "eagi-sphinx-test.c" sample program provided in the 
Asterisk distribution to change the IP address and port to the one used by the 
Sphinx daemon, described above.</P>
<P>I had amazing results using synthesized speech (not surprising, I suppose) 
using the Cepstral voice for Linux (William) (I use this in conjuction with 
Asterisk to create on-the-fly customized voice prompts. I wrote a little wrapper 
that allows me to call it from within a dialplan). I created some test samples 
and had Sphinx recognize this. I repeatedly got&nbsp;near 
perfect&nbsp;recognition. </P>
<P>The live tests by dialing into Asterisk weren't as&nbsp;successful. It looks 
like some amplitude normalization&nbsp;/ Automatic Gain Control code may need to 
be added. I'll play with that over the next little while to see if I can improve 
things.</P>
<P>I've experimented with IBM's ViaVoice for Linux a few years ago (yes, I know 
they no longer sell or support this) and got better results than what I am 
getting with Sphinx at the moment. If I can dig up a copy of ViaVoice, I'll try 
integrating it too and see how well it performs.</P>
<P>Regards,</P>
<P>Stephan.</P>
<P>&nbsp;</P>
<P>At 8:35 AM -0500 on 3/22/05, Stephan A. Edelman wrote:</P>
<P>&gt;Hello all,</P>
<P>&gt;</P>
<P>&gt;I've integrated Asterisk (CVS) and Sphinx 3.5 with a bit of hacking. </P>
<P>&gt;I have it working correctly but only for a locally connected POTS phone 
</P>
<P>&gt;on the FXS port of a TDM4400P (with 2 FXS / 2 FXO modules).</P>
<P>&gt;</P>
<P>&gt;When I call into Asterisk over the PSTN, the recognition rate is very 
</P>
<P>&gt;poor or non-existent. I've determined that this is because the </P>
<P>&gt;amplitude of the audio data fed to Sphinx is very low (at least 5dB </P>
<P>&gt;down compared to when a POTS call is made).</P>
<P>&gt;</P>
<P>&gt;Are there any AGC adjustments or otherwise manual volume adjustments </P>
<P>&gt;that can be made on the hardware?</P>
<P>&gt;</P>
<P>&gt;My other question concerns the Sphinx recognition database. It appears 
</P>
<P>&gt;it only recognizes, ABC...Z (spelled out), numbers, months, YES, NO, </P>
<P>&gt;etc.</P>
<P>&gt;</P>
<P>&gt;Does anyone have a more elaborate database that includes CUSTOMER </P>
<P>&gt;SERVICE, SUPPORT, SALES, etc.</P>
<P>&gt;</P>
<P>&gt;Any pointers would be greatly appreciated.</P>
<P>&gt;</P>
<P>&gt;Regards,</P>
<P>&gt;</P>
<P>&gt;Stephan.</P>
<P>&gt;</P>
<P>Stephan -</P>
<P>While this is not a direct answer to your question, could you post </P>
<P>your methods and/or patches onto the voip-info.com wiki? I, and </P>
<P>many other people, have been trying to get Sphinx installed correctly at all, 
and I'm sure once we got it working that more dictionaries would appear simply 
by virtue of more people working on the project.</P>
<P>JT</P>
<P>&nbsp;</P></FONT></FONT></DIV></BODY></HTML>