Code: Select all
sox -r 8000 -b -u -c 1 file.raw -t wav file.wav
Code: Select all
sox -r 8000 -b -u -c 1 file.raw -t wav file.wav
However, when I try to play a file back that I have just recorded, I get this error: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]
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.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 (
Code: Select all
Unsupported file type of text/html
Code: Select all
sox -r 8000 -U -b -t raw recording.raw recording.wav
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.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:often indicates an error message being returned by your application server.Code: Select all
Unsupported file type of text/html
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:For a-law, use the MIME type audio/x-alaw-basic or the extensions .al or .alaw.
- .ul
.ulaw
.pcm