exporting wav to ulaw

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: exporting wav to ulaw

Post by Gale Andrews » Tue May 17, 2011 11:21 pm

rjlr wrote:I have tried the new beta 1.3.13 and a file exported as uLaw properly works in my telephony application. (I started this thread as jlr; lost my login info). The only other thing I could suggest is that when a file is opened, to be able to tell if it already is uLaw.
Thanks for letting us know. We'll add a vote for your suggestion about providing media information for imported files.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

parrent
Posts: 2
Joined: Thu Oct 18, 2012 9:16 pm
Operating System: Please select

Re: exporting wav to ulaw

Post by parrent » Thu Oct 18, 2012 9:31 pm

I notice most of this thread is from May, 2011. I am using Audacity 2.0.2 Did the libsndfile export fixe referred to earlier get included in this build to include the 18byte chunk? I'm trying to use output from audacity in a telephony applicaiton but it continues to say the file is not supported by the codec.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: exporting wav to ulaw

Post by Gale Andrews » Fri Oct 19, 2012 3:42 am

parrent wrote:I notice most of this thread is from May, 2011. I am using Audacity 2.0.2 Did the libsndfile export fixe referred to earlier get included in this build to include the 18byte chunk?
Yes, unless you compiled Audacity from source code and changed the version of libnsdfile.
parrent wrote:I'm trying to use output from audacity in a telephony applicaiton but it continues to say the file is not supported by the codec.
Please find out what codec, file extension and/or bit depth and sample rate it requires, then we can see if you are setting Audacity correctly.

Some telephony applications want the file to be encoded headerless with ULAW extension. In that case
  • choose 8000 Hz project rate
  • in the Uncompressed Export Options, choose "RAW (header-less)" for header and "U-Law" for encoding
  • add the extension to the end of the file name, for example, "call22.ulaw" (without quotes) then accept the Audacity warning about the non-standard extension.

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

pthdnvr
Posts: 10
Joined: Thu Nov 01, 2012 11:45 pm
Operating System: Please select

Re: exporting wav to ulaw

Post by pthdnvr » Thu Nov 01, 2012 11:56 pm

I've been digging through the forum for some time and this seems to be the best thread (though old) that resembles what I'm trying to do.

I need to create a file in u-law mono wav, 8000 Hz, 64 kbps for a telephony application.
I've tried some of the files attached in this thread but was not successful.
I've also tried to export from Audacity 2.0.2 in other uncompressed files with options set to, and project rate set to 8000 Hz.
Test 1: wav (microsoft) header and U-law encoding
Test 2: wav (Nist Sphere) header and U-law encoding
Test 3: RAW (headerless) with u-law encoding.

