title: How to process audio in real time?
body: <p>I have some audio input through microphone. I recorded it in Audacity, it looks something like as shown below.</p>
  
  <p><img src="https://i.stack.imgur.com/xArxB.png" alt="Audio waveform"></p>
  
  <p>I want to process this audio in real time. I mainly want to do this:</p>
  
  <ol>
  <li><p>See real time audio amplitude vs time graph.</p></li>
  <li><p>Perform some actions based on event like if a wave pattern is seen similar to some predefined wave pattern, then call a function.<br>
  In the upper half part of the image, you can see four disturbances. I want that whenever this disturbance is seen, the script should call a function, otherwise, when the signal is almost straight, do nothing just keep analyzing signal.</p></li>
  </ol>
  
  <p>Is there any Python module or C library that can allow me to do this?</p>