Re: [asterisk-users] Asterisk cant play sounds from AGI
On Jul 10, 2008, at 7:54 PM, Edwin Quijada wrote: Hi! I am a newbie using Asterisk. I am developing an IVR using perl from AGI and Cepstral as voices The AGI is this [snip] My problem is that i cant hear anything when play the file sound using $AGI-stream_file($filename); I put asterisk in verbose mode but just see that it plays the sound but I cant hear anything. I thought maybe was the codec but asterisk can play .wav But this works $AGI-say_number('9865'); If Asterisk says it is playing the file, then I would suspect the file itself has nothing to say. Try copying the file to your computer and playing it. If it does indeed play locally on your computer with audio, double check to make sure it is in the right format. I use AGI to play files all the time. Actually, I use an AGI script as my whole menu and dialing system to replace having to do it in AEL (so much nicer to add a single MySQL record and suddenly have voicemail and direct dial work instantly). Daniel *---* *-Edwin Quijada *-Developer DataBase *-JQ Microsistemas *-809-849-8087 * Si deseas lograr cosas excepcionales debes de hacer cosas fuera de lo comun *---* ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Asterisk cant play sounds from AGI
From: [EMAIL PROTECTED] To: asterisk-users@lists.digium.com Date: Fri, 11 Jul 2008 08:10:38 -0700 Subject: Re: [asterisk-users] Asterisk cant play sounds from AGI On Jul 10, 2008, at 7:54 PM, Edwin Quijada wrote: Hi! I am a newbie using Asterisk. I am developing an IVR using perl from AGI and Cepstral as voices The AGI is this [snip] My problem is that i cant hear anything when play the file sound using $AGI-stream_file($filename); I put asterisk in verbose mode but just see that it plays the sound but I cant hear anything. I thought maybe was the codec but asterisk can play .wav But this works $AGI-say_number('9865'); If Asterisk says it is playing the file, then I would suspect the file itself has nothing to say. Try copying the file to your computer and playing it. If it does indeed play locally on your computer with audio, double check to make sure it is in the right format. I use AGI to play files all the time. Actually, I use an AGI script as my whole menu and dialing system to replace having to do it in AEL (so much nicer to add a single MySQL record and suddenly have voicemail and direct dial work instantly). Daniel I tested the files playing in other app, Winamp, and the file play fine. I tested with other files ,sounds from asterisk, and I get the same thing. In my spftphone doesnt hear anything But this works $AGI-say_number('9865') so fine. ?? *---* *-Edwin Quijada *-Developer DataBase *-JQ Microsistemas *-809-849-8087 * Si deseas lograr cosas excepcionales debes de hacer cosas fuera de lo comun *---* ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _ Get your fix of news, sports, entertainment and more on MSN Mobile http://www.msnmobilefix.com/Default.aspx ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Asterisk cant play sounds from AGI
On Friday 11 July 2008 12:40:47 Edwin Quijada wrote: From: [EMAIL PROTECTED] To: asterisk-users@lists.digium.com Date: Fri, 11 Jul 2008 08:10:38 -0700 Subject: Re: [asterisk-users] Asterisk cant play sounds from AGI On Jul 10, 2008, at 7:54 PM, Edwin Quijada wrote: Hi! I am a newbie using Asterisk. I am developing an IVR using perl from AGI and Cepstral as voices The AGI is this [snip] My problem is that i cant hear anything when play the file sound using $AGI-stream_file($filename); I put asterisk in verbose mode but just see that it plays the sound but I cant hear anything. I thought maybe was the codec but asterisk can play .wav But this works $AGI-say_number('9865'); If Asterisk says it is playing the file, then I would suspect the file itself has nothing to say. Try copying the file to your computer and playing it. If it does indeed play locally on your computer with audio, double check to make sure it is in the right format. I use AGI to play files all the time. Actually, I use an AGI script as my whole menu and dialing system to replace having to do it in AEL (so much nicer to add a single MySQL record and suddenly have voicemail and direct dial work instantly). Daniel I tested the files playing in other app, Winamp, and the file play fine. I tested with other files ,sounds from asterisk, and I get the same thing. In my spftphone doesnt hear anything But this works $AGI-say_number('9865') so fine. Check the format of the file. In most cases, the file should be 8000Hz, single channel, uncompressed, signed linear, 16-bit samples format. Winamp can play a great many different formats, but Asterisk is limited to the formats for which it has a translator. -- Tilghman ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Asterisk cant play sounds from AGI
On Fri, 11 Jul 2008, Tilghman Lesher wrote: On Jul 10, 2008, at 7:54 PM, Edwin Quijada wrote: My problem is that i cant hear anything when play the file sound using $AGI-stream_file($filename); I put asterisk in verbose mode but just see that it plays the sound but I cant hear anything. Check the format of the file. In most cases, the file should be 8000Hz, single channel, uncompressed, signed linear, 16-bit samples format. Winamp can play a great many different formats, but Asterisk is limited to the formats for which it has a translator. If the file is a wav, it should look something like this: -t2::sedwards:~$ file example.wav example.wav: RIFF (little-endian) data, WAVE audio, Microsoft\ PCM, 16 bit, mono 8000 Hz Also, just in case you trip over this, you pass a file name to Asterisk, not a file type -- the bit after the period. Asterisk chooses the best type from files of the same name based on the codecs available to the channel. Thanks in advance, Steve Edwards [EMAIL PROTECTED] Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Asterisk cant play sounds from AGI
Date: Fri, 11 Jul 2008 11:29:58 -0700 From: [EMAIL PROTECTED] To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] Asterisk cant play sounds from AGI On Fri, 11 Jul 2008, Tilghman Lesher wrote: On Jul 10, 2008, at 7:54 PM, Edwin Quijada wrote: My problem is that i cant hear anything when play the file sound using $AGI-stream_file($filename); I put asterisk in verbose mode but just see that it plays the sound but I cant hear anything. Check the format of the file. In most cases, the file should be 8000Hz, single channel, uncompressed, signed linear, 16-bit samples format. Winamp can play a great many different formats, but Asterisk is limited to the formats for which it has a translator. If the file is a wav, it should look something like this: -t2::sedwards:~$ file example.wav example.wav: RIFF (little-endian) data, WAVE audio, Microsoft\ PCM, 16 bit, mono 8000 Hz Also, just in case you trip over this, you pass a file name to Asterisk, not a file type -- the bit after the period. Asterisk chooses the best type from files of the same name based on the codecs available to the channel. vm-debian#file tts-hello example.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz I recorded the sound using Cepstral. This is my AGI I thought maybe was my sound card but this works fine $AGI-say_number('9865'); $AGI-say_digits('873746'); and I can hear it in my SIP phone use Asterisk::AGI; use File::Basename; use Digest::MD5 qw(md5_hex); $AGI = new Asterisk::AGI; %input = $AGI-ReadParse(); # $AGI-say_number('9865'); $AGI-say_digits('873746'); speak(Hello World); sub speak { $text = $_[0]; my $hash = md5_hex($text); my $ttsdir = /var/lib/asterisk/sounds/tts; my $cepoptions = -p audio/sampling-rate=8000,audio/channels=1; my $wavefile = $ttsdir/tts-$hash.wav; unless (-f $wavefile) { open(fileOUT, /var/lib/asterisk/sounds/tts/say-text-$hash.txt); print fileOUT $text; close(fileOUT); my $execf=/opt/swift/bin/swift -f $ttsdir/say-text-$hash.txt -o $wavefile $cepoptions; system($execf); unlink($ttsdir/say-text-$hash.txt); } $filename = 'tts/'.basename('tts/'.basename($wavefile,.wav)); $AGI-stream_file($filename); # unlink($wavefile); Thanks in advance, Steve Edwards [EMAIL PROTECTED] Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _ Stop squinting -- view your photos on your TV. Learn more. http://www.microsoft.com/windows/digitallife/default.mspx?deepLink=photos ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Asterisk cant play sounds from AGI
On Jul 11, 2008, at 1:31 PM, Edwin Quijada wrote: vm-debian#file tts-hello example.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz Other than the filename being wrong which I would assume is the result of a copy and paste from the original e-mail, that looks right. Can you paste the asterisk log section around where it is playing the file, including the line that shows it playing? Something in the log may give a clue. Daniel ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Asterisk cant play sounds from AGI
On Fri, 11 Jul 2008, Edwin Quijada wrote: I recorded the sound using Cepstral. This is my AGI I thought maybe was my sound card but this works fine Why would you think it was the sound card? 1) Try enabling AGI debugging. For 1.2, enter agi debug and then execute your agi. The important part should look like: AGI Rx STREAM FILE /var/lib/asterisk/tts/tts-5f45f4c8732d220207032bb30a4398ee AGI Tx 200 result=0 endpos=9072 Note there is no file type and the (the escape digits) at the end of the Rx line. If you get something different, please post it. 2) Are your file ownership and permissions OK? Try: ls -dl /var/lib/asterisk/sounds/tts/ ls -l /var/lib/asterisk/sounds/tts/ Thanks in advance, Steve Edwards [EMAIL PROTECTED] Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Asterisk cant play sounds from AGI
Hi! I am a newbie using Asterisk. I am developing an IVR using perl from AGI and Cepstral as voices The AGI is this use Asterisk::AGI; use File::Basename; use Digest::MD5 qw(md5_hex); $AGI = new Asterisk::AGI; %input = $AGI-ReadParse(); # $AGI-say_number('9865'); $AGI-say_digits('873746'); speak(Hello World); sub speak { $text = $_[0]; my $hash = md5_hex($text); my $ttsdir = /var/lib/asterisk/sounds/tts; my $cepoptions = -p audio/sampling-rate=8000,audio/channels=1; my $wavefile = $ttsdir/tts-$hash.wav; unless (-f $wavefile) { open(fileOUT, /var/lib/asterisk/sounds/tts/say-text-$hash.txt); print fileOUT $text; close(fileOUT); my $execf=/opt/swift/bin/swift -f $ttsdir/say-text-$hash.txt -o $wavefile $cepoptions; system($execf); unlink($ttsdir/say-text-$hash.txt); } $filename = 'tts/'.basename('tts/'.basename($wavefile,.wav)); $AGI-stream_file($filename); # unlink($wavefile); This function I took from internet where i found it My problem is that i cant hear anything when play the file sound using $AGI-stream_file($filename); I put asterisk in verbose mode but just see that it plays the sound but I cant hear anything. I thought maybe was the codec but asterisk can play .wav But this works $AGI-say_number('9865'); Any help or cluees will be so appreciate~! Thks! *---* *-Edwin Quijada *-Developer DataBase *-JQ Microsistemas *-809-849-8087 * Si deseas lograr cosas excepcionales debes de hacer cosas fuera de lo comun *---* _ Get your fix of news, sports, entertainment and more on MSN Mobile http://www.msnmobilefix.com/Default.aspx ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users