Show waveform as part of larger program

I am using PortAudio to input and process an audio stream

Just a very basic thing:

stream = PortAudioStream("Microphone (5- UMC204HD 192k)", 1, 0)

buf = read(stream, 5s)

But when I use this inside of the larger program it doesn’t show the waveform. How do get that to still output?

Note that the REPL implicitly will run display(ans) after each line that it executes, if that line doesn’t end in a semicolon, so perhaps you want to add display(buf) to your program?

1 Like

Ah, thank you so much!