https://github.com/JorenSix/TarsosDSP
For years I have eye'd this library with the idea that it would be a great service for mrl. Ray I believe is interested in creating an new mouth service for InMoov. I think we are both thinking of the possiblity of monitoring the output line and generating events to move the mouth appropriately.
Above is one of their examples for sound detection. They have many other examples too.
TarsosDSP I believe was designed primarily as a supporting library to be included in other projects. Also a DSP library can be useful for analysis and detection of "any" form of digital input, including but not limited to audio.
This is exactly what we need
I think this would be a good fit.
In the example, they are using the Pulse Audio mixer, so most likley a linux system was used for the example graphs :-)
If it lists the currently installed Audio sources, the on the Raspberry Pi running Raspbian, then it would list the Alsa Mixer, as well as any other microphones installed.
This would work.
We can then set one or more theshold values, when the sound level is greater than, we set the jaw to an open position.
When it is less than the threshold value, we set the jaw to the close position.
It would then be possible to set multiple levels if needed to give different amounts of open.