CyBear-Jinni / Jinni-Assistant

Jinni Assistant 🧞 is here to help you "make your wishes come true", it will be your assistant which will accompany you and help you throughout the day at home. If you have ever wondered "is there open source project to make my own smart home?", Jinni Assistant is part of one called CyBear Jinni.
https://cybearjinni.com
GNU Affero General Public License v3.0
15 stars 1 forks source link

Running alsa inside daemon snap #1

Open guyluz11 opened 4 years ago

guyluz11 commented 4 years ago

This is Snowboy blocker.

Snowboy need alsa to run. When I change my snap to run as daemon alse stop working and I get the error

  ALSA lib control.c:1373:(snd_ctl_open_noupdate) Invalid CTL hw:0
  ALSA lib control.c:1373:(snd_ctl_open_noupdate) Invalid CTL hw:1
  No protocol specified
  xcb_connection_has_error() returned true
  ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
  No protocol specified
  xcb_connection_has_error() returned true
  ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
  Fail to open PortAudio stream, error message is Device unavailable.

So we need new way to run Snowboy that will work with root permissions, as alsa/ pulseaudio cannot run as root in ubuntu.

guyluz11 commented 4 years ago

https://forum.snapcraft.io/t/running-alsa-inside-daemon-snap/18850

https://bugs.launchpad.net/snapd/+bug/1868530

https://forum.snapcraft.io/t/reusable-alsa-lib-part/3556/37

guyluz11 commented 3 years ago

We will take example and actually use the code from mycroft-precise https://github.com/MycroftAI/mycroft-precise

As the alsa is working inside their snap and it is commercial use permitted, open source, Accurate, and easy to create our own wake word which will be "Jinni" or "Hey Jinni".