Author Topic: Request: Rudimentary Linux TTS support  (Read 1439 times)

0 Members and 1 Guest are viewing this topic.

Request: Rudimentary Linux TTS support
Hi,

I'd like to try and wire up FS to a free speech synthesizer, probably Festival.
Since the game engine itself is a little to complex for me, I'd like to do most of the work outside.
What support I require within the engine would be the following:

a) Check for the existence of a UNIX socket file data/voice/tts.socket OR
b) add a command line argument to pass any path to such a file
AND
for every message write/cat/netcat/...
the following to it:
1. (fs-persona <here goes Message Persona as per FRED>)
2. (fs-say <Here Goes Message Text>)
3. flush socket .

I hope this can be implemented without too much work.

 

Offline m!m

  • 211
Re: Request: Rudimentary Linux TTS support
You could probably add the necessary code with a Lua script yourself. There are hooks for when a message is sent and there should be API functions for interacting with files. Hopefully, those API also work with UNIX sockets...

 
Re: Request: Rudimentary Linux TTS support
Thanks for the advice, I'll look into what scripting can do here. Using a socket was only my first and most simple idea, there are certain to be other, maybe even more portable ways to talk to Festival.

 
Re: Request: Rudimentary Linux TTS support
Unfortunately, I find myself unable to write to a file using the scripting system.
Could you point me to an example how this is accomplished, or how CFile is used
in general?

The ability to write to a network port from a script would be a useful alternative.

  

Offline m!m

  • 211
Re: Request: Rudimentary Linux TTS support
You can use the standard Lua IO library to write to files. That is still available in FSO Lua scripts.

General purpose networking is not something that is generally usable so it will probably not be included into the FSO API. You can still use external libraries though to get the required functions. For example, LuaSocket.

 
Re: Request: Rudimentary Linux TTS support
Ok, I thought there was only the restricted support available for security reasons. I'll try out what works best.

 
Re: Request: Rudimentary Linux TTS support