문제

I have a question about voiceOver or other features to read an text loud out. I made an App where you get LiveData via Bluetooth from a controller. If there is an error or an warning, it will display it on screen.

Now is my question, is there a way that the App read out the error or the warning, as soon as possible if there appear on the iPhone?

Perhaps know someone if there is an possibility to do that?

I hope you can help me ;) best regards.

Edit: AVSpeechSynthesizer was that perfect answer :) Here my sample code:

AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Warning: Test Test Test"];
[utterance setRate:0.3f];
[synthesizer speakUtterance:utterance];

Just this small code and add the "AVFoundation.framework".

도움이 되었습니까?

해결책

AVSpeechSynthesizer was released in iOS7. This should achieve what you are looking for.

Have a look at the documentation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top