Script/batch convert WAVs from 32 to 8 bit?

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
alfarom
Posts: 1
Joined: Wed Jul 18, 2012 10:14 am
Operating System: Please select

Script/batch convert WAVs from 32 to 8 bit?

Post by alfarom » Tue Jun 09, 2020 10:52 am

I have a several hundred audio files that are waves, and 8khz mono, but are 32 bit. I need to convert them for the phone system to the following format:

CCITT mulaw (8bit, 8khz, mono, wav)

I was wondering if Audacity script/batch capability will help me accomplish this quickly?
I 'think' the only change it actually has to make is the bit rate from from 32 to 8 bit. I use audacity all the time to make or change to the proper format, but since I have been delivered a lot of files, just wanted to automate that if possible for a quick conversion.

Thank you so much for any help, or any other suggestions that could steer me in the right direction!

-Michael

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

Re: Script/batch convert WAVs from 32 to 8 bit?

Post by steve » Tue Jun 09, 2020 6:31 pm

Yes Audacity can help.
You need to make a Macro containing the "ExportWAV" command.

Before using the Macro you need to "prime the pump". The ExportWAV command does not have any parameters - it uses the last used settings, so before running the Macro, manually export a file as 8-bit WAV.

If you need to change the sample rate as well, then you will need to add the "Set Project" command before the "ExportWAV" command. In the "Set Project" settings, ensure that "Rate" checkbox is selected, and the required sample rate.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

NoSloppy
Posts: 10
Joined: Sun Jan 12, 2020 9:48 pm
Operating System: macOS 10.14 Mojave

Re: Script/batch convert WAVs from 32 to 8 bit?

Post by NoSloppy » Mon Oct 19, 2020 10:39 pm

steve wrote:
Tue Jun 09, 2020 6:31 pm
Before using the Macro you need to "prime the pump". The ExportWAV command does not have any parameters - it uses the last used settings, so before running the Macro, manually export a file as 8-bit WAV.
This is not working for me. The export window is defaulting to Windows 16bit every time it's invoked, and if I change it to custom, I can export custom, but then the following macro export is executed using the default Windows 16bit anyway.

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

Re: Script/batch convert WAVs from 32 to 8 bit?

Post by steve » Mon Oct 19, 2020 11:22 pm

Which version of Audacity do you have? (look in "Help menu > About Audacity").
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

NoSloppy
Posts: 10
Joined: Sun Jan 12, 2020 9:48 pm
Operating System: macOS 10.14 Mojave

Re: Script/batch convert WAVs from 32 to 8 bit?

Post by NoSloppy » Sun Oct 25, 2020 3:32 am

steve wrote:
Mon Oct 19, 2020 11:22 pm
Which version of Audacity do you have? (look in "Help menu > About Audacity").
Thanks Steve. I updated to 2.4.2 and it's working now. Now I have other issues in a new post regarding dialog default buttons.

Post Reply