From bac880816b0442e504833bd9eeb3d782bcdd5fac Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 28 Jul 2019 16:24:45 +0100 Subject: TTS: Stop or pause speaking on word boundaries in macOS implementation --- backends/text-to-speech/macosx/macosx-text-to-speech.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.mm b/backends/text-to-speech/macosx/macosx-text-to-speech.mm index 46a05e6c98..281d92f926 100644 --- a/backends/text-to-speech/macosx/macosx-text-to-speech.mm +++ b/backends/text-to-speech/macosx/macosx-text-to-speech.mm @@ -69,13 +69,14 @@ bool MacOSXTextToSpeechManager::say(Common::String text, Common::String encoding } bool MacOSXTextToSpeechManager::stop() { - [synthesizer stopSpeaking]; + // Should we use NSSpeechImmediateBoundary, or even NSSpeechSentenceBoundary? + [synthesizer stopSpeakingAtBoundary:NSSpeechWordBoundary]; return true; } bool MacOSXTextToSpeechManager::pause() { - // Should we use NSSpeechWordBoundary, or even NSSpeechSentenceBoundary? - [synthesizer pauseSpeakingAtBoundary:NSSpeechImmediateBoundary]; + // Should we use NSSpeechImmediateBoundary, or even NSSpeechSentenceBoundary? + [synthesizer pauseSpeakingAtBoundary:NSSpeechWordBoundary]; return true; } -- cgit v1.2.3