I do not speak the language well, but I hope that you will understand me
Tell me how to implement parallel work VAD и AMR?
If you take data from the ring buffer for VAD, the AMR encoder does not receive them.
Code: Select all
.....
audio_pipeline_register(pipeline, i2s_stream_reader, "i2s"); // Read data PDM microphone
audio_pipeline_register(pipeline, amr_encoder, "Wamr");
audio_pipeline_register(pipeline, raw_read, "raw");
const char * test[] = {"i2s", "Wamr", "raw"};
audio_pipeline_link(pipeline, test, 3);
.....
raw_stream_read(i2s_stream_reader, (char *)vad_buff, VAD_BUFFER_LENGTH * sizeof(short));
// Feed samples to the VAD process and get the result
vad_state_t vad_state = vad_process(vad_inst, vad_buff);
...
uint16_t n = raw_stream_read(raw_read, (char*)buff, 64); // Read result AMR encoder