diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-11-08 21:55:32 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-11-10 08:17:11 +0200 |
commit | 2d28dea4ce8f19aae9ba38e50a16c64e00add7c1 (patch) | |
tree | c66b0eeb88ca920bcfc893bd9f4a596a2672eb34 /src | |
parent | 966405207caa91fad126093930b2f869f47c78e3 (diff) |
SAPI: fix word offsets in sayingWord signal
The event parameters take the leading XML into account, and the stored
currentText includes the XML as well, so we only have to skip the prefix
for the offset parameters of the signal.
The existing test covers this already and fails without this change,
just not CI as the Windows nodes don't have sound output devices.
Pick-to: 6.6
Change-Id: If10130131d39f65619730e13e7c8c0996e6cf0a9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/tts/sapi/qtexttospeech_sapi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/tts/sapi/qtexttospeech_sapi.cpp b/src/plugins/tts/sapi/qtexttospeech_sapi.cpp index 5f77079..0d35214 100644 --- a/src/plugins/tts/sapi/qtexttospeech_sapi.cpp +++ b/src/plugins/tts/sapi/qtexttospeech_sapi.cpp @@ -563,7 +563,7 @@ HRESULT QTextToSpeechEngineSapi::NotifyCallback(WPARAM /*wParam*/, LPARAM /*lPar m_state = QTextToSpeech::Ready; break; case SPEI_WORD_BOUNDARY: - emit sayingWord(currentText.sliced(event.lParam - textOffset, event.wParam), + emit sayingWord(currentText.sliced(event.lParam, event.wParam), event.lParam - textOffset, event.wParam); break; // these are the other TTS events which might be interesting for us at some point |