None were able to play. I have not tried command with SOX since I need to hand this over to other people to do on a dynamic basic (changing broadcast messages). I am however able to use GoldWave (software) to convert an audacity created wav-16 bit pcm file into the u-law mono, 8KHz, 64 kps (there's a option for this in Goldwave) and the file works when converted with GoldWave. I'd like to do this with Audacity.

Any suggestions?

steve
Site Admin
Posts: 81314
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: exporting wav to ulaw

Post by steve » Fri Nov 02, 2012 1:36 am

If you could post a short sample in the format that works, we may be able to find the Audacity settings to achieve the same format.
See here for how to post files: http://forum.audacityteam.org/viewtopic ... 49&t=64936
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: exporting wav to ulaw

Post by Gale Andrews » Fri Nov 02, 2012 1:48 am

pthdnvr wrote:I need to create a file in u-law mono wav, 8000 Hz, 64 kbps for a telephony application.

I've tried some of the files attached in this thread but was not successful.
I've also tried to export from Audacity 2.0.2 in other uncompressed files with options set to, and project rate set to 8000 Hz.
Test 1: wav (microsoft) header and U-law encoding
Test 2: wav (Nist Sphere) header and U-law encoding
Test 3: RAW (headerless) with u-law encoding.

None were able to play. I have not tried command with SOX since I need to hand this over to other people to do on a dynamic basic (changing broadcast messages). I am however able to use GoldWave (software) to convert an audacity created wav-16 bit pcm file into the u-law mono, 8KHz, 64 kps (there's a option for this in Goldwave) and the file works when converted with GoldWave. I'd like to do this with Audacity.
Are you exporting a mono or stereo file from Audacity? The file should be mono.

The only difference I can see in the headers between the Goldwave export and the Audacity export is that the Goldwave export puts the FACT chunk right at the end of the file after the audio data. As far as I am aware this is not standard.

Attached is:
  1. an unmodified Audacity-exported 8000 Hz 8-bit U-Law-encoded WAV file (the FACT chunk is before the audio data as normal)
  2. the same Audacity-exported 8000 Hz 8-bit U-Law-encoded WAV file but modified so that the FACT chunk is moved to the end of the file
  3. the same Audacity-exported 8000 Hz 8-bit U-Law-encoded WAV file but with the FACT chunk duplicated at the end of the file.
I don't think I would recommend Audacity exporting a file with the FACT chunk at the end in case some applications did not like it, but a duplicated FACT chunk might be OK.

Which of files a, b and c play in your application?

To make these sort of changes yourself, you can use a hex editor.



Gale
Attachments
ulaw_fact_at_end.wav
Audacity 8000 Hz 8-bit U-Law file with FACT chunk moved to end
(234.43 KiB) Downloaded 231 times
ulaw.wav
Audacity 8000 Hz 8-bit U-Law file (unmodified, with FACT chunk before the audio data)
(234.43 KiB) Downloaded 265 times
ulaw_two_facts.wav
Audacity 8000 Hz 8-bit U-Law file with standard FACT chunk before the audio data, but also with that chunk duplicated at the end of the file
(234.44 KiB) Downloaded 231 times
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

snafder
Posts: 3
Joined: Mon Jan 31, 2011 4:11 am
Operating System: Please select

Re: exporting wav to ulaw

Post by snafder » Wed Nov 21, 2012 2:21 pm

Heads up.

For Cisco UCCX 8.0(2) which I use daily - the how to at my Blog still holds true even with the newer versions of Audacity.
http://snafder.blogspot.com.au/2011/01/ ... ormat.html

I've re-imaged my various PC's several times since writing that Blog post and each time I install the latest version of Audacity (haven't bothered to install the old version) and the files generated are working a treat.

Can't vouch for other VoIP systems - but I can vouch for Cisco UCCX 8.0(2).
I suspect it will work with all Cisco VoIP systems - worth a shot.

Our company will be upgrading to Cisco UC version 9 in the next 6 to 12 months. Once we've upgraded, I'll test again and post results.
If anyone else has newer versions of UCCX or other VoIP brands (and versions) that can try the method linked and advise this forum if it works or not.

Cheers,
Snafder

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: exporting wav to ulaw

Post by Gale Andrews » Fri Nov 30, 2012 8:26 pm

Gale Andrews wrote:
pthdnvr wrote:I need to create a file in u-law mono wav, 8000 Hz, 64 kbps for a telephony application.

I've tried some of the files attached in this thread but was not successful.
I've also tried to export from Audacity 2.0.2 in other uncompressed files with options set to, and project rate set to 8000 Hz.
Test 1: wav (microsoft) header and U-law encoding
Test 2: wav (Nist Sphere) header and U-law encoding
Test 3: RAW (headerless) with u-law encoding.

None were able to play. I have not tried command with SOX since I need to hand this over to other people to do on a dynamic basic (changing broadcast messages). I am however able to use GoldWave (software) to convert an audacity created wav-16 bit pcm file into the u-law mono, 8KHz, 64 kps (there's a option for this in Goldwave) and the file works when converted with GoldWave.
The only difference I can see in the headers between the Goldwave export and the Audacity export is that the Goldwave export puts the FACT chunk right at the end of the file after the audio data.
pthdnvr has told me none of the files I posted work in his application. I analysed based on Goldwave 5.55 (a bit old).

Please do post a sample to the Forum and say which version of Goldwave you have.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

pthdnvr
Posts: 10
Joined: Thu Nov 01, 2012 11:45 pm
Operating System: Please select

Re: exporting wav to ulaw

Post by pthdnvr » Wed Mar 20, 2013 9:30 am

Sorry it took a while for me to get back.
As gale mentioned, I tried the files posted by Gale and they did not work in the telephony application.
Audacity 2.0.2

Test_audacity.wav
Audacity settings: frequency was set to 8000 Hz, Mono, 16-bit PCM
Exported as: other uncompressed file
options: Header = WAV (microsoft), Encoding: u-Law

Test_audacity default.wav
Audacity settings: frequency was set to 8000 Hz, Mono, 16-bit PCM
Exported as: WAV (Microsoft) signed 16 bit PCM

Test_Goldwave.wav
Goldwave v5.67
Opened test_audacity_default.wav
Then Saved As, File Type: Wave (*.wav)
Attributes: u-law, 8000 Hz, 64kpbs, mono

The test_goldwave file worked
The test_audacity or the test_audacity_default files did not work.
Attachments
Test_audacity.wav
exported as other uncompressed file with WAV (Microsoft) header and u-law encoding
(10.66 KiB) Downloaded 229 times
Test_audacity default.wav
exported as Wav (Microsoft) signed 16-bit PCM
(21.04 KiB) Downloaded 190 times
Test_goldwave.wav
audacity default file opened with goldwave and saved as Wav with u-law, 8000 Hz, 64kpbs, mono attributes
(10.56 KiB) Downloaded 231 times

steve
Site Admin
Posts: 81314
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: exporting wav to ulaw

Post by steve » Wed Mar 20, 2013 6:23 pm

pthdnvr wrote:The test_goldwave file worked
The test_audacity or the test_audacity_default files did not work.
The only obvious difference that I see is that the Audacity 8000 Hz uLaw file has metadata and the Goldwave version doesn't.
Try clearing the Metadata in Audacity (File menu > Open Metadata Editor, then click the "Clear" button, then click the "OK" button), then export as uLaw as before.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked