Sound and Text-to-Speech Events
Story Tellers iOS Starter Kit 2 Documentation
- PlayBackgroundSound – the value will be the sound file minus extension (the code will add .mp3 to the end).
- StopBackgroundSound – the value will be the sound file minus extension (the code will add .mp3 to the end).
- PlayOrStopBackgroundSound – the value will be the sound file minus extension (the code will add .mp3 to the end).
- PlayOrStopNarrationSound – the value will be the sound file minus extension (the code will add .mp3 to the end).
- PlayNarrationSound – the value will be the sound file minus extension (the code will add .mp3 to the end).
- StopNarrationSound – the value will be the sound file minus extension (the code will add .mp3 to the end).
Note: you can choose whether or not narration and background sounds stop when the page transitions using Page Settings properties.
- PlaySound –Â the value will be the sound file PLUS extension (the source can be any supported sound format).
- PlaySoundFromPool – enter the name of a pool array containing an unlimited number of sound files. For example…
- PlaySoundFromPreference –  enter the name of a saved value which notes the sound file. For example…
As some point prior to calling PlaySoundFromPreference, the app should set a value for PreferredSound (or whatever you named this preference).
To find out more on sound properties you can set on a per-page basis, go here (for example, whether or not the background sound continues or restarts on each page).
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.