title: Trying to get the frequencies of a .wav file in Python
body: <p>What I'm trying to do seems simple: I want to know exactly what frequencies there are in a .wav file at given times; i.e. &quot;from the time <em>n</em> milliseconds to <em>n + 10</em> milliseconds, the average frequency of the sound was <em>x</em> hertz&quot;. I have seen people talking about Fourier transforms and Goertzel algorithms, as well as various modules, that I can't seem to figure out how to get to do what I've described.</p>
  <p>What I'm looking for is a solution like this pseudocode, or at least one that will do something like what the pseudocode is getting at:</p>
  <pre><code>import some_module_that_can_help_me_do_this as freq
  
  file = 'output.wav'
  start_time = 1000  # Start 1000 milliseconds into the file
  end_time = 1010  # End 10 milliseconds thereafter
  
  print(&quot;Average frequency = &quot; + str(freq.average(start_time, end_time)) + &quot; hz&quot;)
  </code></pre>
  <p>I don't come from a mathematics background, so I don't want to have to understand the implementation details.</p>