Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Unable to upload wake word. #47

Closed
goldyfruit opened this issue Aug 18, 2023 · 3 comments · Fixed by #52
Closed

Unable to upload wake word. #47

goldyfruit opened this issue Aug 18, 2023 · 3 comments · Fixed by #52

Comments

@goldyfruit
Copy link
Member

Configuration:

  "listener": {
    "wake_word_upload": {
      "disable": false,
      "url": "http://127.0.0.1:5000/precise/upload"
    }
  },
 "opt_in": true 
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_dinkum_listener/service.py", line 447, in upload
2023-08-17 22:03:39.796 - voice - ovos_dinkum_listener.service:_hotword_audio:511 - DEBUG - Handling listen sound: /home/ovos/.venv/lib/python3.11/site-packages/ovos_dinkum_listener/res/snd/start_listening.wav
    DatasetApi().upload_wake_word(wav_data,
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_backend_client/api.py", line 568, in upload_wake_word
    return self.backend.dataset_upload_wake_word(audio, params, upload_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_backend_client/backends/offline.py", line 390, in dataset_upload_wake_word
    byte_data = audio.get_wav_data()
                ^^^^^^^^^^^^^^^^^^
AttributeError: 'bytes' object has no attribute 'get_wav_data'
@emphasize
Copy link
Member

emphasize commented Sep 17, 2023

those are bytes passed to _upload_hotword

we would need to convert it like

listener = self.config.get("listener", {}) 
audio = AudioData(audio_bytes,
                  sample_rate=listerner.get("sample_rate", 16000),
                  sample_width=listerner.get("sample_width", 2))

@JarbasAl
Copy link
Member

fixed in #48

@emphasize
Copy link
Member

@JarbasAl also needs a fix in personal

NeonDaniel added a commit that referenced this issue Oct 12, 2023
Continuation of #48
Closes #47
JarbasAl pushed a commit that referenced this issue Oct 12, 2023
Continuation of #48
Closes #47

Co-authored-by: Daniel McKnight <[email protected]>
@github-actions github-actions bot mentioned this issue Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants