0

Hi I am trying to plot fft data from real time audio input for my project work . I need to see the spectral components as I have to perform some actions based on frequency response the code that I am modifying is based on here

http://flothesof.github.io/pyqt-microphone-fft-application.html

I am interested in frequency response around 18KHz , and I am sampling at 44100 Hz but the above code works only till 6800Hz after that it simply plots garbage .CHUNK size is 2048 . what should I do to get frequency around 18KHz.Also I dont see aliasing around 6800Hz on overshooting it.

This is my first question on stackoverflow am sorry if it made you face palm . I dont have a DSP background but I am studying it on my own.

Thanks priest

priest
  • 1
  • 1
    Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: [mcve]. – Paul R Mar 08 '16 at 17:37
  • 1
    The problem could be with the microphone or your system hardware audio filters. Try a different mic on a different system. – hotpaw2 Mar 08 '16 at 20:22
  • 1
    If you sample at 44.1 kSa/sec you are right that you should expect frequencies as high as 22 kHz in your spectrum.The length of your sample in time determines the frequency resolution in Hz (1/sec) , i.e separation between different frequencies. Try to make a minimal example (synthetic wave) to test your FFT routine, then post that if it still is not what you expect. – roadrunner66 Mar 09 '16 at 01:48
  • @ hotpaw that can be the case will update it soon after testing. – priest Mar 09 '16 at 02:09
  • @ roadrunner the FFT does work (I havent done what you have asked yet will do it soon ) . I generate a tone and see the plot for it ,I can verify that in <=6800Hz it works but after it its garbage . peaks are on <1000Hz bins – priest Mar 09 '16 at 02:13
  • @ paul the code is working just not after 6800Hz . It may be that I screwed up my mic input – priest Mar 09 '16 at 02:15

0 Answers0