Mortville Manor TTS

Hello, in the past week, I worked some more on the TTS project. First I finished the GUI TTS, I needed to make sure, that everything behaves the same way on Windows and on Linux and I had to make sure I free everything I allocate. I even had to implement reference counting for a class, which wasn't that hard, but it still was pretty interesting, because I have never needed to do this. I also had to implement conversion of the text being said to UTF-8. On Windows this involved adding a table to the code, which would allow looking up codepage identifier by its name. On Linux I just used SDL_iconv_string, which can convert from most of the GUI encodings, but unfortunately it seems, it cannot convert from CP850, which is apparently quite often used by game engines (it is used by the Mortevielle engine and also by the supernova engine). So right now I just convert the strings like if they were in ASCII (most of the encodings are just ASCII extensions, so I hope to successfully convert at least some strings). I am thinking about using the iconv library for handling the conversion, but that would mean another dependency needed for compiling the code.

After I was happy with the state the TTS was in and everything worked for the GUI, I moved to implementing TTS to the mortevielle engine. It took me some time to get oriented enough in the engine (partly because some functions have their original french names). But once I located the correct spot, the implementation was pretty easy.
The engine uses a table of character voice pitch (number > 5 is a female voice, < 5 is a male voice):

const int haut[9] = { 0, 0, 1, -3, 6, -2, 2, 7, -1 };

At first, I wanted to map each number to a different voice, which would be alright on Linux, because there are 4 voices for each gender (some characters would still be mapped to the same voice, but I think the result would be good enough). But unfortunately it's quite unlikely, that on the other platforms the user is going to have that many different voices. So I ended up using only one voice for every character and just changing the pitch a little bit to make them at least a little bit different. If there is ever a situation, that there is no voice for a gender, I try to simulate that genders voice by taking a voice, that is available and changing its pitch a lot (higher for female, lower for male). It sounds quite comically, but with a little bit of fantasy it works.

Here are some results of the Mortevielle TTS, I wanted to show, that switching TTS states really works (that the TTS works as it should when switching between GUI and game).

Linux:

Windows:

Comments

  1. Very promising!

    A cool thing about the original game is that in the English version, everybody is speaking with a French accent. See for example https://youtu.be/DD6pR2LrGnU?t=121

    I wonder if it would be possible to get a similar effect by using French TTS voices.

    ReplyDelete
  2. Hello, this is interesting. Even though I don't think this would be possible without a lot of work, I still out of curiosity tried it.

    https://youtu.be/NLOgSNds-WA

    This is with espeak-ng on linux. Most of it doesn't sound that bad, but the numbers are read in French and some words, like "stronger" just don't sound like English. So I think English voice was a better option even if we lose the French accent of the original game. Another think is, that on some platforms a voice might be just unable to read some really foreign words. I for example tried to read some text with Chinese voice on Windows once and instead of trying to read the words as a whole, it just spelled it. I know French isn't that different from English than what I was feeding to the Chinese voice, but still I don't want to risk that on some platform the voice would not be able to read the text.

    ReplyDelete
  3. Mortville Manor TTS and free online tools both offer text-to-speech (TTS) capabilities, but they have different strengths and weaknesses.

    Mortville Manor TTS

    Pros:

    High-quality, natural-sounding voices
    Wide range of voices to choose from
    Customizable options for voice and tone
    Can be used to create audio books, podcasts, and other voice-over projects
    Cons:

    Requires a paid subscription
    Not as user-friendly as some free online tools
    Free online tools

    Pros:

    Free to use
    Easy to use
    No need to download software
    Cons:

    Lower quality voices than Mortville Manor TTS
    Limited range of voices to choose from
    Fewer customization options
    Cannot be used to create audio books, podcasts, and other voice-over projects
    Which one is right for you?

    If you need high-quality TTS for professional or creative projects, then Mortville Manor TTS is the better option. However, if you only need basic TTS for personal use, then a free online tool may be sufficient.

    ReplyDelete

Post a Comment

Popular posts from this blog

GSoC update

Google Summer of Code summary