text to speech conversion

后端 未结 3 376
挽巷
挽巷 2021-01-22 13:46

We are making iPhone app where client want reminder as voice message.

Requirement is user will set time and text they want for for reminder.

Using text, I will c

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-22 14:42

    Use AVSpeechSynthesizer

    AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
    AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Some random text that you want to be spoken"];
    [utterance setRate:0.7];
    [synthesizer speakUtterance:utterance];
    

    Reference

提交回复
热议问题