in Source/AmazonPollyMetaHuman/Private/SpeechComponent.cpp [123:133]
bool USpeechComponent::SynthesizeAudio(const FString& Text, const EVoiceId VoiceId) {
PollyOutcome PollyAudioOutcome = MyPollyClient->SynthesizeSpeech(CreatePollyAudioRequest(Text, VoiceId));
if (PollyAudioOutcome.IsSuccess) {
FScopeLock lock(&Mutex);
Audiobuffer = PollyAudioOutcome.StreamBuffer;
}
else {
UE_LOG(LogPollyMsg, Error, TEXT("Polly failed to generate audio file. Error: %s"), *AwsStringToFString(PollyAudioOutcome.PollyErrorMsg));
}
return PollyAudioOutcome.IsSuccess;
}