alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.57k stars 1.06k forks source link

Exception ignored from cffi callback <function _StreamBase.__init__.<locals>.callback_ptr at 0x7fbb2cebeef0>: (python) #1317

Closed ReveekJ closed 1 year ago

ReveekJ commented 1 year ago

I copied the code from the test_microphone.py file and changed it a bit to fit my needs, but in general, its work has not changed. It worked for a while, but when I recently tried to run this file, I got an error: Exception ignored from cffi callback <function _StreamBase.__init__.<locals>.callback_ptr at 0x7fbb2cebeef0>: Traceback (most recent call last): File "/home/user/PycharmProjects/Jarvis/venv/lib/python3.10/site-packages/sounddevice.py", line 837, in callback_ptr return _wrap_callback(callback, data, frames, time, status) File "/home/user/PycharmProjects/Jarvis/venv/lib/python3.10/site-packages/sounddevice.py", line 2687, in _wrap_callback callback(*args) TypeError: callback() takes 2 positional arguments but 4 were given I didn't change anything in sounddevice related files. I'm a beginner programmer, so I'm not very good at it. help me please

ReveekJ commented 1 year ago

I'm sorry to trouble you! I just checked the file and noticed that not everything was taken from me from there. Now I added the missing code and it worked

nshmyrev commented 1 year ago

Ok, great you made it working. Let us know if you have other issues!