From e6268fa3dd110033b2622d80e0da6006bee722d0 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 8 Jul 2016 00:41:53 +0200 Subject: add info about fork --- README-fork.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 README-fork.md diff --git a/README-fork.md b/README-fork.md new file mode 100644 index 0000000..f9849eb --- /dev/null +++ b/README-fork.md @@ -0,0 +1,18 @@ +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](http://goofy.zamia.org/voxforge/de/). +- 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](https://github.com/gooofy/voxforge) 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](https://github.com/DougGore/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](https://gist.github.com/MakeMeASandwich/cb284bae65f8b7870942) is a gist, it's hacky and insecure but works. -- cgit v1.3.1