Share via


ISpeechBaseStream Read Method (SAPI 5.4)

Microsoft Speech API 5.4

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.

  
    ISpeechBaseStream.Read(
     Buffer As Variant,
     NumberOfBytes As Long
) As Long

Parameters

  • Buffer
    Specifies a Variant variable to receive the data.
  • NumberOfBytes
    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.

Example

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