ISpeechBaseStream Interface (SAPI 5.4)
The ISpeechBaseStream automation interface defines properties and methods for manipulating data streams.
ISpeechBaseStream objects normally contain audio data, but may also be used for text data.
The Read, Write and Seek methods maintain a pointer referred to as the Seek pointer. The Read and Write methods begin reading or writing at the Seek pointer, and reset the Seek pointer one byte past the last byte read or written. The Seek method returns the current pointer, and can also move the Seek pointer forward or backward in the stream, starting from the Seek pointer, or relative to the beginning or the end of the stream.
Use of the Read, Write and Seek methods are demonstrated in a code example at the end of the ISpeechBaseStream section.
The ISpeechBaseStream is not an object in its own right, but is implemented by other objects, such as SpFileStream and SpMemoryStream. SAPI does not call ISpeechBaseStream methods, but uses the underlying COM interfaces. For this reason, a custom object cannot be created using the ISpeechBaseStream interface.
Automation Interface Elements
The ISpeechBaseStream automation interface contains the following elements:
|Format Property||Gets and sets the cached wave format of the stream as an SpAudioFormat object.|
|Read Method||Reads data from the audio stream.|
|Seek Method||Returns the current read position of the audio stream in bytes.|
|Write Method||Writes data to the audio stream.|