Say replaces the deprecated OSX speech synthesis used in SuperCollider, Speech. Because the underlying commandline program 'say' is quite different, Say does not work as a straight replacement, but instead allows access to the options of the 'say' program.
'say' is a commandline program in macOS, and thus does not generate sound on the server. Nonetheless, there are two ways to get say-based sound into SC servers:
1. Patching e.g. the system audio output to an audio input (by hardware of by software) and thus routing Say-produced (mono) sound into the server for processing.
2. Using the SayBuf class to render text as spoken soundfiles, and play those with buffers as full audio sources in SC.
macOS provides a wide variety of voices for many languages that you are free to install and use, see System Preferences/Accessibility/Speech.
Example files:
Which voices?
Basic text reading methods
NEW Features in Say : (compared to Speech/speak)
1. .say any object:
2. use events and patterns to create strings to be spoken :
3. find and access voices by languages
4. find voices by name of language:
5. render spoken text to buffers, to use them as sound sources in SC:
the list of the available normal voices
the list of names of the available normal voices
the list of all available voices
the list of names of all available voices
the list of the available fxVoices (the "funny" older voices provided by Apple.)
the list of names of all fxVoices
the list of all short lang name symbols
the list of all long langName strings
return all voices found for the given lang name in optional argVoices (or voices or allVoices). Say.voicesByLang(\en)
get the current system voice name from macOS defaults (or nil if not set)
get the system default voice name (cached from last call to .getDefaultVoice)
find voice for given name. When default is true and vocie not found, replace with defaultVoice
say given voice name and its language symbol
find and say all voice names for a language
return the voice dict at <name>.
check whether a symbol is a valid voice name.
check whether a symbol is a valid language name.
maxPIDs
variable protects against this: additional say commands will be ignored (and posted).get and set the maximum number of say commands that will be processed at the same time. The default value of 10 is quite cautious; on a 2018 MacBook Pro, 32 still works fine. You can tune this for your system,
the current number of say commands in process, used to check safety.
clipRate, minRate, maxRate
address this.get and set flag whether rate values will be clipped.
Say.maxRate
get and set current maximum say rates (in syllables per second). Default normal rate for current systems (10.11 .. 10.14) voices is 180, minRate is 90, maxRate is 720.