# I want advice for raw audio data

**URL:** <https://devforum.zoom.us/t/i-want-advice-for-raw-audio-data/49703>\
**Category:** Windows\
**Created:** [May 6, 2021, 3:30am UTC](https://devforum.zoom.us/t/i-want-advice-for-raw-audio-data/49703 "2021-05-06T03:30:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gosang160](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gosang160/32/23936_2.png) [@gosang160](https://devforum.zoom.us/u/gosang160)\
**Post date:** [May 6, 2021, 3:30am UTC](https://devforum.zoom.us/t/i-want-advice-for-raw-audio-data/49703/1 "2021-05-06T03:30:54Z")

</div>

hi, i want to extract audio data and send it to google STT API for translation.

i used onOneWayAudioRawDataReceived callback function to do this.  
i think this callback function is called when audio event occured.  
by file writer in c++, when this is called, data is written in the ‘.raw’ file like below capture

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/4/2407d91fbbdf09f1381a3c6dfa0e9271e3ee134f.png)

1. is it okay? can i get one user’s all audio data during session?

2. i can get channel number and sampling rate of audio date by GetSampleRate(),GetChannelNum(). but i dont know bit per sample, endian of this raw file. how can i know?

3. what is transformation type of zoom audio data? (transformation type means linearpcm, a-law, mu-law…etc). for doing stt api, i should know the type. but i can’t find where is this information.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [May 6, 2021, 6:04pm UTC](https://devforum.zoom.us/t/i-want-advice-for-raw-audio-data/49703/2 "2021-05-06T18:04:08Z")

</div>

Hey @gosang160,

Thanks for using the dev forum! It is nice to see you again 🙂

> [@gosang160](#):
>
> is it okay? can i get one user’s all audio data during session?

If you are trying to get the audio of all users simultaneously, you can use the onMixedAudioRawDataReceived callback instead. If you are trying to get all of the audio for one user throughout the session use this callback and save the audio stream as it comes in.

> [@gosang160](#):
>
> i can get channel number and sampling rate of audio date by GetSampleRate(),GetChannelNum(). but i dont know bit per sample, endian of this raw file. how can i know?

Let me follow up with the team on this one.

> [@gosang160](#):
>
> what is transformation type of zoom audio data? (transformation type means linearpcm, a-law, mu-law…etc). for doing stt api, i should know the type. but i can’t find where is this information.

The audio data here is **Pulse-code modulation** (PCM) sampled analog data, which could be saved as files with extensions like .WAV, .L16, .AIFF, .AU, & .PCM.

According to Wikipedia:

> PCM is the standard form of [digital audio](https://en.wikipedia.org/wiki/Digital_audio) in computers, [compact discs](https://en.wikipedia.org/wiki/Compact_disc), [digital telephony](https://en.wikipedia.org/wiki/Digital_telephony) and other digital audio applications. In a PCM [stream](https://en.wikipedia.org/wiki/Stream_(computing)), the [amplitude](https://en.wikipedia.org/wiki/Amplitude) of the analog signal is [sampled](https://en.wikipedia.org/wiki/Sampling_(signal_processing)) regularly at uniform intervals, and each sample is [quantized](https://en.wikipedia.org/wiki/Quantization_(signal_processing)) to the nearest value within a range of digital steps.
> 
> A PCM stream has two basic properties that determine the stream’s fidelity to the original analog signal: the [sampling rate](https://en.wikipedia.org/wiki/Sampling_rate), which is the number of times per second that samples are taken; and the [bit depth](https://en.wikipedia.org/wiki/Audio_bit_depth), which determines the number of possible digital values that can be used to represent each sample.

Thanks!  
Michael

---

<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 6, 2021, 4:04am UTC](https://devforum.zoom.us/t/i-want-advice-for-raw-audio-data/49703/3 "2021-06-06T04:04:50Z")

</div>

Closed on June 6, 2021, 4:04am UTC

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