Open kevin-farhat opened 3 months ago
you don't need to do generateNoiseProfile
Thank you for your response. When I don't do generateNoiseProfile
, the output audio is the same as the input audio with no noise reduction.
This is the script i'm using:
import os
from tqdm import tqdm
# input_dir = '/home/ubuntu/denoising/DNS_data/datasets_fullband/noisy_audios'
input_dir = '/home/ubuntu/denoising/audios/noisy_audios'
output_dir = '/home/ubuntu/kevin/denoising/Audio-Denoising/'
os.makedirs(output_dir, exist_ok=True)
wav_files = [f for f in os.listdir(input_dir) if f.endswith('.wav')]
for file in tqdm(wav_files):
in_audio_file = os.path.join(input_dir, file)
out_audio_file = os.path.join(output_dir, f"results2/denoised_{file}")
print(in_audio_file)
print(out_audio_file)
audioDenoiser = AudioDeNoise(inputFile=in_audio_file)
audioDenoiser.deNoise(outputFile=f"{out_audio_file}")
# audioDenoiser.generateNoiseProfile(noiseFile=in_audio_file)```
Not sure why but the denoised audio sounds like cut off sounds or little pulses of sound that have nothing to do with the original audio. The original audio is a speaker with some background noise, but the output sounds as if someone is plugging in and out their electric guitar really quickly (like the speaker pop sound). I am new to this so I do not understand the underlying tech, but why does the generateNoiseProfile function overwrite the input audio file. Should i be passing the input audio file to the generateNoiseProfile function? without calling generateNoiseProfile, my input and output audio sounds the exact same. I am also getting the warnings below, but I believe I read somewhere that the divide by 0 error is okay. Any explanation of how to use this properly and what might be causing my problems would be appreciated.
Thank you for the help!