Forward and Rewind audio and speech synthesis playback

Last reviewed: 9/10/2008

HOW Article ID: H090813

The information in this article applies to:

  • SpeechKit 6


Once an audio or speech synthesis request is submitted, you can pause, resume, and stop (cancel) it.

With SpeechKit 6, you skip forward and backwards within the audio and synthesized speech playback.

More Information

Applications can now offer end users more control over their playbacks in addition to pause, resume, and stop (cancel).

In SpeechKit 6, the ChantAudio and ChantTTS components offer a new method—SkipPlayback—to advance forward or backwards through the audio and synthesized speech audio.

For audio playback, the ChantAudio SkipPlayback method interprets the skip type value of 1 as an audio buffer. The size of the audio buffers varies depending on the audio format.

For synthesized speech playback, the ChantTTS SkipPlayback method interprets the skip type value in terms of the synthesizer’s type of skip unit. The value 1 represents the skip type of SENTENCE for SAPI 5 and TTS_JMP_TEXTUNIT for RealSpeak Solo.

The number of units skipped can be defined for each skip invoked. To skip forward, use a positive value. To skip backwards use a negative value as illustrated in the following example:

// Skip audio forward 1 skip unit
ChantAudio.SkipPlayback(1, 1)
// Skip audio backward 1 skip unit
ChantAudio.SkipPlayback(1, -1)

// Skip synthesis forward 1 skip unit
ChantTTS.SkipPlayback(1, 1)
// Skip synthesis backward 1 skip unit
ChantTTS.SkipPlayback(1, -1)