Skip to content

DRACI: Add text-to-speech (TTS)#6742

Merged
criezy merged 1 commit intoscummvm:masterfrom
ellm135:draci-tts
Jul 14, 2025
Merged

DRACI: Add text-to-speech (TTS)#6742
criezy merged 1 commit intoscummvm:masterfrom
ellm135:draci-tts

Conversation

@ellm135
Copy link
Contributor

@ellm135 ellm135 commented Jun 19, 2025

Adds toggles for text-to-speech to the game options.
Adds text-to-speech for the following:

  • Subtitles
  • Objects
  • Inventory items
  • Dialog options
  • Map locations
  • Credits

@bluegr bluegr added the GSoC Part of a Google Summer of Code project label Jun 19, 2025
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added small notes.

// TTS for all languages but Czech struggles to voice a lot of Czech characters in the credits,
// and oftentimes skips them entirely (i.e. "Špalek" is pronounced as "Palek")
// To more closely resemble how the names are supposed to be pronounced,
// this table replaces certain Czech characters with an alternative
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution!

_dubbingArchive = nullptr;
_showWalkingMap = 0;
_pauseStartTime = 0;
_language = gameDesc->language;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standard approach is slightly different.

  1. Add to metanegine.cpp, the following method:
Common::Language DraciEngine::getLanguage() const {
        return _gameDescription->language;
}
  1. Use everywhere getLanguage() call

Copy link
Member

@criezy criezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, but I have one suggestion that I think would both improve the behaviour and simplify the code.

@criezy
Copy link
Member

criezy commented Jul 9, 2025

I have now tested the pull request, and there is one big issue: you can have the original Czech or Polish dubbing in the English and German versions of the game. And if you do and enable TTS then you have both at the same time and it is unintelligible.

From https://www.ucw.cz/draci-historie/index-en.html#download:

Besides the original Czech and Polish version with dubbing, we also have new translations in English and German, without a dubbing. If you want to hear Czech or Polish dubbing while playing another version, copy dub-mp3.zzz from their game archive to your installed game directory, and you will hear the copied dubbing in another language while reading the original subtitles.

And in the ScummVM options you need to enable "Voice" or "Both" voice and subtitle.

So if "Voice" is enabled and the dub file is present, then the TTS subtitle option should be ignored (or rather work like the "tts_enabled_missing_voice " option). An alternative would be to disable original voices when the TTS subtitle option is enabled, but I prefer to give precedence to the original voice for several reasons:

  • It sounds better.
  • If present that means the user took the pain to copy the dub file. So he indeed likely want to use it.
  • And while in game you can switch the subtitle and voice options (press F5 for example) while you cannot change the TTS options. So given precedence to the original dub means the user can switch between TTS and original dub while in game by toggling on off the Speech option (switching between Subtitle and Both).

Copy link
Member

@criezy criezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. It looks good now.

@criezy criezy merged commit 8e763b5 into scummvm:master Jul 14, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Part of a Google Summer of Code project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants