#import-(void)speak:(NSString*)message { AVSpeechSynthesizer * synth = [[AVSpeechSynthesizer alloc] init]; AVSpeechUtterance * utterance = [[AVSpeechUtterance alloc] initWithString:message]; [utterance setRate:AVSpeechUtteranceMaximumSpeechRate *.3f]; [utterance setVolume:1.0f]; [utterance setPitchMultiplier:-3.0f]; [utterance setVoice:[AVSpeechSynthesisVoice voiceWithLanguage:@"en-IE"]]; [synth speakUtterance:utterance]; }
No comments:
Post a Comment