How to transmit respeaker's data to usb otg port

I want to get the original data of the 6 mics to analyze the Beam-forming effect and i find the example code on the website as follows. (<LINK_TEXT text=“ … ample.html”></LINK_TEXT>)
</s><i> </i>// init libsndfile SNDFILE *file ; SF_INFO sfinfo ; memset (&sfinfo, 0, sizeof (sfinfo)) ; sfinfo.samplerate = rate ; sfinfo.channels = num_channels ; sfinfo.format = (SF_FORMAT_WAV | SF_FORMAT_PCM_24) ; if (! (file = sf_open ("record_base_agc_test.wav", SFM_WRITE, &sfinfo))) { cout << "Error : Not able to open output file." << endl; return -1 ; } while (!stop) { data = respeaker->Listen(); //the raw data I need frames = data.length() / (sizeof(int16_t) * num_channels); sf_writef_short(file, (const int16_t *)(, frames); cout << "." << flush; } cout << "stopping the respeaker worker thread..." << endl; respeaker->Stop(); cout << "cleanup done." << endl; sf_close (file); <e>

I don’t want to put the raw data into a file and need to transmit it throught the USB OTG port.

The sample rate is from 4KHz to 24KHz so the max bandwidth is 24000Hz616bit = 2250Kbit/s. Considering a redundant throughput, it takes 2250*2=4500Kbit/s to fulfill my needs.

Now the USB OTG has been fixed on 115200 bit/s, how to change the speed of the USB OTG ?

Hi there, OTG port is usb2.0, the fast speed is 48MB/s. So you shall be able to do real time audio transfer. thanks.