AVSpeechSynthesizer

2024/4/16 8:02:31

文字转语音AVSpeechSynthesizer

1.添加类库AVFoundation.framework 2.引入 #import <AVFoundation/AVFoundation.h>3.定义属性 property (nonatomic,strong) AVSpeechSynthesizer *spee;4.对其进行懒加载操作&#xff0c;并引入协议 < AVSpeechSynthesizerDelegate > -(AVSpeechSynthesizer *)sp…