TTS output to wave file locks file for playback

Last reviewed: 7/14/2000

PRB Article ID: P060002

The information in this article applies to:

  • SpeechKit 2.1


Setting the TTS audio output using the SetAudioFile method writes the audio to the file, but the file is inaccessible and does not allow for playback.


The SAPI audio object has the file open so other applications can not read the audio data from the file.


Fixed in SpeechKit 2.1.2. SetAudioFile may now be invoked on an active session. You must invoke the first SetAudioFile before StartTextToSpeech. Subsequent SetAudioFile invocations are possible without having to close the session with StopTextToSpeech. To free the audio file to access after synthesizing to it, you must wait for the AudioDone event, then SetAudioFile to another value (e.g., SetAudioFile "", ownerHandle).