AudioStreamFormat Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. audio. AudioStreamFormat
- com.
public final class AudioStreamFormat
Represents audio stream format used for custom audio input configurations.
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Explicitly frees any external resource attached to the object |
static
Audio |
getCompressedFormat(AudioStreamContainerFormat compressedFormat)
Creates an audio stream format object with the specified compressed audio container format, to be used as input format. |
static
Audio |
getDefaultInputFormat()
Creates an audio stream format object representing the default audio stream format (16 k |
Safe |
getImpl()
Returns the audio stream format. |
static
Audio |
getWaveFormat(long samplesPerSecond, short bitsPerSample, short channels, AudioStreamWaveFormat waveFormat)
Creates an audio stream format object with the specified pcm waveformat characteristics. |
static
Audio |
getWaveFormatPCM(long samplesPerSecond, short bitsPerSample, short channels)
Creates an audio stream format object with the specified pcm waveformat characteristics. |
Methods inherited from java.lang.Object
Method Details
close
public void close()
Explicitly frees any external resource attached to the object
getCompressedFormat
public static AudioStreamFormat getCompressedFormat(AudioStreamContainerFormat compressedFormat)
Creates an audio stream format object with the specified compressed audio container format, to be used as input format. Added in version 1.4.0
Parameters:
Returns:
getDefaultInputFormat
public static AudioStreamFormat getDefaultInputFormat()
Creates an audio stream format object representing the default audio stream format (16 kHz, 16 bit, mono PCM).
Returns:
getImpl
public SafeHandle getImpl()
Returns the audio stream format.
Returns:
getWaveFormat
public static AudioStreamFormat getWaveFormat(long samplesPerSecond, short bitsPerSample, short channels, AudioStreamWaveFormat waveFormat)
Creates an audio stream format object with the specified pcm waveformat characteristics.
Parameters:
Returns:
getWaveFormatPCM
public static AudioStreamFormat getWaveFormatPCM(long samplesPerSecond, short bitsPerSample, short channels)
Creates an audio stream format object with the specified pcm waveformat characteristics.
Parameters:
Returns:
Applies to
Azure SDK for Java