Difference between revisions of "Convert WAV file to Asterisk playable format"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=== Linux ===
= Linux =
<mkmeta>Detailed instruction how to prepare WAV files to be played by Asterisk</mkmeta>




Line 8: Line 9:
If '''file1.wav''' is any WAV file, then executing this command:
If '''file1.wav''' is any WAV file, then executing this command:


  /usr/bin/sox file1.wav -r 8000 -c 1 -s -w file2.wav resample -ql
  /usr/bin/sox file1.wav -r 8000 -c 1 -s file2.wav -q


you will get Asterisk playable WAV file: '''file2.wav'''
you will get Asterisk playable WAV file: '''file2.wav'''
Line 19: Line 20:
  ls >/tmp/a
  ls >/tmp/a
  for i in `cat /tmp/a`; do
  for i in `cat /tmp/a`; do
     /root/folder_with_Voices/convert_mp3wav2astwav.sh $i /root/folder_with_Voices/rdy/$i
     /usr/src/mor/x5/scripts/convert_mp3wav2astwav.sh $i /root/folder_with_Voices/rdy/$i
  done
  done


=== Recording a sound-file in Windows ===
= Recording a sound-file in Windows =


We will show you an example using a free program, called [http://audacity.sourceforge.net/ AUDACITY]
We will show you an example using a free program, called [http://audacity.sourceforge.net/ AUDACITY]
Line 28: Line 29:
* Download and install the program
* Download and install the program


* Next, open Audacity and record the audio file that you need
* Next, open Audacity and record the audio file that you need:


[[File:Record.PNG]]
[[File:Record.PNG]]
* After you made the recording, save save sound file in .WAV format from the File menu:
[[File:Save.PNG]]
* Choose the Export option in the menu:
[[File:Export.png]]
* And save the file in .WAV format:
[[File:Export1.png]]
* Afterwards, you can upload the sound file easily through the [[How to change default voice prompts for dial plan? | MOR GUI:]]
* Best of all Audacity also works on Linux!!
=See also=
* [[How to set language for Calling Cards]]<br>
* [[Sound files]]

Latest revision as of 09:25, 31 August 2015

Linux


Install SOX:

yum install sox or apt-get install sox

If file1.wav is any WAV file, then executing this command:

/usr/bin/sox file1.wav -r 8000 -c 1 -s file2.wav -q

you will get Asterisk playable WAV file: file2.wav


Use following script if you need to convert multiple files:

#!/bin/bash

ls >/tmp/a
for i in `cat /tmp/a`; do
   /usr/src/mor/x5/scripts/convert_mp3wav2astwav.sh $i /root/folder_with_Voices/rdy/$i
done

Recording a sound-file in Windows

We will show you an example using a free program, called AUDACITY

  • Download and install the program
  • Next, open Audacity and record the audio file that you need:

Record.PNG

  • After you made the recording, save save sound file in .WAV format from the File menu:

Save.PNG

  • Choose the Export option in the menu:

Export.png

  • And save the file in .WAV format:

Export1.png

  • Afterwards, you can upload the sound file easily through the MOR GUI:
  • Best of all Audacity also works on Linux!!

See also