Interface Vocalizer

ru.yandex.speechkit

public  interface  Vocalizer 

All Known Implementing Classes:
OnlineVocalizer

The interface of the object that performs text-to-speech synthesis and conversion.

Nested Classes

Methods

voidcancel()

Interrupts the process of speech synthesis and vocalizing the synthesized speech.

voiddestroy()

Explicitly releases resources used by the component.

voidplay()

Starts the playback of the synthesized speech.

voidprepare()

Prepares an object of the Vocalizer class for speech synthesis.

voidsynthesize(@NonNull final String text, @NonNull final TextSynthesizingMode mode)

Starts the process of speech synthesis.

Method Detail

cancel

public void cancel ()

Interrupts the process of speech synthesis and vocalizing the synthesized speech.

destroy

public void destroy ()

Explicitly releases resources used by the component.

Once the resources are released, no correct operation of Vocalizer is possible.

play

public void play ()

Starts the playback of the synthesized speech.

This method should be called to start playing the synthesized audio if isAutoPlay () is set to false.

prepare

public void prepare ()

Prepares an object of the Vocalizer class for speech synthesis.

Makes preparation for speech synthesis in advance. If the method is not called explicitly, it is called automatically in the synthesize(String, TextSynthesizingMode) method. Asynchronous execution.

synthesize

public void synthesize (@NonNull final String text, @NonNull final TextSynthesizingMode mode)

Starts the process of speech synthesis.

Can be called multiple times for a single object of the Vocalizer class. If speech synthesis is not completed when the method is called again, the object's behavior will be determined by the mode parameter. Asynchronous execution.
Parameters:
text

The text for synthesis.

mode

The behavior of an object of the Vocalizer class if the previously launched speech synthesis process was not completed.