Language

PushAudioInputStream Class

Definition

Represents memory backed push audio input stream used for custom audio input configurations.

public sealed class PushAudioInputStream : Microsoft.CognitiveServices.Speech.Audio.AudioInputStream
type PushAudioInputStream = class
    inherit AudioInputStream
Public NotInheritable Class PushAudioInputStream
Inherits AudioInputStream
Inheritance
PushAudioInputStream

Constructors

Name Description
PushAudioInputStream()

Creates a memory backed PushAudioInputStream using the default format (16 kHz, 16 bit, mono PCM).

PushAudioInputStream(AudioStreamFormat)

Creates a memory backed PushAudioInputStream with the specified audio format.

Fields

Name Description
isDisposing

Indicates whether the object is currently being disposed.

(Inherited from AudioInputStream)

Methods

Name Description
Close()

Closes the stream.

Commit()

Requests that the audio written so far be committed as a completed segment. Non-blocking; returns immediately with a correlation token.

The request is advisory. A token is issued as soon as the request is recorded, but there is no guarantee that it will be acknowledged: the service may not support inline commit, or the session may end first. Applications must tolerate a token that is never echoed.

Commit(UInt32)

Same as Commit() but scoped to a single channel of a multichannel input. The service acknowledges the commit on the named channel only.

Dispose()

Dispose of associated resources.

(Inherited from AudioInputStream)
Dispose(Boolean)

This method performs cleanup of resources. The Boolean parameter disposing indicates whether the method is called from Dispose() (if disposing is true) or from the finalizer (if disposing is false). Derived classes should override this method to dispose resource if needed.

(Inherited from AudioInputStream)
SetProperty(PropertyId, String)

Set value of a property associated to data buffer. The properties of the audio data must be set before writing the audio data. Added in 1.5.0

SetProperty(String, String)

Set value of a property associated to data buffer. The properties of the audio data mustt be set before writing the audio data. Added in 1.5.0

Write(Byte[], Int32)

Writes the audio data specified by making an internal copy of the data.

Write(Byte[])

Writes the audio data specified by making an internal copy of the data. Note: The dataBuffer must not contain an audio header.

Applies to