VoiceOver Helpers For Managing Lines To Be Spoken And Avoiding AVSpeechSynthesizer Issues

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.

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: VoiceOver Helpers For Managing Lines To Be Spoken And Avoiding AVSpeechSynthesizer Issues

©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *