Author Topic: [Alpha release] Multi-Voice Cross-Platform Text-To-Speech  (Read 825 times)

0 Members and 1 Guest are viewing this topic.

[Alpha release] Multi-Voice Cross-Platform Text-To-Speech
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-tts
Grab 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_cg
These 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]
« Last Edit: March 07, 2021, 06:38:47 pm by themaddin »

 
Re: [Alpha release] Multi-Voice Cross-Platform Text-To-Speech
This is really exciting for me since I've pretty much ditched Windows entirely on my home PC.  I can play missions without VA, but I have to do a lot of pausing.

That said, I'm not the most savvy Linux user.  I used Unix back in the early 2000's in grad school, but that was totally different.  Given how many months it took me to figure out how to build Knossos locally, I'm probably going to be a bit of a trainwreck at testing this thing out at least at first.

But I'm going to give it my best shot!

EDIT: confirmed that I am not understanding exactly what I need to do to verify that the right voices are installed.  Tried running "voice.list" from inside festival, but all it seems to do is tell me that this is the list of installed voices without actually giving me any information on what those installed voices are.  I have figured out how to get Festival to run in server mode, but not how to do anything else.  Also I see that whatever attachments you provided have been deleted.  Were those important?
« Last Edit: January 24, 2021, 06:02:59 pm by perihelion »
"Wouldn't it be so wonderful if everything were meaningless?
But everything is so meaningful, and most everything turns to ****.
Rejoice."
-David Bazan

 
Re: [Alpha release] Multi-Voice Cross-Platform Text-To-Speech
Uh yes that was the script. I don't know why they were deleted?

I do need to use the lua io api to write something to disk, is this a security issue?

I'll wait for the deleting admin to contact me before I share the script.

As for checking for the voices: you get that output when you enter
Code: [Select]
voice.list
By literally typing
Code: [Select]
(voice.list)which is the Scheme/LISP way of calling the function voice.list, you can retrieve the list of installed voices.
For me on Arch it's
Code: [Select]
(cmu_us_awb_cg cmu_us_rms_cg cmu_us_slt_cg)As I don't know which ones other distros package with festival,
you'll need to verify that these are present. There are numerous other voices
of various formats and qualities available, I haven't gotten around to installing and
testing them yet, and the procedure may vary between distributions.

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: [Alpha release] Multi-Voice Cross-Platform Text-To-Speech
Regarding your attachments, forum attachments are intended for temporary hosting, and are deleted every so often as the server space allocated to them fills up. You should host your files on a more permanent hosting platform such as Google Drive.

 
Re: [Alpha release] Multi-Voice Cross-Platform Text-To-Speech
Ah, makes sense.
I'll put it up and post a link when I'm back at my PC

 
Re: [Alpha release] Multi-Voice Cross-Platform Text-To-Speech
I've put it on Github, here it is: https://github.com/the-maddin/fs2-festival-tts
Grab it via Code/Download ZIP

  
[New version] Multi-Voice Cross-Platform Text-To-Speech
Hi,

using the new engine functionality, I've done away with the need for a buffer file.
This should now work on any platform where you can install festival.
The new version is available on GitHub, see first post.

I'll tackle performance next, to make sure messages actually get played when they are sent.

If you get around to trying it, please let me know what you think!