Commit Graph
137148 Commits
Author SHA1 Message Date
Jaromir Wysoglad 7613bcaa5f TTS: Use QUEUE_NO_REPEAT action for tooltips 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 84df34df10 TESTBED: Add tests for TTS *_NO_REPEAT actions 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad fb12e3b36b TESTBED: Rewrite parts of TTS tests.
As suggested by Criezy on github
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 4bae32ffe7 TTS: Add *_NO_REPEAT actions 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 98cea3e2ce TESTBED: Add state queries to TTS tests. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad feaba6fff6 TTS: Reimplement isSpeaking on Windows. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 1234f8e42f TTS: Fix pause() and resume() on linux 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad a5c9e8c74b TESTBET: Add TTS tests 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 7ec4f03a08 TTS: Make state switching faster on Linux 2019-09-01 22:47:55 +03:00
Thierry Crozat 9ca2602e82 TTS: Implement speech queueing on macOS 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 1694b930e6 TTS: Make one say() method non-virtual 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad a81b59a3c4 TTS: Don't read tooltips when TTS is speaking 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 6703f88f7f TTS: Implement speech queueing on Linux and Win 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad bbbb608c52 TTS: Implement OSD message reading 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad f89ca9ad5c TTS: Add tooltip reading when they appear. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 59631627c8 TTS: Fix reading of list widgets
The TTS read items from list widgets even when the mouse was
outside the widget
2019-09-01 22:47:55 +03:00
Thierry Crozat bac880816b TTS: Stop or pause speaking on word boundaries in macOS implementation 2019-09-01 22:47:55 +03:00
Thierry Crozat 5baa023ed0 TTS: Improve documentation 2019-09-01 22:47:55 +03:00
Thierry Crozat 0434419b31 TTS: Implement TextToSpeechManager for macOS 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad e965df1e88 TTS: Add TTS support when compiling with msvc. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 990ab61793 MORTEVIELLE: Improve voice mapping to characters.
* Return pitch -= 6 to females, this brings the pitch closer
    to zero
 * Add array of indices which ensures, that we use as many voices
    as we can.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad a1f69e6b06 MORTEVIELLE: Refactoring as suggested by Criezy
* Add checks if ttsMan != null before trying to use it
 * Simplify startSpeech
 * Move haut to startSpeech and pass the character index to
    the startSpeech instead.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 99550a95b2 MORTEVILLE: Stop speech when pressing F8. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad c7dbf192ef TTS: Remove unneeded code
Remove debuging outputs
Remove commented iconv implementation of text conversion to UTF-8
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 1795206289 TTS: Add checks to configure.
Check for presence of required libraries
Disable automatic build of TTS on MinGW32
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 58065ceacd TTS: Refactoring
* Delete multiple empty rows
 * Make getVolume non-virtual and leave just the implementation
    in base class
 * Resolve warning about signed / unsigned comparison in
    gui-manager
 * Clear availableVoices when updating voices on linux
 * By default set language to transMan language on windows
    (if the transMan is available)
 * Remove freeVoices method from Windows ttsMan, it isn't needed
    anymore
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 4ec10ffec7 TTS: Remove "static" from initTextToSpeech() 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 2ecbf9ac18 MORTEVIELLE: Return old code to waitSpeech
The waitSpeech should use the old code, when just sound is playing
(the TTS isn't speaking).
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad c9ec089e61 MORTEVIELLE: Remove unneeded TTS code 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad d2b9b9ef21 MORTEVIELLE: Map characters to different voices 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 0631070833 TTS: Fix state switching on windows
Voice is changed when changing language on windows, so when poping
state, the voice, that should get set has to be saved before
changing the language.

The speech shouldn't continue when changing state, so it is stopped
in pushState and popState.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad e4363ba229 TTS: Minor Windows TTS refactoring
Main changes are:
 * Save age information about each voice
 * Remove Sample TTS Voice from available voices, because it
 	basicaly cannot speak.
 * Stop speech after silently playing the test speech (the last
 	voice could be heard speaking after the volume got
	restored to its original value)
 * Remove voice data freeing from freeVoices, because it gets
 	freed automaticaly
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad e04463b05a MORTEVIELLE: Add text to speech capability 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 324a90f4f6 TTS: Implement tts state switching when needed.
The state has to be pushed and poped when there is a transition
between game and gui code.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 33549d9c02 TTS: Add getVoiceIndicesByGender to the base class
This is a way to easily get a list of voices with the given gender
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 134d955006 TTS: Add iconv implementation of strToUtf8
This might be useful in the future, because SDL cannot convert
from some important encodings (for example CP850)
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 3027acc12e TTS: Minor refactorisations
- Add comment to tts initialization on Windows
 - Correctly free the voicesInfo in linux ttsMan
 - Remove popState method from linux-text-to-speech.h and
	windows-text-to-speech.h
 - Add tts to help in configure
 - Refactor language setting in gui-manager.cpp
	It counted with english being the default language in
	ttsMan constructors, which isn't true anymore.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad b5d5576f90 TTS: Add check to getVoice, fix typo.
Check if _availableVoices isn't empty.
Replace availaible with available
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 788b15652d TTS: Change String == "" to String.empty() 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad bb3346fba7 TTS: Update the TTS documentation 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 7c78912931 TTS: Move popState to the base class 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad d31ffb676a TTS: Implement conversion to unicode in say on win 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 5c1f562452 TTS: Implement conversion to UTF-8 in say on linux 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 4d95720731 TTS: Fix voice setting on startup
The ScummVM was crashing because of an assert, when there was less
voices availaible, than what was set in the ConfMan.

Now the voice just falls back to 0th voice, if there are not
enough voices.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 5d9f03e71d TTS: Add reference counting to TTSVoice
Also refactor TTSVoice destruction to use this reference counting.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 8e4a24f55e TTS: Unify setters between linux and win backends. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 62e219ece3 TTS: Implement default behavior of TTS setters 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad dae7d64d38 TTS: Add documentation to common/text-to-speech.h 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad ce64528129 TTS: Make sure that TTS lang matches transMan lang 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 33f8aadfeb TTS: Add age to TTSVoice 2019-09-01 22:47:55 +03:00