What's the path-directory where the Temporary file from "Get Noise Profile" is saved?

What is the path and directory in which the said temporary “sampled noise” file is created, when I go from EffectNoise Reduction…Get Noise Profile, and saved?

My version is Audacity 2.4.2 from Debian Bullseye installed from the ISO of Official Debian GNU/Linux Live 11.6.0 lxde 2022-12-17T11:46

I would like to access that file for my further accomplishing my learning objective.

I have heard that the profile is just save in RAM.

You meant “saved” in RAM?
How is it accessible programmatically from within Audacity? Object(s) used?

Have a look-see: https://github.com/audacity/audacity/blob/master/src/effects/NoiseRemoval.cpp

Thank you, Mr. Jademan, for the indication.
Yes, checked. It writes the sample in buffer, e.g., track->Get((samplePtr)buffer.get(), floatSample, samplePos, blockSize)

So could this buffer be parallelly written on to a file on the HDD? Could I please be helped in this regard?

It is assumed that the line would be required:
#include <fstream>
Then in the ProcessOne function, where you process the samples, after the line FinishTrack();, the following code needs to be added to write the buffer to a file:

std::ofstream outFile(“output.wav”, std::ios::binary);
if (outFile.is_open()) {
outFile.write(reinterpret_cast<const char*>(mOutOverlapBuffer.get()), mWindowSize / 2 * sizeof(float));
} else {
// Handle the case where file opening fails
wxMessageBox(wxT(“Error opening the output file!”), wxT(“Error”), wxICON_ERROR | wxOK);

This insertion could help writing the noise buffer on to a file. But audacity is a huge program. I don’t think I would be able to manage the complexity.

So could a script file like .ny be given me for the purpose please?

Please for instance help me with the following script to capture the noise buffer into a file as follows:

; Nyquist plug-in for saving noise buffer as a file in Audacity

; Set the file path where you want to save the noise buffer
(setq file-path “~./noise.wav”)

; Get the noise buffer
(setq noise-buffer (get-info :noise-buf))

; Check if the noise buffer exists
(if noise-buffer
; Save the noise buffer as a WAV file
(S-save file-path noise-buffer :header-format 1)
(format t “Noise buffer saved to ~a~%” file-path)
(format t “Error: No noise buffer found. Make sure you’ve selected a portion of audio with noise.~%”)

; End of Nyquist code

But I am failing somewhere. May I please be helped.

In Audacity 2.4.2, the temporary sampled noise file created during Noise Reduction can typically be found in the system’s temporary directory. You can usually locate it by checking the default temporary directory for your operating system. On many Linux systems, this directory is “/tmp/”.

Keep in mind that the exact path may vary based on your system configuration. You can check Audacity’s preferences or settings for any specified directories related to temporary files.

Thank you, Mr. Osman, for your reply.

I have set a large partition for audacity as the tmp directory. When I open an audio file, a directory projectnnnnnnnnn is created within that directory.
When I sample a segment with the noise effect no file is created in the temporary directory.
I have also checked the system’s tmp directory. There too, no such file is created.
Moreover, the buffer is written in the RAM, as traced on the .cpp source code.
So a little more input would be helpful.

I can’t get involved in things of this nature. Perhaps you could ask on the development discord channel: Audacity dev

Discord forum is unlike Debian or any other BB based forums. A few months back I had once tried to create an account to test Midnight. It got me into such a messy loop that I had to write to the help desk to remove me from Discord and delete every info about me. But today I tried your link to see that my email still is registered.


However, there is no option to recover password.

Imagine! if I had known my password I would have pressed the next button. But I tried, and failed, obviously. Discord appears funny.

Please check the snapshots attached.

I have put in my query as a discussion in the audacity forum, with the link: How to grab Background Noise signals from the silent areas of an audio file?

I put the other questions too on the audacity forum as well, at How to write the Noise Profile data file saved on the RAM to the HDD?

You are likely to get a more timely solution using a 3rd party tool.

Note: Some people have worked out that rather than save the “profile”, they can save the underlying “audio”, then simply do Get Noise Profile whenever it is needed.

Thank you, Mr. Jademan, for replying to my post.
Yes, I can do that too. But please also consider that the Noise Profile would be of much lesser file size, far more optimised for data per kb and far compact in nature.

Could you kindly elaborate on such 3rd party tools?

I am going to defer this to someone else.