Jump to content

Text-to-speech (TTS) mod?


Ceres
 Share

Recommended Posts

On 31/08/2021 at 10:00 AM, Ceres said:

There is one thing about the voice chat mumble/murmur I like very much: TTS (text-to-speech). There is a possibility to feed the mumble client with text that it translates (very decently, IMO) to voice. Thus, you could get messages from 0 A.D. (e.g. queued units in CC are trained) directly to your ears. I'm not sure about the API, though.

On 01/09/2021 at 5:19 PM, nwtour said:

Good idea, but looks very bloated on the codebase. It is enough for the game to see if the voice acting file exists in the directory (add voice acting in the form of mods)
For example:

#!/bin/bash

# Text block from tutorial campaign, MD5 == 20f2d5b30116fe599c4413643e92b10d
echo "You have two main types of starting units: Female Citizens and Citizen Soldiers. Female Citizens are purely economic units; they have low health and little to no attack. Citizen Soldiers are workers by default, but in times of need, can utilize a weapon to fight. You have two categories of Citizen Soldiers: Infantry and Cavalry. Female Citizens and Infantry Citizen Soldiers can gather any land resources while Cavalry Citizen Soldiers can only gather meat from animals." > /tmp/text.txt

# Text to speech
espeak -f /tmp/text.txt -w /tmp/text.wav

# Convert to OGG and place in mod directory
# When the game sees this text block, 0 A.D. should play this sound file
convert /tmp/text.wav ~/.local/share/0ad/mods/mymod/audio/voices/20f2d5b30116fe599c4413643e92b10d.ogg

 

For further discussion, if people are interested... :)

Edited by Ceres
Link to comment
Share on other sites

E.g., your CC or some other building has trained a long-awaited batch of units. Currently, there are no messages about this, right? Getting text messages about trained units might just spam the screen, so I thought (*cough*) TTS messages might be useful. Agreeable, if you constantly get audio about trained units (or other messages), you might get annoyed, too. Well, I'm not sure whether it's worth further pursuing it. It's here for further feedback and input.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...