Thursday, January 16, 2014

How to merge wav files in linux for asterisk IVR

For example, for lazy admins, its possible to combine some asterisk system sounds into IVR. This is how to merge them and insert a pause. And on the end - sending to specified email for checking:


# Making first part. After it we need a pause:
wavmerge good-morning.wav thank-you-for-calling.wav

# Renaming from default
mv -f merge.wav merge1.wav

# Inserting pause in 1 second:
sox merge1.wav "|sox our-business-hours.wav -p pad 1" merge2.wav


# Adding more files
wavmerge merge2.wav 9.wav hours.wav 12.wav hours.wav 13.wav hours.wav 18.wav hours.wav and.wav day-1.wav day-5.wav

# Renaming from default
mv -f merge.wav merge3.wav


# Inserting pause in 1 second:
sox merge3.wav "|sox this-call-may-be-monitored-or-recorded.wav -p pad 1" merge1_4.wav

# Sending by email:
echo "This is latest recording" | mutt -a "merge1_4.wav" -s "new recordimg out" -- youremail@gmail.com

No comments:

Post a Comment