Install on FreeBSD

I sort of got Rhasspy working on freeBSD, maybe also interesting to know what I did to get there (might also help for OSX)

I use satellites for audio, so I didn’t bother much with the audio part, but I got it sort of running with mqtt and Kaldi. At the moment it does require changing quite some files and compiling everything from source.

I’ve installed the required system dependencies and Kaldi myself (Kaldi should go in rhasspy/opt/kaldi)
At the moment I’ve compiled Kaldi with cmake and some hacks (I need to train on a different system now and copy profile/en/kaldi/model/graph data and online) , it should be able to compile with gmake, but I need to figure out how to do that correctly. Also a lot of shell scripts from Kaldi start with #!/bin/bash which should be replaced by #!/user/bin/env bash (created issue for that)

You also need to patch phonetisauris and comment out the print lines which use exp10 in src/3rdparty/rnnlm/rnnlmlib.cpp (I used the downloaded phonetisauris from rhasspy) I also created an issue for that

the python openfst library didn’t work for me, I needed to use the version compiled by openfst itself (make && make install in openfst-1.6.9/src/extensions/python after changing python2.7 to python3.6m in its Makefile)

Now we move to the rhasspy build, but to do that we need to modify the file as freebsd doesn’t support the long commandline options, for now I just commented out everything in the command line section and added


Also freeBSD doesn’t support sed -i, change that with a temporary copy:

now we can finally build everything.

Because of how I build Kaldi I needed to change ./config/rhasspy/profiles/en/kaldi/model/ and add the correct kaldi bin and lib paths. If it doesn’t recognize anything you can comment out the last two lines of that file ( grep ‘^utt_1’ | \ and sed -e ‘s/^utt_1//’ and the / | from the previous line ) This will printout the result of Kaldi to your rhasspy log so you can debug what goes wrong.


Thank you for the Herculean effort! I’d be happy to host the binary artifacts you’ve generated for FreeBSD on GitHub, and have the script use them.

I really appreciate your work here, since I have no experience with FreeBSD.

Before giving the binaries I first want to try to remove some of the hacks I’ve used.
I’ve created a pull request for Phonetisaurus to get it to build on freeBSD

1 Like

Thanks! I’ve spent a bit of time trying to replace Phonetisaurus, but haven’t been able to do it yet. Ideally, I’d use it to build the g2p models beforehand, and then have some Python code do the runtime guessing. But alas, the C++ algorithm is quite fast and impenetrable.

I am currently trying to install rhasspy on freebsd as well, so I am running
gmake install and it runs perfectly fine until it hits pip trying to install deepspeech which strangely is not found in pip.
I don’t know if this is an error with the deepspeech-integration or with freebsd

What hardware are you running this on? I think the deepspeech wheel is missing for some platforms.