Reputation: 15
I want to implement the AVFoundation recording system (NOT SPEECH) but it seems to be set to detect only english. Is there any parameter to change?
Upvotes: 0
Views: 102
Reputation:
Check language codes by:
for voice in (AVSpeechSynthesisVoice.speechVoices()){
print(voice.language)
}
and the get it by below code:
let speakTalk = AVSpeechSynthesizer()
let speakMessage = AVSpeechUtterance(string: "Hello, How are you?")
speakMessage.voice = AVSpeechSynthesisVoice(language: "en-US")
speakMessage.pitchMultiplier = 1.2
speakMessage.rate = 0.5
speakTalk.speak(speakMsg)
It is what you need?
Upvotes: 1