Is it possible with JavaScript to detect the volume of an audio file currently playing (to stop animation while it's silent)?

Viewed 345

I made a male and female 'talking-head' animation that runs while an audio file is playing. It works well but to make it better I would like the animation (mouth movement especially) to pause during any silence in the audio file. Is there a way with JavaScript to detect silence (or near silence) while an audio file is playing? Note: my application has a button to play and pause the audio.

0 Answers
Related