Tony Mountifield wrote:
OK, create a script called samples.pl containing the following:
#!/usr/bin/perl
$times = shift || 1;
undef $/;
$data = <>;
$data =~ /{\s*(.*?)\s*}/s;
@samples = split /[^0-9-]+/,$1;
print pack('v*',@samples) x $times;
#--end--
This will read busy.h or ringtone.h and output the values as a raw slin file.
You can pass a repeat count to samples.pl if you want to make a longer file.
You can convert that to whatever format you like using sox, e.g. for .wav:
samples.pl 50 <busy.h | sox -t raw -sw -c1 -r8000 - busy.wav
samples.pl 100 <ringtone.h | sox -t raw -sw -c1 -r8000 - ringtone.wav
Change .wav to .ul or .al for uLaw or aLaw output.
Hope this helps!
Cheers
Tony
Tony,
Thanks! Wow, now all I need to do is get the cadence right and I'll be
done!
--
Kristian Kielhofner
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users