Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRIFFON: Text To Speech (TTS) for the Game #2912

Draft
wants to merge 15 commits into
base: master
from

Conversation

@taylorzhancher
Copy link

@taylorzhancher taylorzhancher commented Apr 4, 2021

Text To Speech (TTS) service for intro story by concatenating strings then passing into TTS handler. Texts are passed as paragraphs.

There is also a GUI for enabling TTS in the options menu of Griffon

Related Minor Fixes:

  • Fixed the display of the story. In this version the sky background disappears only after all the text has scrolled over the screen. (if (yy < 10 && i == ARRAYSIZE(story) - 1))
  • Used ARRAYSIZE(story) ARRAYSIZE(story2) for the loops
@taylorzhancher taylorzhancher changed the title GRIFFON: TTS for intro story & display complete intro story GRIFFON: TTS & Display Entire for Intro Story Apr 4, 2021
@taylorzhancher taylorzhancher changed the title GRIFFON: TTS & Display Entire for Intro Story GRIFFON: Text To Speech (TTS) & Display Entire for Intro Story Apr 4, 2021
engines/griffon/cutscenes.cpp Outdated Show resolved Hide resolved
engines/griffon/cutscenes.cpp Outdated Show resolved Hide resolved
engines/griffon/cutscenes.cpp Outdated Show resolved Hide resolved
engines/griffon/cutscenes.cpp Outdated Show resolved Hide resolved
@@ -182,6 +186,21 @@ void GriffonEngine::showLogos() {
}

void GriffonEngine::intro() {
#ifdef USE_TTS

This comment has been minimized.

@mgerhardy

mgerhardy Apr 4, 2021
Contributor

The indention here is off - the preprocessor line should be at the beginning of the line - and the guarded code itself is one level too deep.

engines/griffon/cutscenes.cpp Outdated Show resolved Hide resolved
engines/griffon/cutscenes.cpp Outdated Show resolved Hide resolved
Common::TextToSpeechManager *_ttsMan = g_system->getTextToSpeechManager();
if (_ttsMan != nullptr) {
Common::String result = story[0];
for(int i=10; i< ARRAYSIZE(story); ++i){

This comment has been minimized.

@mgerhardy

mgerhardy Apr 6, 2021
Contributor

for (int i = 10; i < ARRAYSIZE(story); ++i) {

This would e..g. be the right formatting. Watch out for the missing whitespaces. See the existing code to get an idea about the formatting. Keep formatting it the same way.

Or try to use something like clang-formatter to perform the base formatting (if you ever have more than this to format)

Also if you use clang-format on a whole file, you should get used to git add -p to only use the relevant parts for your particular commit.

@@ -190,7 +190,7 @@ void GriffonEngine::intro() {
Common::TextToSpeechManager *_ttsMan = g_system->getTextToSpeechManager();
if (_ttsMan != nullptr) {
Common::String result = story[0];
for(int i=10; i< ARRAYSIZE(story); ++i){
for(int i = 10; i < ARRAYSIZE(story); ++i){

This comment has been minimized.

@sev-

sev- Apr 7, 2021
Member

This is not correct. Please pay attention to the details. As it was pointed out, the correct formatting is
for (int i = 10; i < ARRAYSIZE(story); ++i) {

@sev-
Copy link
Member

@sev- sev- commented Apr 7, 2021

This PR is still missing the GUI part.

…ll the text before disappearing
Copy link
Member

@sev- sev- left a comment

The changes are awkwardly hardcoded, I explained how to process the story properly with a loop.

Also, I do not see changes to our GUI, only to the in-game settings which are nice thing, but different from what I requested.

Also, it would be great is the game settings also have voice-overs.

@taylorzhancher taylorzhancher changed the title GRIFFON: Text To Speech (TTS) & Display Entire for Intro Story GRIFFON: Text To Speech (TTS) for the Game Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants