Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy.core._exceptions._UFuncNoLoopError: ufunc 'add' did not contain a loop with signature matching types (dtype('S96000'), dtype('float32')) -> None #30

Closed
goldyfruit opened this issue May 26, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@goldyfruit
Copy link
Member

goldyfruit commented May 26, 2023

When starting the service with a minimal this minimal configuration:

{
  "listener": {
    "microphone": {
      "module": "ovos-microphone-plugin-sounddevice"
    }
  },
  "hotwords": {
    "hey_mycroft": {
      "active": false
    },
    "hey_mycroft_precise": {
      "active": false
    },
    "hey_mycroft_pocketsphinx": {
      "active": false
    },
    "wake_up": {
      "active": false
    }
  }
}

Trace:

2023-05-26 16:42:13.841 - OVOS - ovos_dinkum_listener.service:__init__:123 - INFO - Starting Voice Service
2023-05-26 16:42:13.873 - OVOS - ovos_dinkum_listener.service:on_alive:58 - INFO - DinkumVoiceService is alive.
2023-05-26 16:42:13.874 - OVOS - ovos_dinkum_listener.service:_before_start:280 - INFO - Starting service...
2023-05-26 16:42:13.887 - OVOS - ovos_bus_client.session:reset_default_session:225 - INFO - New Default Session Start: 71888aeb-1513-41c8-b4d3-c7eb7db880d3
2023-05-26 16:42:14.174 - OVOS - ovos_dinkum_listener.service:_connect_to_bus:372 - INFO - Connected to Mycroft Core message bus
2023-05-26 16:42:14.558 - OVOS - ovos_dinkum_listener.service:_before_start:280 - INFO - Starting service...
2023-05-26 16:42:15.079 - OVOS - ovos_dinkum_listener.service:_connect_to_bus:372 - INFO - Connected to Mycroft Core message bus
2023-05-26 16:42:15.768 - OVOS - ovos_dinkum_listener.voice_loop.hotwords:load_hotword_engines:88 - INFO - creating hotword engines
2023-05-26 16:42:15.769 - OVOS - ovos_dinkum_listener.voice_loop.voice_loop:start:150 - INFO - Listening mode: ListeningMode.WAKEWORD
2023-05-26 16:42:15.772 - OVOS - ovos_dinkum_listener.service:on_started:62 - INFO - DinkumVoiceService started.
2023-05-26 16:42:15.773 - OVOS - ovos_dinkum_listener.service:on_ready:54 - INFO - DinkumVoiceService is ready.
2023-05-26 16:42:15.773 - OVOS - ovos_dinkum_listener.service:run:254 - INFO - Service ready
2023-05-26 16:42:15.774 - OVOS - ovos_dinkum_listener.voice_loop.voice_loop:run:174 - INFO - Starting loop in mode: ListeningMode.WAKEWORD
2023-05-26 16:42:15.883 - OVOS - ovos_dinkum_listener.service:run:263 - ERROR - voice_loop failed
Traceback (most recent call last):
  File "/Users/goldyfruit/Virtualenvs/ovos/lib/python3.11/site-packages/ovos_dinkum_listener/service.py", line 259, in run
    self.voice_loop.run()
  File "/Users/goldyfruit/Virtualenvs/ovos/lib/python3.11/site-packages/ovos_dinkum_listener/voice_loop/voice_loop.py", line 200, in run
    elif self._detect_ww(chunk):
         ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/goldyfruit/Virtualenvs/ovos/lib/python3.11/site-packages/ovos_dinkum_listener/voice_loop/voice_loop.py", line 340, in _detect_ww
    self.hotwords.update(chunk)
  File "/Users/goldyfruit/Virtualenvs/ovos/lib/python3.11/site-packages/ovos_dinkum_listener/voice_loop/hotwords.py", line 259, in update
    self.audio_buffer.append(chunk)
  File "/Users/goldyfruit/Virtualenvs/ovos/lib/python3.11/site-packages/ovos_dinkum_listener/voice_loop/hotwords.py", line 51, in append
    buff = self._buffer + data
           ~~~~~~~~~~~~~^~~~~~
numpy.core._exceptions._UFuncNoLoopError: ufunc 'add' did not contain a loop with signature matching types (dtype('S96000'), dtype('float32')) -> None
2023-05-26 16:42:15.885 - OVOS - ovos_dinkum_listener.service:on_error:66 - ERROR - DinkumVoiceService failed to launch (ufunc 'add' did not contain a loop with signature matching types (dtype('S96000'), dtype('float32')) -> None).
2023-05-26 16:42:15.885 - OVOS - ovos_dinkum_listener.service:run:266 - INFO - Service stopping
2023-05-26 16:42:16.018 - OVOS - ovos_dinkum_listener.service:on_stopping:70 - INFO - DinkumVoiceService is shutting down...
@JarbasAl JarbasAl added the bug Something isn't working label May 26, 2023
@NeonDaniel
Copy link
Member

Not sure what datatype S96000 is, but it doesn't like being added to a float.. Can you add some debugging to see what the actual value is being passed there?

@goldyfruit
Copy link
Member Author

goldyfruit commented May 26, 2023

Not sure what datatype S96000 is, but it doesn't like being added to a float.. Can you add some debugging to see what the actual value is being passed there?

https://paste.api-zulu.com/ramihutini.coffeescript

self._buffer is <class 'bytes'> and data is <class 'numpy.ndarray'>

@NeonDaniel
Copy link
Member

Looks like that's passing a list of lists instead of a list of floats?

@goldyfruit
Copy link
Member Author

goldyfruit commented May 26, 2023

Looks like that's passing a list of lists instead of a list of floats?

Does this could be related to the ovos-microphone-plugin-sounddevice plugin?

https://github.com/OpenVoiceOS/ovos-microphone-plugin-sounddevice/blob/dev/ovos_microphone_plugin_sounddevice/__init__.py

@NeonDaniel
Copy link
Member

Does this could be related to the ovos-microphone-plugin-sounddevice plugin?

https://github.com/OpenVoiceOS/ovos-microphone-plugin-sounddevice/blob/dev/ovos_microphone_plugin_sounddevice/__init__.py

I'd suspect so since I don't see it with the ALSA plugin. I think nparray has an asbytes function or something; this looks familiar...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants