I have a technical question for you and hope that someone could help me.
I am looking for a possibility to pass through the noise that the microphones of a Matrix Creator board are listening, directly to the audiojack of my Raspberry. Similar like an megaphone or something.
The only solution I found was to record something and playback it after again, but noting in real-time. I hope that anybody can help me.
Will not happen, input and output both use the same bus to read/write to the SPI.
Simultaniously will crash your app
Welcome to our community!
The audio driver was written for concurrent reading/writing so what you are suggesting should be possible!
I have never tried this myself though. I found this thread that you could modify to test out. I will do the same & get back to you with my findings!
thanks for your help. I’m trying my luck. I am excited for your findings.
I found a function to Record and Play in realtime (Short Delay) but the output is only a Noise. Do you have an idear so solve it?
Process audio data:
If you want to listen to what is currently being recorded via the microphone for tests, you can transfer the sound from arecord directly to aplay via pipe. However, there is a slight delay between recording and playback:
arecord -t wav -D plughw:0,0 | aplay -D plughw:0,0
Wow, I didn’t realize it was as simple as piping arecord to aplay, that makes sense!
I just tested with a version of your command that worked for me and I was able to hear myself speaking with a delay and some recursive nature of course.
I used the following mod on your command.
arecord -f S16_LE -t wav -D plughw:2,0 | aplay -D plughw:0,0
-f S16_LE part means Signed 16 bit Little Endian. That is the format the MATRIX mics accept.
The other part that may be contributing to noise for you is your microphone hardware device number. Generally, on our devices, this is
plughw:2,0 (card 2, device 0). You can quickly check what it is for you by typing
arecord -l in your terminal. It should show up like below. Then you can adjust the
plughw number accordingly.
Hope this helps!
Sorry for the late reply. I hadn’t considered that. Thank you for your help. This is exactly what I wanted.