Here is an embedded console which can be used to experiment with Tcl/Tk. Try the following script, for example:

package require snack
sound s
pack  [ spectrogram .s -sound s -height 150]
place [ button .a -text Record -command {s record}]
place [ button .b -text Stop -command {s stop}]