Collapse the table of content
Expand the table of content

ISpeechBaseStream Read Method (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

Interface: ISpeechBaseStream

Read Method

The Read method reads data from a stream object.

The Read method reads text or audio data from the stream into a Variant variable. Data is read from the Seek pointer of the stream until the specified number of bytes has been copied, or the end of the stream has been reached. When the method has completed, it returns the actual number of bytes read and resets the Seek pointer one byte past the last byte read.

     Buffer As Variant,
     NumberOfBytes As Long
) As Long


Specifies a Variant variable to receive the data.
Specifies the number of bytes of data to attempt to read from the audio stream.

Return Value

A Long variable containing the actual number of bytes read from the stream object.


Use of the Read method is demonstrated in a code example at the end of the ISpeechBaseStream section.

© 2015 Microsoft