Sound and Text-to-Speech Events
You can watch a video on these cool new features…
- Speak – the value will be any text you want spoken.
- SpeakLabel – the name of the SKLabelNode you want to have spoken
- SpeakLanguage – a dictionary defining different text for the preferred Language. Whatever value is set for Language will be what is played. For a reminder on how to set values, go here.
- SpeakPreference – the value can be ANY saved value.
Changing the Speech Voice
- SpeechRate – a decimal number value, default is 0.38. This property can be an event or set in the page’s Settings dictionary
- SpeechVolume – a decimal number value, default is 1. This property can be an event or set in the page’s Settings dictionary
- SpeechPitch – a decimal number value, default is 1.70. This property can be an event or set in the page’s Settings dictionary
- SpeechVoice – a voice code or country name for a new voice. This property can be an event or set in the page’s Settings dictionary
- OutputVoiceCodes – An event property which will output all the country name and voice codes.
- AllowRunOnSpeech – For the page’s Settings dictionary. Set YES and events that call text to speak will not interrupt the current speaking. So for example, calling a Speak event back to back will run the speech one after the other.
If you stumbled onto this article, it is part of our documentation for the Story Tellers iOS Starter Kit 2. The kit enables you to make children’s book apps and games without writing any code! But it is Swift 2 based and compatible with iOS9 (or higher) and Xcode 7 (or higher), so kit buyers can even extend the functionality to fit their needs further. Some of what we cover in the kit documentation may apply to Xcode in general, so this article could be worth a read even if you aren’t a user. You can purchase Lifetime Updates the kit here, or subscribe Yearly to CartoonSmart and get the latest version, plus access to all of our other kits / tutorials.
We’ve also created an iBook to document the very latest properties in the kit, so be sure to download that as well.