# Raw Audio Data Noise

**URL:** <https://devforum.zoom.us/t/raw-audio-data-noise/88660>\
**Category:** Windows\
**Created:** [May 19, 2023, 3:30am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660 "2023-05-19T03:30:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.i](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/r.i/32/45941_2.png) [@r.i](https://devforum.zoom.us/u/r.i)\
**Post date:** [May 19, 2023, 3:30am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/1 "2023-05-19T03:30:27Z")

</div>

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

> [@Raw data collection process](https://devforum.zoom.us/t/raw-data-collection-process/84837):
>
> Hello everyone, Description I wanted to share my experience with the raw data collection process using the Zoom Meeting SDK on Windows. I followed the tutorial provided by Zoom, but unfortunately, I was not able to achieve my desired results. As per the tutorial, I implemented an instance of IZoomSDKRendererDelegate to process the raw video data and set up an IZoomSDKAudioRawDataDelegate for the audio raw data. However, even after following the steps mentioned in the tutorial, I did not get t…

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,

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/1/a181c13d2ea436f7f1dfe291dd03768a8ee78bb3.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [May 22, 2023, 3:09am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/2 "2023-05-22T03:09:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![r.i](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/r.i/32/45941_2.png) [@r.i](https://devforum.zoom.us/u/r.i)\
**Post date:** [May 22, 2023, 4:54am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/3 "2023-05-22T04:54:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [May 22, 2023, 8:50am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/4 "2023-05-22T08:50:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![r.i](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/r.i/32/45941_2.png) [@r.i](https://devforum.zoom.us/u/r.i)\
**Post date:** [May 23, 2023, 3:39am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/5 "2023-05-23T03:39:18Z")

</div>

Hello @chunsiong.zoom

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

> **[GitHub - ryanignatius/zoom-bot](https://github.com/ryanignatius/zoom-bot/tree/main)**
>
> main

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.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [May 23, 2023, 3:48am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/6 "2023-05-23T03:48:18Z")

</div>

Hi @r.i .

I’m doing something like this

> <https://github.com/tanchunsiong/MSDK_RawDataDemos/blob/master/GetAudioRawData/ZoomSDKAudioRawDataDelegate.cpp>

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.

---

<div class="post-metadata">

**Author:** ![r.i](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/r.i/32/45941_2.png) [@r.i](https://devforum.zoom.us/u/r.i)\
**Post date:** [May 29, 2023, 5:04am UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/7 "2023-05-29T05:04:06Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [June 28, 2023, 3:04pm UTC](https://devforum.zoom.us/t/raw-audio-data-noise/88660/8 "2023-06-28T15:04:32Z")

</div>

Closed on June 28, 2023, 3:04pm UTC

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