Description
Dragonfire listens to the audio itself is reproducing and assumes that's the user's voice. And it can enter an endless loop in that situation.
A simple way to solve that problem is to use a noise cancelling technique of the generated sounds by the computer so that the detected sound is only going to be the difference of the ambient sound less the generated sound.
As the volume and the microphone position vary a lot, a scaling factor might suffice for the noise cancellation scheme. Say input_sound = microphone_input - scaler.generated_computer_sound.volume. The scaler can be estimated whenever Dragonfire says Good Evening Sir for example.
Later on Dragonfire can utilize only input_sound as source for processing instead of the raw microphone input.