Skip to content
SiteEmail

ICohtmlSpeechSynthesizer

Cross-platform API for Synthesizer Implement it for target platforms.

#include <CohtmlSpeechSynthesizer.h>

Name
virtual~ICohtmlSpeechSynthesizer() =default
virtual boolInitialize() =0
Should perform any initialization work for the synthesizer.
virtual boolSpeak(const FString & Text, float Volume =1.f, float Rate =1.f, uint32 Language =0) =0
Called on worker thread Should speak the request to audio output if such functionality is supported.
virtual voidCancel() =0
Cancels speech requests and stops playing the current one if it’s playing using Speak. Expected to be called on time-sensitive threads.
virtual boolIsSpeakingOrProcessing() =0
virtual ~ICohtmlSpeechSynthesizer() =default
virtual bool Initialize() =0

Should perform any initialization work for the synthesizer.

Return: if synthesizer was initialized successfully

virtual bool Speak(
const FString & Text,
float Volume =1.f,
float Rate =1.f,
uint32 Language =0
) =0

Called on worker thread Should speak the request to audio output if such functionality is supported.

Return: if the request was successfully scheduled to audio output

virtual void Cancel() =0

Cancels speech requests and stops playing the current one if it’s playing using Speak. Expected to be called on time-sensitive threads.

virtual bool IsSpeakingOrProcessing() =0

Return: if currently there is a request processing or audio playing.