SPH0645 real time capture and playback

Good day,

I have a connected an SPH0645 module to my Jetson Nano 2GB developer kit and have managed to capture a wav file and play it back. I would now like to take my project to a further stage. I would like to be able to perform some signal processing on the incoming audio and play it back e.g. noise reduction. The current command I am using is arecord which generates a wav file of a predetermined time length. How can I go about working in real time? or with minimal delay?

My first idea was to run a while loop which would record a brief segment, process, output, and repeat - but I am hoping there may be a more elegant solution.

Best regards,

Hi Luke,

For the signal processing on captured data, are you using a pre-written (some sort of) plugin based on some framework or having a user space library? Could you provide more details of the pipeline. How much max latency are you targeting (capture------>playback?

As of now I can suggest to write ALSA based application which will provide a better control on captured samples to process and to send samples to the output device. But not sure if this will suit your needs. [You could refer to aplay.c and arecord.c in alsa-utils.]

FYI : arecord output can be piped directly to aplay. You could integrate signal processing code into aplay/arecord and realize the usecase.


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