Closed arctica closed 4 years ago
The docker engine on Mac OS does not support audio. Somebody has managed to achieve something here https://forums.docker.com/t/docker-for-mac-audio-support/16098/7
Would be nice to have at least support in for macOS via the download-dependencies.sh or/and build-from-source.sh installation.
The binaries from download-dependencies.sh
are pre-compiled in Debian. I don't have a Mac, so I'm not sure how I could even build the required libraries/programs.
Adjusting build-from-source.sh
might be possible if brew
has all of the same packages. Again, though, I don't have a Mac to try this out on.
If you do get the Docker image running, there are other options to get audio in. Using the gstreamer input may work, if you configure it to accept raw audio over UDP and open the port in your container. The Hermes/MQTT option is also possible; see the hermes-audio-server for an example of how to publish the WAV chunks.
Would be nice to have at least support in for macOS via the download-dependencies.sh or/and build-from-source.sh installation.
That is not the issue, the issue is that the docker engine does not support audio. (aka there is no /dev/snd device which can be used to passthrough) There is nothing Rhasspy can do about that. On a mac, you have to look for other ways to get audio in and out like synesthesiam suggestes
Google "docker mac audio" and you will quickly find the problem :)
If you just want to try out Rhasspy on MacOS, you don't neccecary have to connect a Mircophone.
The Web GUI offers options to:
Simply start the Docker image without the --device
option
docker run -d -p 12101:12101 -v "$HOME/.config/rhasspy/profiles:/profiles" synesthesiam/rhasspy-server:latest --user-profiles /profiles --profile en
and open http://localhost:12101/ in your browser.
If you want to try the build from source on OSX, I posted the changes I needed to do for freeBSD, might help as OSX is also based on BSD: https://community.rhasspy.org/t/install-on-freebsd/205
I started adding macos-latest
as a target for the GitHub Actions test workflows of some of the Rhasspy libraries, e.g. see https://github.com/rhasspy/rhasspy-hermes/runs/374604970. This should make it easier in the future to catch incompatibilities. Unfortunately GitHub doesn't offer FreeBSD build servers...
Oh, awesome! I didn't even know this was possible. I can't believe Apple doesn't bring down the Hammer of Jobs on GitHub for that :hammer:
Attempts to support MacOS will continue in 2.5.
I wanted to mention that I tried @christophengelmayer's suggestion, but the test site also doesn't work because the sound devices (microphone and speakers) are not accessible from inside Docker.
I was able to get it working by running PulseAudio per this StackOverflow post.
I wanted to give Rhasspy a try since it seems like an extremely nice project but I'm having trouble launching the Docker container as there's no /dev/snd or any /dev/ entry for microphones whatsoever under MacOS.
Tried to search for alternative ways but seems like MacOS just doesn't expose a simple device file for microphones.
Any ideas how to get it running anyways on a Macbook?