Skip to main content

Start and Stop Synthesis

Send a synthesis request

When you pass the text to be read to speak(), speech synthesis begins. If you can pass the entire text at once, you can omit the isFinal field or specify it as true. In this case, the provided text is treated as a single completed request.

textToSpeech.speak("안녕하세요. 무엇을 도와드릴까요?")

If you deliver the text in multiple parts, specify the isFinal field as false for all calls except the last one, and specify it as true for the last call. If isFinal is not specified in non-final calls, the default value of true is applied, and the request ends with the text up to that point.

textToSpeech.speak("안녕하세요. ", isFinal = false)
textToSpeech.speak("TextToSpeech SDK입니다.", isFinal = true)

In modes that require app registration, make the request after OnServerConnectionListener.onConnected() is called. You can check the progress and results in Event listeners.

Stop synthesis and playback

To stop ongoing speech synthesis and playback, call stop().

textToSpeech.stop()

Once the stop is complete, onStop() of the registered EventListener is called.