GetSpeechPitch
You can determine a speech channel's current speech pitch by using the GetSpeechPitch function.
FUNCTION GetSpeechPitch (chan: SpeechChannel; VAR pitch: Fixed)
: OSErr;
chan
- The speech channel whose pitch you wish to determine.
pitch
- On exit, the current pitch of the voice in the speech channel, expressed as a fixed-point frequency value.
DESCRIPTION
The GetSpeechPitch function returns, in the pitch parameter, the pitch of the speech channel specified by the chan parameter. Typical voice frequencies range from around 90 hertz for a low-pitched male voice to perhaps 300 hertz for a high-pitched child's voice. These frequencies correspond to approximate pitch values in the ranges of 30.000 to 40.000 and 55.000 to 65.000, respectively. For information about the mathematical relationship between pitches and frequencies expressed in hertz, see "Speech Attributes" beginning on page 4-6.
SPECIAL CONSIDERATIONS
You can call the GetSpeechPitch function at interrupt time.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the GetSpeechPitch function are
| Trap macro | Selector |
_SoundDispatch | $0450000C |
RESULT CODES
| noErr | 0 | No error |
| invalidComponentID | -3000 | Speech channel is uninitialized or bad |