Skip to content

A VoiceOver speech synthesizer and other iOS accessibility helpers.

License

Notifications You must be signed in to change notification settings

splinesoft/SSAccessibility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSAccessibility

Circle CI Coverage Status

iOS Accessibility and VoiceOver helpers, including a VoiceOver speech synthesizer.

SSAccessibility powers a speech synthesizer in my app MUDRammer - A Modern MUD Client for iPhone and iPad.

Install

Install with CocoaPods. Add to your Podfile:

pod 'SSAccessibility', :head # YOLO

SSSpeechSynthesizer

SSSpeechSynthesizer manages a queue of lines of text, speaking one at a time with VoiceOver, then speaking the next line when speaking finishes.

The user can interrupt speech by tapping any element on screen that is announced by VoiceOver.

Check out the Example project to see it in action.

Why not use iOS 7's AVSpeechSynthesizer?

You should if you can. AVSpeechSynthesizer is good for speaking long blobs of text. But there are reasons to prefer VoiceOver:

  • 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 for speaking with AVSpeechSynthesizer
  • AVSpeechSynthesizer doesn't stop speaking (only ducks volume) when VoiceOver starts, so two voices will be speaking at once
  • The user can immediately interrupt VoiceOver by tapping any accessible element on screen

SSAccessibility

Accessibility helpers. See SSAccessibility.h.

// Speak some text with VoiceOver. This is a shortcut for UIAccessibilityPostNotification.
[SSAccessibility speakWithVoiceOver:@"Hello world!"];

Thanks!

SSAccessibility is a @jhersh production -- (electronic mail | @jhersh)

About

A VoiceOver speech synthesizer and other iOS accessibility helpers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published