You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just wonder anyone can elaberate on a piece of code below which relates to audio capturing via I2S protocol on the ESP32 S3 platform?
It is excerpted from the CaptureSamples function. My question is why right shift by 14 bits not 16? I tried to find some reference but up to now without success.
Anyone can give some explanation in this matter is highly appreciated.
#if CONFIG_IDF_TARGET_ESP32S3
// rescale the data
for (int i = 0; i < bytes_read / 4; ++i) {
((int16_t *) g_i2s_read_buffer)[i] = ((int32_t *) g_i2s_read_buffer)[i] >> 14;
}
bytes_read = bytes_read / 2;
#endif
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Clarification of code implementation of audio_provider.cc in the micro_speech example
Clarification of code implementation of audio_provider.cc in the micro_speech example (TFMIC-27)
Jun 18, 2024
Dear @vikramdattu, appreciate your explanation.
I would think there might exist some reference which details these technical stuff. It will be immensely helpful if you could please point it out for me (if the reference does exist) and thanks in advance.
I just wonder anyone can elaberate on a piece of code below which relates to audio capturing via I2S protocol on the ESP32 S3 platform?
It is excerpted from the CaptureSamples function. My question is why right shift by 14 bits not 16? I tried to find some reference but up to now without success.
Anyone can give some explanation in this matter is highly appreciated.
The text was updated successfully, but these errors were encountered: