void USpeechComponent::GenerateSpeechSync()

in Source/AmazonPollyMetaHuman/Private/SpeechComponent.cpp [109:121]


void USpeechComponent::GenerateSpeechSync(const FString Text, const EVoiceId VoiceId) {
    if (Text.IsEmpty()) {
        UE_LOG(LogPollyMsg, Error, TEXT("Cannot generate speech (check input text)."));
        return;
    }
    if (IsSpeaking()) {
        UE_LOG(LogPollyMsg, Error, TEXT("Cannot generate speech during playback."));
        return;
    }
    if (SynthesizeAudio(Text, VoiceId) && SynthesizeVisemes(Text, VoiceId)) {
        UE_LOG(LogPollyMsg, Display, TEXT("Polly called successfully!"));
    }
}