0
我已經將亞馬遜polly集成到我的項目中的一個swift中,並要求它TTS多個文本字符串集。當然,我用的還有下面的步驟來打聲:亞馬遜polly不玩多個文本輸入
builder.continueOnSuccessWith { (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
}
雖然調試我發現,replaceCurrentItem也加入到打新的項目,而忽略以前的。我想就如何在其框架內處理這種多次呼叫提出一些建議。
任何幫助表示讚賞!謝謝