voice assistant

schneefux e6268fa3dd add info about fork 1 year ago
boot d7aee94215 Added test for vocabcompiler to `--light` tests and updated travis config 3 years ago
client cd6454ea6e add more translatable strings 2 years ago
languages cd6454ea6e add more translatable strings 2 years ago
static 0aacc7df0f Add method to get keyword phrases to vocabcompiler 2 years ago
tests 4b925b8e0d attempt to fix unit tests for modules 2 years ago
.coveragerc 78f7570d6b Update .coveragerc 2 years ago
.gitignore ff62f3ae7a Revised .gitignore with comments 2 years ago
.travis.yml 0d86b9e116 Use Travis-CI's caching for pip requirements 2 years ago
AUTHORS.md af5d037203 Added AUTHORS and LICENSE file and updated README 2 years ago
CONTRIBUTING.md 4871e2c53f Updated list of TODOs in CONTRIBUTING.md 3 years ago
LICENSE.md af5d037203 Added AUTHORS and LICENSE file and updated README 2 years ago
README-fork.md e6268fa3dd add info about fork 1 year ago
README.md 2521c58282 Typo fixes 2 years ago
jasper.py fe02dbcfb2 add language config option 2 years ago


This is an outdated fork of https://github.com/jasperproject/jasper-client.

With these patches it is possible to use Jasper with different languages. Only the Time, Unclear, Joke (partial) and Life plugins are translated yet.

I wanted to use Jasper in German, so I did the following on my Arch Linux laptop:

  • Set up Jasper
  • Make sure everything works in English. I needed to change aplay -D hw:1,0 str(filename) to aplay str(filename) in client/stt.py
  • Get the language model, I got mine from here.
  • In my case, the fst was in phonetisaurus/dict-xsampa.fst and the hmm_dir was voxforge-de-r20141117/model_parameters/voxforge.cd_cont_3000. After some fiddeling I realized that there are different formats, ARPA and XSAMPA. pocketsphinx needs ARPA, but my model was XSAMPA - luckily there is a script to convert inbetween them. I changed a regular expression, added an option for the conversion and included this script. You need to add the line fst_ist_xsampa: true below the line with fst_model in your profile.yml.
  • Now the keywords need to be changed. gettext does this, I added a draft translation. To convert it, go to Jasper's root folder and execute msgfmt messages.po. The phonetized words seem to be cached in ~/.jasper/vocabularies, so you should flush it with rm -rf ~/.jasper/vocabularies.
  • Next, configure espeak to speak in the right language, that is voice: 'german' in the profile.yml.
  • I did not really like the espeak voice so I wanted to try PicoTTS instead. It turns out that the Pkgbuild is not working anymore because the source repository has been taken down (DMCA). PicoPi worked fine for me:
    • Download, compile, install
    • Change pico/tts/main.cpp and replace the path ttsEngine->init(synth_done, '../lang') to the absolute path to the lang directory, because otherwise you need to be in the tts directory when running ./testtts.
    • Compile again and add PicoPiTTS to client/tts.py. Here is a gist, it's hacky and insecure but works.