Raw Audio Data Noise

Description
Hello everyone, I tried to follow this to get raw audio data and successfully save it to local file audio.pcm

However, when I open in Audacity (signed 16 bit, little endian, mono, 32000Hz), I cannot hear my voice because it full with noise. I cannot apply noise reduction too, because the noise only contains when I speak. The waveform looks like this,

I tried to apply some effect (amplify, low pass filter, telephone eq, etc) and after that I can barely hear my voice. But it is still unclear because the noise is still dominant.

I want to ask, is this noise expected behavior? How can I remove this noise? Is there any post processing I need to do after I get the raw data?

Thank you in advance,

Which Windows Meeting SDK version?
zoom-sdk-windows-5.13.5.12103

Device (please complete the following information):

  • Device: Asus
  • OS: Windows 10

Additional context
I’m using my Macbook to start meeting with normal Zoom application and talking with built in microphone (no external microphone).
I’m using my Windows laptop to start the SDK demo and joins the meeting with mute mic setting. I can also hear the voice clearly in the meeting.

Hi @r.i ,

Could you try using ffmpeg to convert your audio.pcm to a wav file?

ffmpeg.exe -f s16le -ar 32k -ac 1 -i audio.pcm audio.wav

Hello @chunsiong.zoom

I have tried the command.
But the audio.wav is no different from the pcm, it still contains noise and I cannot hear my voice.

Hi @r.i ,

You should not hear those noise mentioned in your thread, unless they are something intentionally picked i[ by the microphone.

Can you share the code on how you are saving the PCM file?

Hello @chunsiong.zoom

Here is the link to the repo containing my code to save PCM file

In the raw_data_manager.startRawData I also start MyManager.start and open audio.pcm file.
When raw_data_manager.onMixedAudioRawDataReceived called, I send it to MyManager.send and write it to audio.pcm.

Hi @r.i .

I’m doing something like this

I do try to delete the PCM file manually every time I run my application, as there is possibility of corruption from previous runs and build.

Deleting and starting with a new .pcm file would prevent possibility of corrupted / mixed data from previous debug runs.

Hello @chunsiong.zoom

Thanks for your suggestion.
I already tried to delete the file before running.
But when I open the file, my ofstream variable is always null and fails to create the file.

I tried to create the file manually and my ofstream variable is not null.
But when I write the file, it always overrides it instead of appending it.

I also tried to create a small main program containing the exact same code.

static ofstream pcmFile;
pcmFile.open("audio.pcm", ios::out | ios::binary | ios::app);
pcmFile.write((char *) &dummy, sizeof(DummyClass));
pcmFile.flush();
pcmFile.close();

And it works perfectly. When I delete the audio.pcm file, it can create it.
And when I call the function multiple times, it appends to the file.

I’m still figuring out why this weird behavior happens.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.