Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 试图让IOS应用程序使用泰卢固语。没有语音输出。但是,它适用于其他语言_Swift_Text To Speech_Avspeechsynthesizer_Avspeechutterance - Fatal编程技术网

Swift 试图让IOS应用程序使用泰卢固语。没有语音输出。但是,它适用于其他语言

Swift 试图让IOS应用程序使用泰卢固语。没有语音输出。但是,它适用于其他语言,swift,text-to-speech,avspeechsynthesizer,avspeechutterance,Swift,Text To Speech,Avspeechsynthesizer,Avspeechutterance,泰卢固语是印度语。此代码适用于印地语,但不适用于泰卢固语。您可以将其设置为AVSpeechSynthesisVoice(语言:“te”)。我还没有为这个做一个演示,但我能够找到这个使用下面的链接- 从该链接中搜索您所需的语言。此外,在使用之前,请确保检查是否已下载到设备中。您确定支持Telugu吗?检查是否确实正在创建语音对象。这个列表已经有几年历史了,但它没有泰卢固语,它可能只是不受@EmilioPelaez Oh shoot支持。是的,我想这就是问题所在。我从这里取的-这不是AVSpeech


泰卢固语是印度语。此代码适用于印地语,但不适用于泰卢固语。

您可以将其设置为
AVSpeechSynthesisVoice(语言:“te”)
。我还没有为这个做一个演示,但我能够找到这个使用下面的链接-


从该链接中搜索您所需的语言。此外,在使用之前,请确保检查是否已下载到设备中。

您确定支持Telugu吗?检查是否确实正在创建语音对象。这个列表已经有几年历史了,但它没有泰卢固语,它可能只是不受@EmilioPelaez Oh shoot支持。是的,我想这就是问题所在。我从这里取的-这不是AVSpeechSynthesizer列表。没有变通方法吗?如果不支持该语言,则不支持,没有变通方法。设备上不存在生成音频所需的文件。
class ViewController: UIViewController {


let speakTalk = AVSpeechSynthesizer()

let phrase1 = AVSpeechUtterance(string: "నాకు నీరు కావాలి")//*Telugu translation for i want water//*

@IBOutlet weak var iwantwater: UIButton!

@IBAction func iwantwaterbtn(_ sender: Any) 

   {

       phrase1.voice = AVSpeechSynthesisVoice(language: "te_IN")

       speakTalk.speak(phrase1)
    }

}