| Reference | Downloads | Github

Display spectrogram of a sound input in real-time



Hi everyone,

I was wondering if anyone has used Psychopy to display a spectrogram of a recorded sound input in real time. I need to display a spectrogram to check if the participants produce correct speech responses. Is this possible to do in Psychopy? Since I think the builder can’t do this, could I do this through some coding in Python?

I have googled this a bit and I found this Python library, Parselmouth, for analyzing sounds in Python. Has anyone used this in your Pyschopy experiments?

Thank you very much!


As a guess: you might look at the Python wrapper for gstreamer. Looks like there is something called “cairovis” which sort of does that.

- Allen


Thank you so much! I will look into this.


I don’t know how it can be integrated to psychopy framework but pyo has very nice spectrogram (Spectrum) and scope (Scope), all written with wxpython. If you have pyo installed, you can test them quickly:

from pyo import *
s = Server().boot()
a = SineLoop(freq=[500,600], feedback=0.05, mul=0.5).out()
sp = Spectrum(a)
sc = Scope(a)




Thank you so much! I will look into this.