Page 1 of 1

Sound conversion question.

Posted: Thu Jun 19, 2003 9:50 am
by jcanter
I am trying to use sox to convert from the raw file that the IVR platform records in to a wav format. This is how I am trying to do the conversion:

Code: Select all

sox -r 8000 -b -u -c 1 file.raw -t wav file.wav
The wav file that this generates is has horrible static. Does anyone know what I am doing wrong here?

Posted: Thu Jun 19, 2003 12:32 pm
by jcanter
Also, I found this in a FAQ:
You can use WAV files with these specifications:
- channels: mono
- sample rate: 8 kHz
- encoding: either 16 bit linear, 8 bit u-law, or a-law coding (.wav).

You can also use headerless audio files with 8 kHz, 8 bit u-law (.ul) or a-law (.al) encoding.

All of these formats can also be used for fetchaudio and transferaudio.

For more information, see <audio> in the Programmer's Reference Guide.[/url][/code]
However, when I try to play a file back that I have just recorded, I get this error:
Thu 19 Jun 2003 01:26:28 PM EDT (000002;015;1056034941) [prompt] ERROR: Unsupported file type of text/html; charset=iso-8859-1
in PVXpromptSourceURL constructor
Thu 19 Jun 2003 01:26:28 PM EDT (000002;015;1056034941) [prompt] EVENT: Created audio source object for wavs/dva/dva/5843.raw
Thu 19 Jun 2003 01:26:28 PM EDT (000002;015;1056034941) [prompt] ERROR: Unrecognized format in pvxPromptConvertCopySource
Thu 19 Jun 2003 01:26:28 PM EDT (000002;015;1056034941) [prompt] ERROR: Failure during pvxPromptConvertCopySource
Thu 19 Jun 2003 01:26:28 PM EDT (
I am assuming that the file I just recorded should be 8 bit u-law which, according to the FAQ, should allow the IVR to play back the file it just recorded.

Posted: Thu Jun 19, 2003 1:00 pm
by jcanter
Ok, I figured out how to convert the files with sox:
sox -r 8000 -b -U -c 1 file.raw -t wav -U -w -r 800 file.wav
However, I would still like to know about the IVR playing back headerless files.[/quote]

Playing recorded u-law audio files using the IVR platform

Posted: Thu Jun 19, 2003 1:50 pm
by support
To play recorded audio files, the Plum Voice Platform first checks the MIME type of the source file returned by the IVR application server. If no MIME type is returned, then the IVR platform checks the file extension to infer the file format.

If you're having trouble playing back recorded 8 bit u-law header audio without converting to WAV, check the following:

1. Check that the path to your audio file is correct by browsing to the audio src URL using your web browser. The error message:

Code: Select all

Unsupported file type of text/html
often indicates an error message being returned by your IVR application server.

2. Check the MIME type returned by your application server using your web browser. Netscape Navigator will report usually report the type. Your IVR application server should be sending the file as MIME type audio/basic.

3. If you are unable to configure your application server to send the correct MIME type, then set the file extension to one of extensions mapped in your Plum IVR Platform configuration through the PlumVP admin UI or in the file plumvp.cfg. By default, the following extensions are mapped to type audio/basic:
  • .ul
    .ulaw
    .pcm
For a-law, use the MIME type audio/x-alaw-basic or the extensions .al or .alaw.

IVR developers at Plum use SoX for conversions

Posted: Thu Jun 19, 2003 1:51 pm
by support
Here's what IVR developers at Plum use for converting 8 bit u-law headerless files to wav:

Code: Select all

sox -r 8000 -U -b -t raw recording.raw recording.wav

Re: Playing recorded u-law audio files

Posted: Thu Jul 17, 2003 11:20 am
by jcanter
support wrote:To play recorded audio files, the Plum Voice Platform first checks the MIME type of the source file returned by the application server. If no MIME type is returned, then the platform checks the file extension to infer the file format.

If you're having trouble playing back recorded 8 bit u-law header audio without converting to WAV, check the following:

1. Check that the path to your audio file is correct by browsing to the audio src URL using your web browser. The error message:

Code: Select all

Unsupported file type of text/html
often indicates an error message being returned by your application server.

2. Check the MIME type returned by your application server using your web browser. Netscape Navigator will report usually report the type. Your application server should be sending the file as MIME type audio/basic.

3. If you are unable to configure your application server to send the correct MIME type, then set the file extension to one of extensions mapped in your Plum Voice Platform configuration through the PlumVP admin UI or in the file plumvp.cfg. By default, the following extensions are mapped to type audio/basic:
  • .ul
    .ulaw
    .pcm
For a-law, use the MIME type audio/x-alaw-basic or the extensions .al or .alaw.
My application was returning files with the .ul and .ulaw extension with the mime type of text/html. However, placing the .ul or .ulaw extensions on the files I was trying to play did not correct the issue. I checked the plumvp.cfg and these files were mapped to play as audio/basic in that file. I was able to get this working by editing /usr/local/apache/conf/mime.types and adding the .ul and .ulaw extensions as audio/basic mime types.