Commit Graph
8933 Commits
Author SHA1 Message Date
Jaromir Wysoglad bc10117980 TTS: Restart SPD if resume() fails. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 4036b73b6c TTS: Fix INTERRUPT_NO_REPEAT on Windows 2019-09-01 22:47:55 +03:00
Thierry Crozat 13a32fc5e9 TTS: Implement *_NO_REPEAT actions and Fix state synchronization issues on macOS
The NSSpeechSynthesizer is asynchronous and does not immediately start, pause,
or stop the speech. As a result querrying the state of the NSSpeechSynthesizer
does not alwats return the expected result (for example isSpeaking may not
yet been true just after we requested starting to speak). So instead the
TextToSpeechManager on macOS keeps track of the state itself.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 21fb4cef06 TTS: Implement our own queuing for linux
It seems like, that at least some versions of speech-dispatcher
aren't able to successfuly pause and resume. For me, when trying
to pause, it still finishes the speech just being said instead
of pausing it and then it puts it at the end of the speech queue
with some speech-dispatcher internal commands added to it, which
are also hearable.

There is no way to find out where the speech ended when calling
pause, so it is just stopped and when resume is called it is
read from it's start again.
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 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 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 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
Thierry Crozat bac880816b TTS: Stop or pause speaking on word boundaries in macOS implementation 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 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 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 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 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 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 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
Jaromir Wysoglad 318c6d7ec6 TTS: Finish implementing the Windows TTS manager 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad d2d34a4eca TTS: Start implementing windows TTS 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 8357e8e6bf TTS: Prepare for windows TTS
Add windows configuration in configure
Add basic skeleton to backends
Check if ttsMan is initialized in GUI
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 5ee30a1b73 TTS: Convert strings to UTF-8
Conversion happens only for languages, that might needed (not
for english)
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad e801e83f43 TTS: Restart spd connection on speak error. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad a9eaf46c42 TTS: Add warning if the TTS could not be inited 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 7d72fc0d60 TTS: Restrict TTS on linux to only english
Unfortunatedly the encoding used by ScummVM breaks the
speech-dispatcher, so after trying to say non-ascii character
the connection has to be restarted. So for now I am restricting
the GUI TTS to english only.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 8bd7e39265 TTS: Add voice selection to options 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad b5cebcbeae TTS: Add text to speech to the GUI. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad fa6faca76a TTS: Add TTS checkbox to Options
Probably works only in the builtin theme right now.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 62a011e28a TTS: Add ttsStatus push and pop functions 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 7f895d21df TTS: Add checks for correct TTS engine state. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 8c44b03231 TTS: Resolve segfault when exiting scummvm 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 39e74b027e TTS: Add part of linux TTS 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad f78fc85f3a TTS: Create a TTS skeleton 2019-09-01 22:47:55 +03:00
Cameron Cawley 196b33bb7f PSP: Implement AbstractFSNode::createDirectory() 2019-08-26 11:38:47 +02:00
Alexander Tkachev 5b5a89e3e7 CLOUD: Make Network::ErrorResponse messages more verbose
This commit updates all usages of Network::ErrorResponse to specify at
least method name if not precise reason why operation failed.
2019-08-25 12:15:14 +03:00
Alexander Tkachev 24b1ec0ded CLOUD: Handle HTTP response headers case-insensitively
RFC 2616 states that HTTP headers are not case-sensitive and also allows
arbitrary number of whitespace characters around header value. Previous
implementation was dependant on headers to be in "Title-Case" and to
have only one space before header value. That has lead to cloud sync
failure on Debian x64 (user's network environment was probably the
reason though).

This commit adds a new method, which parses headers name-value pairs
into HashMap. To ensure case-insensitivity, all headers names are
converted to lowercase, and thus code that uses this method should
specify headers in lowercase. All usages of raw headers contents were
updated to use this method.
2019-08-25 12:15:14 +03:00
Jaromir Wysoglad c2e0e90c27 SDL: Use a non-const string for SDL_iconv_string
With some older versions of SDL1, the SDL_iconv_string takes
char * instead of const char * as it's argument. This should
fix the build issue with gp2xwiz.
2019-08-24 21:43:57 +01:00
D G Turner fb54cc1f77 CLOUD: Fix Inverted Test Regression in Debug Message Code
This was introduced by my previous commit to this where I accidently
inverted the tests during refactoring.
2019-08-24 16:59:17 +01:00