With iOS 7 apple added the AVSpeechSynthesizer providing a simple text to speech synthesizer but there are some issues that can arise when using AVSpeechSynthesizer to enhance app accessibility.
Here are a couple of libraries (SSAccessibility and SSSpeechynthesizer) that provides a number of helpers to VoiceOver allowing you to use VoiceOver as an alternative to AVSpeechSynthesizer alllowing you to manage the queuing of different lines of text avoiding a number of issues that can arise when using AVSpeechSynthesizer.
The readme states why you might want to use VoiceOver (and SSSpeechSynthesizer):
– AVSpeechSynthesizer requires iOS 7
– AVSpeechSynthesizer doesn’t always pause or stop speaking when asked
– The user can set her preferred VoiceOver speaking rate in Settings.app, but there is no programmatic API access to that default speech rate — say, for use in your AVSpeechSynthesizer
– AVSpeechSynthesizer doesn’t stop speaking (only ducks) when VoiceOver starts, so two voices will be speaking at once
– The user can immediately (and intentionally or unintentionally) interrupt VoiceOver by tapping any element on screen
These libraries contain helpers for speaking text, enqueueing lines to be spoken after the current speaking, stopping speaking, continuing speaking, checking if there is currently speaking, and more.
You can find SSAccessibility and SSSpeechSynthesizer on Github here.
A nice set of helpers for accessibility.
Submit A Resource
Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?
You can submit the url here.
The resources we feel will appeal to our readers the most will be posted on the front page.