avspeechutterance

    1熱度

    1回答

    我正在編寫一個應用程序來爲學生閱讀隨機研究問題。 的基本流程是: 隨機生成的問題 文本分配到SpeechUtterrance 與SpeechSynthesizer 獲取學生的答案玩SpeechUtterance 檢查它 生成新的隨機問題 重複 一切正常,但我不能讓它讀取多個問題。它會說第一個,接受一個答案,但我不能讀它來閱讀隨後的話語。 didFinish運行後,我可以調用重置SpeechSynt

    -1熱度

    1回答

    我正在使用AVSpeechSynthesizer進行TTS功能​​測試。我想知道AVSpeechSynthesizer是否支持離線。 我用幾種語言嘗試了幾個文本,它支持離線。我想確保它支持所有語言的離線或不支持。 Does AVSpeechSynthesizer support offline for all the supported language?

    1熱度

    1回答

    使用語音到文本功能我可以很容易地獲得一個標籤。但我想把話語2加入話語。我想先說出話語,然後在話語完成後立刻講出話語。 let utterance = AVSpeechUtterance(string: dptext.text!) let utterance2 = AVSpeechUtterance(string: dptext2.text!) let synthesizer

    1熱度

    1回答

    我有一個啓用分頁的集合視圖。我正在使用AVSpeechSynthesizer將文本轉換爲集合視圖的單元格中的語音。當我從一個單元格滑動到另一個單元格時,我希望語音停止。現在我正在調用在單元類中聲明的stopSpeech函數。 //Cell Class import UIKit import AVFoundation class DetailArticleCell: UICollection

    0熱度

    1回答

    我正在使用下面的代碼在我的應用程序中說一個字符串。 var mySynthesizer = AVSpeechSynthesizer() var myUtterance = AVSpeechUtterance(string: "Hello World!") myUtterance.voice = AVSpeechSynthesisVoice(language: "en-US") myUtter