Speech Library

The speech library provides functions for speech synthesize on macOS, iOS and Android devices.

Including the Library

To include the library in your standalones, include the Speech Library in the Inclusions pane of the standalone settings stack.

Including the library

Using the Library

Before starting to use the library it must be initalized. For example:

on preOpenStack
    speechInitializeLibrary
end preOpenStack

on speechLibraryInitialized pSuccess
    if pSuccess then
        speechSpeakUtterance "Ready"
    end if
end speechLibraryInitialized

Once initialized the library functions may be used to alter the voice used by the library to speak utterances:

The speechSpeakUtterance command can be used to synthesize text using the current voice properties. For example:

local sTimeoutMsg
on openCard
    send "hurryUp" to me in 10 seconds
    put the result into sTimeoutMsg
end openCard

on mouseUp
    cancel sTimeoutMsg
end mouseUp

on hurryUp
    speechSpeakUtterance "Hurry up and click the button"
end hurryUp