Installing Audacity with custom settings

So I’m trying to install Audacity with some settings already set using audacity.cfg
I need to have the playback and mic volume set to max, the sample rate to 8000hz, and sample format set to 16-bit
I am currently writing the following to audacity.cfg before first launch


The Sample Format and SplashScreen are working properly, but the Sample Rate keeps resetting to 44100hz.
How do I prevent Audacity from changing the the sample rate during first launch?

The default sample rate sets the sample rate for new projects, and can be seen in the “Project Rate” box in the lower left corner of the main Audacity window. This default will determine the sample rate when recording into a new project.

If you import a file into an empty Audacity project and the imported file has a different sample rate from the Audacity project, then the imported file will override the default project rate. In my opinion, this was a bad design decision, but Audacity has worked this way forever and people don’t like change.

That’s not recommended. This setting has no affect on the export format, it just reduces the precision when processing audio and introduces the possibility of permanent clipping damage if the audio goes over 0 dB. This is another very old option, and was included because in the old days, disk space was limited / expensive and it allowed Audacity to record for a bit longer when the computer was critically short of disk space (before crashing). In my opinion, this option should have been removed years ago - with the price / size of hard drives these days, there’s little excuse for working with critically little disk space.

OK so how to I set the default ‘Project Rate’ for new Projects. Currently after first launch its changing instead of staying at 8000hz

This was dictated by the instructions that were given to me. I think this will just be used for interviews.

I’m just trying to automate as much of the instructions I was given as possible. This isn’t a real deal breaker, but more of an inconvenience, and 1 more thing I have to MANUALLY adjust.

You need this in the audacity.cfg file:


Note that the word in square brackets is important. That defines a section in the preferences. Audacity looks for the “DefaultProjectSampleRate” setting in the “SamplingRate” section.

Either the instructions are wrong, or you have misinterpreted them. The sample format should be set to 32-bit float.

I assume that the instructions are intended to produce a 16-bit file, but the default sample format has no affect on the exported file. Only the export settings affect the export “format” (and the “Project Rate” setting controls the export “sample rate”).

Where are these instructions?


This is everything in the audacity.cfg that gets copied to the Audacity appdata folder. Note that this is done after installation before first launch of Audacity. DefaultProjectSampleFormatChoice and ShowSplashScreen both work as intended

here is the section of the instructions i am trying to script

o	Install most recent version of Audacity
o	Copy “lame_enc.dll” Audacity file from program folder to C drive**
o	Install microphone
o	Increase playback volume to maximum
o	Increase microphone volume to maximum
o	Control Panel > Hardware and Sound > Sound > Select the microphone > Properties > Levels > 
o	Increase Microphone and boost levels to MAX 
o	Open Audacity – move microphone volume to max - set preferences (Quality - sample rate: 8000HZ & sample format  to 16-bit; File Formats – Bit rate 16)
o	Test recording and .mp3 export process linking program to lame_enc.dll file. Save a test file to folder. After the export box closes, click OK – X to close – No for save changes. (Once a test file is save in this folder that will be the default folder that the program will use for exporting.)

The instructions maybe (and probably is) full of errors, but at this point i’m just tryting to make the client happy, at the expense of my sanity

I know you don’t need any more posts like this, but 8000 sample rate is just slightly better quality than AM radio. Recording original speech that way is not recommended. You can make 8000 later if you have to with the possibility of less sound damage.


What’s the actual job? 8000 is a typical standard for telephone answering systems and voice prompts.

“Press four if you’re calling from a rotary-dial telephone.”

If that’s the job, then you’re stuck, although I would still record high quality and make their lower quality product later. You can always work downhill. You can’t go back up.

“We got a new phone system with higher quality sound!!” There’s all your low quality work right in the trash.


I can’t say much because I don’t know much but my understanding is they interview addicts in recovery.
Your preaching to the choir. My ringtones are a minimum 44.1khz with 32-bit bit rate
I’m just a tech trying to please a client. Why do something 20 times manually when I can script it and never do it in the first place!!

OK, so it seems that what they want is to export an MP3. Did they specify the bit-rate and / or whether it needs to be CBR (constant bit rate)?

I expect your client will be happy if your script produces the result that they want, even if you deviate a little form their description of how it should get to the result.

If they want a low bit-rate (mono) MP3, then best to record at 44100 Hz sample rate, 32-bit float, then export as “64 kbps CBR mono MP3”. That will give you a good quality voice file that is still relatively small (much better quality, and half the size of recording at 8000 Hz 16-bit and exporting as 128 kbps MP3).

My suggestion: Find out exactly what format they need the final exported file to be.

An end-user giving all the required information for a task :astonished::laughing: :laughing: :laughing: LMAO :laughing: :laughing: :laughing: …i need to catch my breath…Nope sure didn’t!!!

I completely agree with this way of thinking, but this more of a reactive (don’t rock the boat) environment than a proactive (look towards the future) environment

My guess is they don’t even know because my contact person doesn’t do any interviews, and these machines are pushing 5-6 years old at this point
I’m going to have to wait until delivery and have them test everything before those things get hammered out.

I would go to the site, and verify these settings, but it seems like something else changes everytime i go there

You could tell them that you “could” do that part, but it’ll cost them $357,842,776.23, or they can have the script without that part for much less :wink:

MP3 doesn’t have a bit-depth (i.e. 16-bits) so go-ahead and leave the floating-point default.

It does have a bitrate (kbps related to file size, the amount of compression and the quality) and it does have a sample rate (kHz or Hz).

It might be easier to use a 3rd-party file converter that’s “permanently” set-up for the desired final-format. Then you can export to WAV or FLAC and the format “details” won’t matter.

It’s an extra step but it might be easier overall. When I just want to convert or compress files (without editing) I use [u]TAudioConverter[/u]. Once it’s set-up it’s just drag, drop, and click. And you can convert several files at once. (I sometimes get a “missing bass.dll” error when I start TAudioconverter, but I just click OK and it works fine.)

…I’ll betcha’ you could use a sample rate of 44.1kHz and they’d never notice! :wink: Some players/player software have trouble with variable bitate MP3s and if file size or download/streaming speeds are an issue you might need a lower bitrate. Otherwise MP3 is fairly universal and foolproof).