Pregunta

I'm trying to create a spectrogram object for audio analysis.

I'm using Snack Library. This library, create the spectrogram as a canvas object but I
should use the spectrogram as a numerical object (every 10 ms I should extract the vector of frequencies).

This is the code of Snack Library:

c = tkSnack.SnackCanvas(root, height=400)
c.pack()
c.create_waveform(0, 0, sound=mysound, height=100, zerolevel=1)
c.create_spectrogram(0, 150, sound=mysound, height=200)

I'm looking for tutorials online but I only found ways to draw the spectrogram.

Thanks a lot!

¿Fue útil?

Solución

For audio analysis I just use a combination of the generalized data analysis tools. Here are the tools I use for audio:

reading and writing .wav files:
Python wave module, and scipy.io.wave These work for most .wav files, but not the very unusual formats

FFTs:
numpy rfft and friends (rfftfreq is particularly useful with rfft)

spectrograms and more general graphs:
matplotlib and, in particular matplotlib's specgram

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top