If an inbound audio stream is using the G.711 mu-law codec, in what format should I record a message so G.711 mu-law is the codec used in the resultant audio files?
Also, If the above format is not .wav, what kind of performance hit should one expect when recording an incoming G.711 mu-law audio stream as a .wav file?
Thanks,
James
222
333wav format
by clagos, Tuesday 11 of July, 2006 [18:00:53 UTC]
Asterisk records wav files in 16bits, signed. Is there any way of recording in 8bits, unsigned? I hope someone can help me. Thanks
222
333Anotger example
by , Tuesday 13 of April, 2004 [13:12:24 UTC]
I use this for recording samples, it is still a bit clunky, but offers the ability to re-record if you need to, and also to record a bunch of prompts in one hit (instead of needing to go and re-name the file after each recording).
Just paste this to your extensions.conf and include the recordings context for your line. If this breaks, you can keep both parts, if you fix it, please leave a comment here, and/or let me know...
recordings exten => 500,1,Festival,Please record your message
exten => 500,2,Record,mymessage:gsm
exten => 500,3,Festival,You said
exten => 500,4,Playback,mymessage
exten => 500,5,Festival,Press 1 to continue or 2 to change your message
exten => 500,6,ResponseTimeout,3
exten => t,1,Festival,Sorry, I did not get that
exten => t,2,Goto,500|5
exten => i,1,Festival,Sorry, that is an invalid choice
exten => i,2,Goto,500|5
exten => 1,1,System,/bin/mv /var/lib/asterisk/sounds/mymessage.gsm /var/lib/asterisk/sounds/local/`date +%s`.gsm
exten => 1,2,Festival,Thank you, your recording has been saved.
exten => 1,3,Festival,Press 3 to record another file or 4 to hang up
exten => 2,1,Goto,500|1
exten => 3,1,Goto,500|1
exten => 4,1,Hangup
Hmmm, newer versions of asterisk include a variable with current unixtime, I wrote this ages ago.
VoIP SIP SDK is a soft phone sdk solution to quickly build voip softphone to dial and receive phone calls or add voip chat features in your software application.
VoIP SDK provides a powerful and highly customizable solution (SDK includes such features: SIP activeX control, Dynamically loadable codecs, DTMF, STUN support, IM interface, Adaptive silence detection and many more) to quickly add SIP based dial and receive phone calls (to make a long story short - voip client) features in your software applications. It accelerates the development of SIP compliant softphone with a fully-customizable user interface and brand name.
...
Comments
333Recording a G.711 mu-law stream to avoid transcoding
If an inbound audio stream is using the G.711 mu-law codec, in what format should I record a message so G.711 mu-law is the codec used in the resultant audio files?
Also, If the above format is not .wav, what kind of performance hit should one expect when recording an incoming G.711 mu-law audio stream as a .wav file?
Thanks,
James
333wav format
333Anotger example
Just paste this to your extensions.conf and include the recordings context for your line. If this breaks, you can keep both parts, if you fix it, please leave a comment here, and/or let me know...
recordings
exten => 500,1,Festival,Please record your message
exten => 500,2,Record,mymessage:gsm
exten => 500,3,Festival,You said
exten => 500,4,Playback,mymessage
exten => 500,5,Festival,Press 1 to continue or 2 to change your message
exten => 500,6,ResponseTimeout,3
exten => t,1,Festival,Sorry, I did not get that
exten => t,2,Goto,500|5
exten => i,1,Festival,Sorry, that is an invalid choice
exten => i,2,Goto,500|5
exten => 1,1,System,/bin/mv /var/lib/asterisk/sounds/mymessage.gsm /var/lib/asterisk/sounds/local/`date +%s`.gsm
exten => 1,2,Festival,Thank you, your recording has been saved.
exten => 1,3,Festival,Press 3 to record another file or 4 to hang up
exten => 2,1,Goto,500|1
exten => 3,1,Goto,500|1
exten => 4,1,Hangup
Hmmm, newer versions of asterisk include a variable with current unixtime, I wrote this ages ago.