I am trying to use PyAudio to process real-time data from a microphone. I have followed the examples on the [PyAudio Documentation](https://people.csail.mit.edu/hubert/pyaudio/docs) and [this blog post](https://bastibe.de/2012-11-02-real-time-signal-processing-in-python.html). When I use stream.is\_active() without a callback, I have no error and everything works fine, but if I use a callback I get the following "SystemError: new style getargs format but argument is not a tuple"

I have looked at the question [Where is the error? “SystemError: new style getargs format but argument is not a tuple”](https://stackoverflow.com/questions/47271905/where-is-the-error-systemerror-new-style-getargs-format-but-argument-is-not-a), however, this doesn't translate to my problem. I will explain the things I tried below my code: 

```
FORMAT = pyaudio.paInt32
CHANNELS = 2
RATE = 44100
CHUNK = 1024  

def callback(in_data, frame_count, time_info, flag):
    print('Hi')

audio = pyaudio.PyAudio()

# start Recording
stream = audio.open(format=FORMAT, channels=CHANNELS,
                rate=RATE, input=True,
                frames_per_buffer=CHUNK,stream_callback = callback)

stream.start_stream()   

while stream.is_active():
    time.sleep(0.1)
    print('1')
stream.stop_stream()
stream.close()
audio.terminate()

```

I have determined that that the error is any time I add `stream_callback = callback`. If I remove this, I do not get the error. The exact code in my callback does not seem to affect the error as I get it when I just include the statement above (my whole code calculates the time delay between the two channels though). My callback parameters are defined directly from the documentation. I am not really sure what else to try as I'm not directly doing anything in the callback.