<!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.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=#330000 bgColor=#ffffcc>
<DIV><FONT face=Arial color=#000000 size=2>Thanks nice script.</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 size=2>But why au files in addition to
gsm?</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=david.cantera@iacnet.net href="mailto:david.cantera@iacnet.net">dave
cantera</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=asterisk-users@lists.digium.com
href="mailto:asterisk-users@lists.digium.com">Asterisk Users Mailing List -
Non-Commercial Discussion</A> ; <A title=vincent.delporte@bigfoot.com
href="mailto:vincent.delporte@bigfoot.com">vincent.delporte@bigfoot.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, January 01, 2008 11:27
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [asterisk-users] [1.4 +
FreeBSD 6.2] Playing WAV PCM file?</DIV>
<DIV><BR></DIV>vincent,<BR>here is a script that I used to convert a single
wav file or the entire directory... no file specified on launch, converts all
files in the current directory...<BR>creates a logfile, although trivial...
<BR>daveC<BR><BR><TT>#!/bin/sh<BR>#<BR>#
convert-all.sh<BR>#<BR># convert all *.wav files to .gsm .au
formats<BR>#<BR><BR>if [ "null${1}" == "null" ]<BR>then<BR>
FILE_LIST=`ls *.wav`<BR>else<BR> FILE_LIST=`ls
${1}*.wav`<BR>fi<BR><BR>LOG="./log_convert.log"<BR>echo
"======================================================= "
>>${LOG}<BR>echo " started at
`date` "
>>${LOG}<BR><BR>echo " Removing all current .gsm files..."<BR>rm -f
*.gsm<BR><BR>for FNAME in ${FILE_LIST}<BR>do<BR> echo
"---- ------- ----- "<BR> echo
"---- " >>${LOG}<BR> echo " Processing
${FNAME}... "<BR> echo " Processing ${FNAME}... "
>>${LOG}<BR> BASEFNAME=`echo ${FNAME} | awk '{print
substr($0,1,length($0)-4)}'`<BR><BR> echo
" making ${BASEFNAME}.gsm...
"<BR> echo "
making ${BASEFNAME}.gsm... " >>${LOG}<BR> #sox -q -V
-c 1 ${FNAME} -r 8000 -c 1 -w ${BASEFNAME}.gsm resample -ql
2>>${LOG}<BR> sox -q -V ${FNAME} -r 8000 -c 1
${BASEFNAME}.gsm resample -ql 2>>${LOG}<BR> echo
"---- " >>${LOG}<BR> echo
" making ${BASEFNAME}.au...
"<BR> echo "
making ${BASEFNAME}.au... " >>${LOG}<BR> sox -q -V
${FNAME} -t au -r 8000 -c 1 -w ${BASEFNAME}.au resample -ql 2>>${LOG}
<BR>done</TT><BR><BR><BR><BR><BR><BR><BR>Vincent wrote:
<BLOCKQUOTE cite=mid:8p3kn3limg3rvdt127057g675k5o8r16qe@4ax.com type="cite"><PRE wrap="">Hello
Happy New Year! I succesfully installed the Ports of Zaptel BSD 1.4.0
and Asterisk 1.4.13 (that's the latest in the Ports). To save CPU, I'd
like to play PCM WAV files instead of eg. GSM. Per...
<A class=moz-txt-link-abbreviated href="http://www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk">www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk</A>
... I recorded a sample of my voice using XP's Sound Recorder, then
ran the following :
sox test_wav.wav -r 8000 -c 1 -s -w test_wav_out.wav resample -ql
But it seems like I'm missing the codec or something:
===========
-- Executing [s@default:2] Playback("SIP/2000-0871d000",
"/usr/local/lib/asterisk/test_wav_out.wav") in new stack
WARNING[37390]: file.c:563 ast_openstream_full: File
/usr/local/lib/asterisk/test_wav_out.wav does not exist in any format
WARNING[37390]: file.c:866 ast_streamfile: Unable to open
/usr/local/lib/asterisk/test_wav_out.wav (format 0x4 (ulaw)): No such
file or directory
===========
Here's what "core show file formats" says:
===========
Format Name Extensions
gsm wav49 WAV|wav49
slin wav wav
adpcm vox vox
slin sln sln|raw
g722 g722 g722
ulaw au au
alaw alaw alaw|al
ulaw pcm pcm|ulaw|ul|mu
ilbc iLBC ilbc
h264 h264 h264
h263 h263 h263
gsm gsm gsm
g729 g729 g729
g726 g726-16 g726-16
g726 g726-24 g726-24
g726 g726-32 g726-32
g726 g726-40 g726-40
g723 g723sf g723|g723sf
18 file formats registered.
===========
Am I missing something in the configuration files, or maybe I'm
missing some module?
Thank you.
_______________________________________________
--Bandwidth and Colocation Provided by <A class=moz-txt-link-freetext href="http://www.api-digital.com">http://www.api-digital.com</A>--
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<A class=moz-txt-link-freetext href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A>
</PRE></BLOCKQUOTE><BR><PRE class=moz-signature cols="132">--
My wife's sister is in California.
I should buy her a Videophone2008!
Truly, The Next Best Thing to Being There!
--
WorldWideVideoPhones.com
856.380.0894
</PRE>
<P>
<HR>
<P></P>_______________________________________________<BR>--Bandwidth and
Colocation Provided by http://www.api-digital.com--<BR><BR>asterisk-users
mailing list<BR>To UNSUBSCRIBE or update options visit:<BR>
http://lists.digium.com/mailman/listinfo/asterisk-users
<P>
<HR>
<P></P>No virus found in this incoming message.<BR>Checked by AVG Free
Edition. <BR>Version: 7.5.516 / Virus Database: 269.17.13/1205 - Release Date:
12/31/2007 3:32 PM<BR></BLOCKQUOTE></BODY></HTML>