Last active
December 23, 2015 16:49
-
-
Save marcelofabri/6665076 to your computer and use it in GitHub Desktop.
Exemplo de AVSpeechSynthesizer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// supondo que o device está em pt já | |
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init]; | |
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"O NSNull é o melhor evento sobre"]; | |
utterance.rate = AVSpeechUtteranceMaximumSpeechRate / 4.0f; | |
[synthesizer speakUtterance:utterance]; | |
utterance = [AVSpeechUtterance speechUtteranceWithString:@"i O S"]; | |
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; | |
utterance.rate = AVSpeechUtteranceMaximumSpeechRate / 4.0f; | |
[synthesizer speakUtterance:utterance]; | |
utterance = [AVSpeechUtterance speechUtteranceWithString:@"do Brasil!"]; | |
utterance.rate = AVSpeechUtteranceMaximumSpeechRate / 4.0f; | |
[synthesizer speakUtterance:utterance]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment