我在我的 iOS 应用程序中使用了 amazon polly Joanna,但我无法听到我输入的文本的第一个单词。谁能帮我解决这个问题。贝娄是我正在使用的代码
let input = AWSPollySynthesizeSpeechURLBuilderRequest()
// Text to synthesize
input.text = "Sample text"
// We expect the output in MP3 format
input.outputFormat = AWSPollyOutputFormat.mp3
// Choose the voice ID
input.voiceId = AWSPollyVoiceId.joanna
// Create an task to synthesize speech using the given synthesis input
let builder = AWSPollySynthesizeSpeechURLBuilder.default().getPreSignedURL(input)
// Request the URL for synthesis result
builder.continueOnSuccessWith(block: { (awsTask: AWSTask<NSURL>) -> Any? in
// The result of getPresignedURL task is NSURL.
// Again, we ignore the errors in the example.
let url = awsTask.result!
// Try playing the data using the system AVAudioPlayer
self.audioPlayer.replaceCurrentItem(with: AVPlayerItem(url: url as URL))
self.audioPlayer.play()
return nil
})