I want advice for raw audio data

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

  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.

1 Like

Hey @gosang160,

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

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.

Let me follow up with the team on this one.

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 in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the amplitude of the analog signal is sampled regularly at uniform intervals, and each sample is quantized 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, which is the number of times per second that samples are taken; and the bit depth, which determines the number of possible digital values that can be used to represent each sample.

Thanks!
Michael

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