Skip to content

WAGE: Add text-to-speech (TTS)#6669

Merged
sev- merged 2 commits intoscummvm:masterfrom
ellm135:wage-tts
Jun 19, 2025
Merged

WAGE: Add text-to-speech (TTS)#6669
sev- merged 2 commits intoscummvm:masterfrom
ellm135:wage-tts

Conversation

@ellm135
Copy link
Contributor

@ellm135 ellm135 commented May 30, 2025

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

  • Action log
  • User input
  • Command names when hovered over
  • About, quit, and game over dialogs
  • Names of scene objects when hovered over
  • Scene name when moving to the scene
  • MacGUI dialog buttons and submenu items

@ellm135 ellm135 force-pushed the wage-tts branch 2 times, most recently from 0ae99d2 to 7f46f0e Compare June 4, 2025 02:17
@ellm135 ellm135 marked this pull request as ready for review June 4, 2025 17:40
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.

I only looked at the MACGUI part of the PR, but I think it needs some changes.

@sev- sev- added the GSoC Part of a Google Summer of Code project label Jun 6, 2025

_screen.fillRect(trect, _wm->_colorBlack);

_wm->sayText(menu->items[i]->text);
Copy link
Member

Choose a reason for hiding this comment

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

I think here you need to check menu->items[i]->unicode and either speak test or unicodeText?

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.

I only have one issue left, related to the encoding when converting from String to U32String in the macgui.

In general you will need to be careful about such conversion in all the engines in which you are adding TTS.

if (menu->items[i]->unicode) {
_wm->sayText(menu->items[i]->unicodeText);
} else {
_wm->sayText(menu->items[i]->text);
Copy link
Member

Choose a reason for hiding this comment

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

In this case where you are not using a unicode text, it needs to be converted to unicode using the correct encoding, which I suspect is not the default kUtf8.
See MacFontRun::getEncoding() and MacMenu::getMenuFont() which should give you the information you need.

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 to me now.

@sev-
Copy link
Member

sev- commented Jun 19, 2025

Thank you!

@sev- sev- merged commit 0c963e8 into scummvm:master Jun 19, 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.

4 participants