exporting wav to ulaw

This section is now closed.

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.

Re: exporting wav to ulaw

Permanent link to this post Posted by 41142 » Wed Jan 26, 2011 9:10 pm

Thanks - that solved the length issue - now my issue is the same as the previous poster...

I will investigate other options.
41142
 
Posts: 3
Joined: Wed Jan 26, 2011 1:16 am
Operating System: Please select

Re: exporting wav to ulaw

Permanent link to this post Posted by 41142 » Thu Jan 27, 2011 5:15 pm

All,

An update in the spirit of helping folks not having to stumble over this as long as I did...

We are trying to feed these files into an AVST voicemail system - and why it cannot be made to support normal format's I will never understand...

But in seach of another program - since Winamp 2.80 is ancient - I tried WavePad - and it did not work originally - when I did the file conversion using the built-in option for .au/Next encoding.

However, I found if I do WAV format and go to advanced option, select CCITT u-law, 8k, 8bit, mono the export has a header much closer to the Winamp version - and it plays fine in the AVST system.

We have asked that AVST update their documentation to show the converstion process - as well as integrate a more portable widespread format into their system.
41142
 
Posts: 3
Joined: Wed Jan 26, 2011 1:16 am
Operating System: Please select

Re: exporting wav to ulaw

Permanent link to this post Posted by Leland » Sat Mar 05, 2011 9:51 pm

Does this information help out at all?

http://snafder.blogspot.com/2011/01/saving-wav-files-in-ccitt-u-law-format.html

Leland

EDIT: To save time for anyone who doesn't read past this post - those steps will as of March 2011 only produce a file with a 16-byte fmt chunk, and most telephony applications will want the standard U-Law 18-byte chunk.

To workaround it, install SOX and export from Audacity using (external program) as described in Leland's further post below.

Gale
Last edited by Leland on Fri Apr 24, 2015 3:26 pm, edited 3 times in total.
Reason: link to workaround exporting using SOX
Leland
Developer
 
Posts: 138
Joined: Thu Jul 26, 2007 8:55 pm
Operating System: Please select

Re: exporting wav to ulaw

Permanent link to this post Posted by Leland » Sun Mar 06, 2011 2:39 am

It is very clear that the additional 2 bytes should be included for non-PCM format WAV files according to Microsoft specs. See the Revision 3.0 pdf located here:

http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html

So, libsndfile is definitely getting it wrong, no matter if some apps can't handle greater than 16 bytes. Those are the apps that are broken.

Leland
Leland
Developer
 
Posts: 138
Joined: Thu Jul 26, 2007 8:55 pm
Operating System: Please select

Re: exporting wav to ulaw

Permanent link to this post Posted by Leland » Sun Mar 06, 2011 3:11 am

For you AVST users, it looks to me like you should be able to use plain old PCM WAV files. At least the (oldish) Automated Agent manual that I am looking at say that you can:

Recording Voice Prompts
Automated Agent prompts must be recorded and stored on disk as RIFF WAV
format files in the following audio formats:
• Linear PCM encoding, G.711 A-law, or G.711 μ-law
• 8.0 KHz (8,000 samples per second)
• 8 bits per sample
• Monaural
• No data compression applied

If that is still true, then you may be okay since PCM WAV files are not supposed to have the 2 extra bytes.

Leland
Leland
Developer
 
Posts: 138
Joined: Thu Jul 26, 2007 8:55 pm
Operating System: Please select

Re: exporting wav to ulaw

Permanent link to this post Posted by Leland » Sun Mar 06, 2011 3:41 am

Gale Andrews wrote:The point is that (probably) Audacity 1.3.12 could use SOX for exporting a WAV with U-Law encoding, by choosing (external program) when you export.


Yepper, just tried it. I downloaded the Windows installer from http://sourceforge.net/projects/sox/files/sox/14.3.1/, installed it using default directory, and used the following in Audacity's command line exporter to create a similar file as yours:

C:sox-14-3-1sox -t wav - -e u-law "%f"

Leland
Leland
Developer
 
Posts: 138
Joined: Thu Jul 26, 2007 8:55 pm
Operating System: Please select

Re: exporting wav to ulaw

Permanent link to this post Posted by Gale Andrews » Wed Mar 09, 2011 11:28 am

Well, Leland approached libsndfile, but Erik was not enthusiastic about making libsndfile respect the standard 18-byte fmt chunk for U-Law and A-Law with WAV headers.

So Leland has made a patch for libsndfile to export an 18-byte fmt chunk when you choose "Other Uncompressed Files" with the "Options" set to Header: "WAV (Microsoft)" and Encoding: to either "U-Law" or "A-Law".

Exporting U-Law and A-Law with WAVEX headers is unchanged (the fmt chunk is 40 bytes, and I think most telephony applications will not accept those files).

An example 18-byte file is attached. Please try it and let us know.

If this works, then the plan is to offer the patch to libsndfile, but we'll patch our copy of libsndfile anyway, even if libsndfile want to carry on defying the standard. My logic would be that this benefits far more people that it hurts. I'll talk to Leland about what we could do for anyone whose app insists on 16-byte U-Law/A-Law.




Gale
Attachments
aud_patched_wav_ulaw.wav
(234.43 KiB) Downloaded 515 times
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: exporting wav to ulaw

Permanent link to this post Posted by Gale Andrews » Tue Mar 22, 2011 3:41 am

It would seem that when Leland and Erik corresponded, there was a bit of a misunderstanding about what the problem was, however libsndfile 1.0.24 which is to be released soon will change to using an 18 byte fmt chunk for U-Law and A-Law files with WAV headers.

It isn't quite clear yet whether we can get libsndfile 1.0.24 into our upcoming 1.3.13 Beta, but hopefully sooner or later U-Law/A-Law files exported via Audacity's "Other Uncompressed files" option should work in telephony applications. Meantime, please export via SoX using Audacity's "(external files)" option.


Thanks, Erik!



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: exporting wav to ulaw

Permanent link to this post Posted by Gale Andrews » Sun Apr 03, 2011 7:18 pm

Gale Andrews wrote:It isn't quite clear yet whether we can get libsndfile 1.0.24 into our upcoming 1.3.13 Beta

Barring any last-minute problems with testing, 1.3.13 Beta will use libsndfile 1.0.24 and so will have the fix for 18 byte U-Law/A-Law.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: exporting wav to ulaw

Permanent link to this post Posted by rjlr » Mon May 16, 2011 3:01 pm

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.
rjlr
 
Posts: 1
Joined: Mon May 16, 2011 2:48 pm
Operating System: Please select

PreviousNext

Return to Windows



Who is online

Users browsing this forum: No registered users and 6 guests