Directories Preferences
From Audacity Manual

- Click on any of the other Preferences sections in the above image to go directly to that Preferences page.
Temporary files directory
- Location: Sets the location of Audacity's temporary directory. This is used whenever there is audio data that hasn't yet been saved as an Audacity project.
To change the location of the temporary directory, press , select the directory you require and click . Audacity will then create an "audacity_temp" directory in the directory you selected (on Linux the directory is called ".audacity_temp", signifying it is a hidden directory). Alternatively type the path required for the temporary directory into "Location" and Audacity will use that exact path, creating the new directory if needed.
Exit and restart Audacity for changes to the temporary directory to take effect.
Make sure the temporary directory is located on a fast (local) disk drive with plenty of free space. Avoid using network drives as these may be too slow for reliable recording. A RAM drive will always be quicker than a hard or solid state drive for recording and editing, but unless the RAM contents are saved to a physical drive the data will be lost when the computer powers down.