Automatic audio source selection with 2 distinct audio inputs

Hello !

I am building a small adaptor that enables me to connect a Bose QC35 headset to a light airplane.

I managed to get the microphone and the sound from radio communications working nicely.

Now, I would like to add a female jack on the adaptor so that I can have music playing while being a passenger.
My problem is that I need some solution to cut the music when someone is speaking on radio (or in the airplane, but it is no different), to be able to hear it. No voice detection is needed. Just maybe a signal detection that determines if the volume from radio communications is loud enough to cut music (some low volume sounds can occur from time to time and should not interrupt the music)

I read some articles about VAD, audio ducking, audio squelching etc... but as the audio inputs (a jack to the airplane radio communications and a jack to music) are physically separated, I am wondring if there could not be a much easier solution. Maybe there is an easy code that detects if a signal is coming from the radio communications wire, and then stops music and lets the communication signal pass ? Through an arduino board ?

Are there are some clickless audio switches : MAX4763 for example. Could that be an idea ?

I am just looking for an easy solution.

Thank you for your help.

You didn't post any details of that. So the answer can only be, just use an audio switching circuit. No details in, no details out.

That could work, but regular electro-mechanical relays are more "foolproof" and straightforward. But the Arduino can't directly-drive a relay coil so you need a driver circuit or there are lots of relay boards with a built-in driver.

The Arduino can read-detect audio, but since it can be damaged by negative voltages you have to protect it from the negative-half of the AC audio signal. There are two solutions... You can bias the input or add a negative-voltage protection circuit.

Bias circuit -

Audio Input Schematic

Protection circuit -

Audio Input Schematic 2

It could also be done with a couple of op-amp circuits - A peak detector, and a comparator. You'd probably also want a timer, although a peak detector has a decay time that can be adjusted. If you were "going into production" this is a better solution since it's cheaper and doesn't require software. But if you are more comfortable with a software-based solution that's fine too.