func SetSpeechProperty (SpeechChannel, CFString, CFTypeRef?) -> OSErr func SetSpeechPitch (SpeechChannel, Fixed) -> OSErr func SetSpeechRate (SpeechChannel, Fixed) -> OSErr The Speech Synthesis Manager, formerly called the Speech Manager, is the part of macOS that provides a standardized method for Mac apps to generate synthesized speech. For example, you may want your application to incorporate the capability to speak its dialog box messages to the user. A word-processing application might use the Speech Synthesis Manager to implement a command that speaks a selected section of a document to the user. Because sound samples can take up large amounts of room on disk, using text in place of sampled sound is extremely efficient. For example, a multimedia application might use the Speech Synthesis Manager to provide a narration of a QuickTime movie instead of including sampled-sound data on a movie track.
OS X v10.5 introduces native support for performing speech synthesis tasks using Core Foundation-based objects, such as speaking text represented as CFString objects and managing speech channel properties using a CFDictionary-based property dictionary. You should begin using these Core Foundation-based programming interfaces as soon as it’s convenient, because future synthesizers will accept Core Foundation strings and data structures directly through the speech synthesis framework. In the meantime, existing buffer-based clients and synthesizers will continue to work as before, with strings and other data structures getting automatically converted as necessary.
You can check for version and feature availability information by using the Speech Synthesis Manager selectors defined in the Gestalt Manager.
func SetSpeechProperty (SpeechChannel, CFString, CFTypeRef?) -> OSErr func SetSpeechPitch (SpeechChannel, Fixed) -> OSErr func SetSpeechRate (SpeechChannel, Fixed) -> OSErr func CopyPhonemesFromText (SpeechChannel, CFString, UnsafeMutablePointer<CFString?>) -> OSErr func UseSpeechDictionary (SpeechChannel, CFDictionary) -> OSErr func NewSpeechChannel (UnsafeMutablePointer<VoiceSpec>?, UnsafeMutablePointer<SpeechChannel?>) -> OSErr func CopySpeechProperty (SpeechChannel, CFString, UnsafeMutablePointer<CFTypeRef?>) -> OSErr func GetSpeechPitch (SpeechChannel, UnsafeMutablePointer<Fixed>) -> OSErr func GetSpeechRate (SpeechChannel, UnsafeMutablePointer<Fixed>) -> OSErr func SpeechBusy () -> Int16 func SpeechBusySystemWide () -> Int16 func SpeechManagerVersion () -> NumVersion func CountVoices (UnsafeMutablePointer<Int16>) -> OSErr func GetIndVoice (Int16, UnsafeMutablePointer<VoiceSpec>) -> OSErr GetIndVoice function.func GetVoiceDescription (UnsafePointer<VoiceSpec>?, UnsafeMutablePointer<VoiceDescription>?, Int) -> OSErr GetVoiceDescription function.func GetVoiceInfo (UnsafePointer<VoiceSpec>?, OSType, UnsafeMutableRawPointer) -> OSErr GetVoiceDescription function provides,or to determine in which file and resource a voice is stored. func MakeVoiceSpec (OSType, OSType, UnsafeMutablePointer<VoiceSpec>) -> OSErr func ContinueSpeech (SpeechChannel) -> OSErr PauseSpeechAt function.func SpeakCFString (SpeechChannel, CFString, CFDictionary?) -> OSErr CFString object.func StopSpeech (SpeechChannel) -> OSErr func StopSpeechAt (SpeechChannel, Int32) -> OSErr func SpeechSynthesisRegisterModuleURL (CFURL) -> OSErr func SpeechSynthesisUnregisterModuleURL (CFURL) -> OSErr typealias SpeechDoneProcPtr typealias SpeechErrorProcPtr typealias SpeechErrorCFProcPtr CFString object being processed by the Speech Synthesis Manager.typealias SpeechPhonemeProcPtr typealias SpeechSyncProcPtr typealias SpeechTextDoneProcPtr typealias SpeechWordProcPtr typealias SpeechWordCFProcPtr struct DelimiterInfo struct PhonemeDescriptor struct PhonemeInfo struct SpeechChannelRecord typealias SpeechChannel typealias SpeechDoneUPP struct SpeechErrorInfo typealias SpeechErrorUPP typealias SpeechPhonemeUPP struct SpeechStatusInfo typealias SpeechSyncUPP typealias SpeechTextDoneUPP struct SpeechVersionInfo typealias SpeechWordUPP struct SpeechXtndData struct VoiceDescription struct VoiceFileInfo struct VoiceSpec OSType definitions used by the Speech Synthesis Manager.GetVoiceInfo function.GetSpeechInfo or SetSpeechInfo functions.CopySpeechProperty(_:_:_:) or SetSpeechProperty(_:_:_:) to get or set the characteristics of a speech channel.kSpeechStatusProperty property to specify the status of the speech channel.kSpeechErrorsProperty property to describe errors encountered during speech processing and production.kSpeechSynthesizerInfoProperty property to get information about the synthesizer.kSpeechPhonemeSymbolsProperty property to provide information about the phoneme being processed.kSpeechCurrentVoiceProperty property to specify information about the current voice.kSpeechCommandDelimiterProperty property to specify information about the command delimiter strings.The most common result codes returned by Speech SynthesisManager are listed below.
var noSynthFound : Int var synthOpenFailed : Int var synthNotReady : Int var bufTooSmall : Int var voiceNotFound : Int var incompatibleVoice : Int var badDictFormat : Int var badInputText : Int