title: get playing wav audio level as output
body: <p>I want to make a speaking mouth which moves or emits light or something when a playing wav file emits sound. So I need to detect when a wav file is speaking or when it is in a silence between words. Currently I'm using a pygame script that I have found</p>
  
  <pre><code>import pygame
  pygame.mixer.init()
  pygame.mixer.music.load("my_sentence.wav")
  pygame.mixer.music.play()
  while pygame.mixer.music.get_busy() == True:
      continue
  </code></pre>
  
  <p>I guess I could make some checking at the while loop to look the sounds output level, or something like that, and then send it to one of the gpio outputs. But I don't know how to achieve that.</p>
  
  <p>Any help would be much appreciated</p>