PullAudioInputStreamCallback Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. audio. PullAudioInputStreamCallback
- com.
public abstract class PullAudioInputStreamCallback
An abstract base class that defines callback methods (read() and close()) for custom audio input streams).
Constructor Summary
Constructor | Description | |
---|---|---|
PullAudioInputStreamCallback() |
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes the audio input stream. |
java.lang.String |
getProperty(PropertyId id)
Get property associated to data buffer, such as a timestamp or user |
abstract int |
read(byte[] dataBuffer)
Reads data from audio input stream into the data buffer. |
Methods inherited from java.lang.Object
Constructor Details
PullAudioInputStreamCallback
public PullAudioInputStreamCallback()
Method Details
close
public abstract void close()
Closes the audio input stream.
getProperty
public String getProperty(PropertyId id)
Get property associated to data buffer, such as a timestamp or userId. If the property is not available, an empty string must be returned. Added in version 1.5.0
Parameters:
Returns:
read
public abstract int read(byte[] dataBuffer)
Reads data from audio input stream into the data buffer. The maximal number of bytes to be read is determined by the size of dataBuffer. If there is no data immediately available, read() blocks until the next data becomes available. Note: The dataBuffer returned by read() should not contain any audio header.
Parameters:
Returns:
Applies to
Azure SDK for Java
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin