Spokestack Python library

All updates, questions, and feedback on the Python library go here.

Hi, I’m trying to use the Python library on elementary OS, but I run into an error when I try to setup and use a pipeline.

I followed the install instructions, and I’m using pyenv as recommended.

The versions installed are those of the wikiqa-python/requirements.txt

When I try to import WakewordSpokestackASR from spokestack.profile.wakeword_asr it ends with the following error:

  File "./prueba_pipeline.py", line 5, in <module>
    from spokestack.profile.wakeword_asr import WakewordSpokestackASR
  File "/home/fer/.local/lib/python3.8/site-packages/spokestack/profile/wakeword_asr.py", line 7, in <module>
    from spokestack.agc.webrtc import AutomaticGainControl
  File "/home/fer/.local/lib/python3.8/site-packages/spokestack/agc/webrtc.py", line 9, in <module>
    from spokestack.extensions.webrtc.agc import WebRtcAgc
  File "spokestack/extensions/webrtc/agc.pyx", line 1, in init spokestack.extensions.webrtc.agc
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

I checked the version of numpy that I installed and it is the one mentioned in requierements.txt.

I googled this incompatibility error, and everyone suggests to downgrade numpy or reinstall it.

If I force a downgrade in numpy, then I get errors with the tensorflow library, that requires a newer numpy version.
I’m a little lost here… hope you can lend me a hand!



I apologize for the late response. This definitely comes up from a conflict in the NumPy C API through Cython. I will update the dependencies for this project and see if I can fix it permanently. For a temporary workaround, I was able to fix this error with:

pip install --no-cache --force-reinstall numpy==1.20.0

TensorFlow still says this is not compatible, but it still works on Ubuntu 20.04. Let me know if that doesn’t fix it and we can figure something else out.