Contents

SpeakBuffer

Speaks a buffer of text, using certain flags to controlspeech behavior.

Declaration

OSErr SpeakBuffer(SpeechChannel chan, const void *textBuf, unsigned long textBytes, SInt32 controlFlags);

Parameters

  • chan:

    The speech channel through which speech is to be spoken.

  • textBuf:

    A pointer to the first byte of text to spoken.

  • textBytes:

    The number of bytes of text to spoken.

  • controlFlags:

    Control flags to customize speech behavior.

Return Value

A resultcode. See Result Codes.

Discussion

The SpeakBuffer functionbehaves identically to the SpeakText function,but allows control of several speech parameters by setting valuesof the controlFlags parameter.The controlFlags parameterrelies on specific constants, which may be applied additively. See Control Flags Constants.

Each constant specifies a flag bit of the controlFlags parameter,so by passing the constants additively you can enable multiple capabilitiesof SpeakBuffer. If youpass 0 in the controlFlags parameter, SpeakBuffer worksjust like SpeakText.By passing kNoEndingProsody + kNoSpeechInterrupt inthe controlFlags parameter, SpeakBuffer workslike SpeakText exceptthat the kNoEndingProsody and kNoSpeechInterrupt features havebeen selected. Future versions of the Speech Synthesis Manager maydefine additional constants.

When the controlFlags parameteris set to 0, SpeakBuffer behavesidentically to SpeakText.

See Also

Starting, Stopping, and Pausing Speech