published : 2017-10-09 changed: 2021-04-12
Everybody who owns a Taranis X9D (or something similar) is familiar with this problem: the standard soundfiles are crap and the soundpacks available for the tarans can do a hell of a lot, but not what you need.
For example, right now you can configure your quad with the Taranis and LUA-Scripting via telemtetry. You can also configure your FC to have some of those functions on certain switches - which you do not have a proper soundfile for.
So, I thought we need to create our own soundpack. fortunately this is quite simple on MacOS. There is the command
say which lets you run the text-2-speech system on the mac to say something. and this works from commandline! Awesome wonders of unix os!
say does take some options. with
-v you define the voice to use and with
-o you can define an output (aiff) file. That is cool, but the taranis cannot use aiff - you need to convert it.
If you did not install
bew on your mac already, you should do that right now. With brew you get access to all those unix-tools that help us a lot on linux. So then you have access to
ffmpeg which is able to convert aiff into wav as we need it - just be careful to use the right settings (32000hz, mono).
You need to do more or less the same, if you want to use your taranis as Music Player during flights.
I uploaded the script here! Attention: use at own risk! And: careful - the script will erase a folder called SOUNDS in the current directory! Please be careful!
in this file, you can define the voice quite at the beginning of the file:
I use the voice "Daniel" which is an UK-English voice. But I like it, sounds quite cool.
If you have your taranis running with a different language than english, you will need to change the directories, especially rename
en to the corresponding language code.
There you can see a bash function I created to crate a wav-File from text.
Attention: the aiff files are kept for a while as
ffmpeg runs in the background for performance reasons.
those files get deleted later.
With this function you can define your sounds. It takes 2 parametrs: the filename (without extension) and the text to say to that file.
you should not change the files in the upper part of the script, as those create the system files needed by opentx to run smoothly.
At the end of the file, you can add custom texts which need to be created. I added here only a couple of values, most of them I really use in my setups:
here you can add your stuff... whatever you like!
and here you can download the script!
Have lots of fun with it!
created Stephan Bösebeck (stephan)