As some of you might have noticed from my cries for help in
here & on Discord, I was busy making something, here it is:
TTS on Linux
& possibly more to come
First of all,
a big thanks to m!m for his patience with my inexperienced questions. I learned tons about FSO doing this.
A new version without the need for a buffer file is now available on GitHub:https://github.com/the-maddin/fs2-festival-ttsGrab it via Code/Download ZIP
What it does:- Send any nonVAed message to festival
- Receive the spoken message
- Buffer it to disk
- Load & play it
What it needs:- lua51_socket, or however that is called on your distro
- festival, the free and open source TTS software, running in server mode on port 1314 (
$ festival --server)
- merge the archive to your freespace data folder
- First run
$ festival, enter
(voice.list), check that the output contains
cmu_us_awb_cg cmu_us_slt_cgThese are the voices used in this version. If they aren't there, the script needs editing to use your voices. They may differ by distro.
What I might add:- Support for multiple voices / roles (already proof-of-concept with command)- Parallel processing of long messages to improve performance, which is rather slow
- Packaging via Knossos
Currently, the only thing keeping this from running on any platform is the need to buffer the generated sound to disk. If the engine would allow playing a sound from a binary lua string, this would be easier.
There's a variable called rotten_portability_path in the script that needs to point to your <freespace>/data/voice/special folder.All happens in memory now, no files needed
Please let me know if there's any interest in taking this further, if you need help using it, if you can think of improvements, ...
[attachment deleted by admin]
[attachment deleted by admin]