Python: Frequency Analysis of Sound Files

前端 未结 3 578
感情败类
感情败类 2021-02-01 10:37

I am generating some sound files that play tones at various frequencies with a certain number of harmonics.
Ultimately, these sounds will be played on a device with a small

3条回答
  •  星月不相逢
    2021-02-01 11:33

    you can use numpy and matPlotLib. Something like the code below:

    spectrum = numpy.fft.fft(signal)
    frequencies = numpy.fft.fftfreq(len(spectrum))
    pylab.plot(frequencies,spectrum)
    pylab.show()
    

    That will show a graph of the fft spectrum.

提交回复
热议问题