SpeechRecognitionStream Class

A Stream implementation, for consumption by SpeechFX, which is backed by data received as RTP by an AudioVideoFlow.

Inheritance Hierarchy


Namespace: Microsoft.Rtc.Collaboration.AudioVideo
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)


Public NotInheritable Class SpeechRecognitionStream _
    Inherits Stream
Dim instance As SpeechRecognitionStream
public sealed class SpeechRecognitionStream : Stream


This class effectively has two interfaces: the Stream interface available to SpeechFX and the application, and the buffer-handling interface available to the SRC. Data is supplied in buffers by the SRC, which then reclaims the buffers when they are emptied. On the app/Speech side, the buffers are invisible, and data appears to be stored in a single unbroken Stream. Audio data is copied from the RMA buffers to the managed heap, and then back to the unmanaged heap inside SpeechFX for use by SAPI. Profiling suggests that this extra copy is extremely cheap, so it isn't worth trying to be clever about not marshaling the audio data.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


SpeechRecognitionStream Members

Microsoft.Rtc.Collaboration.AudioVideo Namespace