PushAudioInputStream Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. audio. AudioInputStream - com.
microsoft. cognitiveservices. speech. audio. PushAudioInputStream
- com.
- com.
public final class PushAudioInputStream
extends AudioInputStream
Represents memory backed push audio input stream used for custom audio input configurations. Note: close() must be called in order to release underlying resources held by the object.
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the stream. |
static
Push |
create()
Creates a memory backed Push |
static
Push |
create(AudioStreamFormat format)
Creates a memory backed Push |
void |
write(byte[] dataBuffer)
Writes the audio data specified by making an internal copy of the data. |
Methods inherited from AudioInputStream
Methods inherited from java.lang.Object
Method Details
close
public void close()
Closes the stream. Note: close() must be called in order to release underlying resources held by the object.
Overrides:
PushAudioInputStream.close()create
public static PushAudioInputStream create()
Creates a memory backed PushAudioInputStream using the default format (16 kHz, 16 bit, mono PCM).
Returns:
create
public static PushAudioInputStream create(AudioStreamFormat format)
Creates a memory backed PushAudioInputStream with the specified audio format.
Parameters:
Returns:
write
public void write(byte[] dataBuffer)
Writes the audio data specified by making an internal copy of the data. Note: The dataBuffer should not contain any audio header.
Parameters:
Applies to
Azure SDK for Java