Audio Generator for Xiaomi Vacuum Generation 1 & Generation 2
Copyright 2017 by Dennis Giese
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
It is possible to create new language files which can be integrated into the rooted firmware. To generate the language files you can use the
generate_audio.py script in this folder.
It will read the content auf audio_xx.csv (whereby xx is a country language code like de_de or en_US) and use one of the supported engines to generate mp3 files for inclusion in the firmware. The language codes are the ISO-639-1 format, so that the engine can use a voice with suitable pronounciation.
You'll notice that each engine has its problems with mixed langauges (e.g. german with english words in it). A little testing is necessary to find a suitable pronunciation.
- pipenv Install using:
pip install pipenv
- ffmpeg (to convert generated files into wav)
You can either install the python3 requirements manually or you install and use them with pipenv:
- install ffmpeg
- change to this folder
- start script with
./generate_audio.pyprogram ask for your language selection
gtts (Google Text To Speech)
espeak (eSpeak NG Text-to-Speech)
macos (Mac OS X integrated Text To Speech)
- You may specify a voice directly after the say command in the documentation. You can get a complete list from the command
say -v ?. If you do not specify a different voice with
-v VoiceNameMac OS will use your current system language