I'm a software engineer but have very little experience in EE. I'm looking to design a device that takes as input an analog audio signal and adds a chime if certain keywords are detected in the audio stream. The input is otherwise directly passed through to the output.
That's challenging as keyword detection needs compute, and even mathematically needs to have some latency. So, as long as your application works with a second or more of delay between utterance and reaction, that works.
Assume we have a microcontroller that can raise a line high when the right keywords are detected.
I'd seriously consider buying a significant stock of that microcontroller. Keyword detection with different speakers without prior per-speaker training takes compute power that puts this into the realm of application processors.
Your Alexa's reaction isn't based on a microcontroller, more on an application processor in the class of what entry-level smartphones sport.
What would the rest of the circuit look like?
Complicated.
It seems like the simplest approach would be an analog circuit.
Absolutely not. You need to process your signal digitally, so it's already there. Adding analog into this only complicates things.
Otherwise it seems that we would need to pass the input through an ADC, have the microcontroller add the chime digitally and pass it out through a DAC (or use a DSP dedicated to this task)
Yep.
This will presumably add latency
yes, but it's not the ADC nor the DAC that adds latency (at least not measurably), and you can do sub-perceptable digital audio passthrough on common application processors – there's simply no possibility mathematically nor physically to get a classification result before you processed the signal.
Additionally with this approach power is required for the device to work - ideally the fail-case for the device being off/out of power is just the signal passing through untouched.
You could implement that with a simple relay.
There are likely other considerations I don't see yet. How would you approach this problem?
as you're trying to build a complex embedded signal processing system, I'd try to understand the state-of-the-art open source voice assistants out there and how they detect keywords.