Package com.azure.ai.openai.models
Class InputAudioContent
java.lang.Object
com.azure.ai.openai.models.InputAudioContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<InputAudioContent>
public final class InputAudioContent
extends Object
implements com.azure.json.JsonSerializable<InputAudioContent>
A structured chat content item containing audio data.
-
Constructor Summary
ConstructorsConstructorDescriptionInputAudioContent(byte[] data, InputAudioFormat format) Creates an instance of InputAudioContent class.InputAudioContent(String data, InputAudioFormat format) Creates an instance of InputAudioContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputAudioContentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of InputAudioContent from the JsonReader.getData()Get the data property: Base64-encoded audio data.Get the format property: The format of the audio data.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
InputAudioContent
Creates an instance of InputAudioContent class.- Parameters:
data- the data value to set.format- the format value to set.
-
InputAudioContent
Creates an instance of InputAudioContent class.- Parameters:
data- - the audio data to set.format- - the format to set.
-
-
Method Details
-
getData
Get the data property: Base64-encoded audio data.- Returns:
- the data value.
-
getFormat
Get the format property: The format of the audio data.- Returns:
- the format value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<InputAudioContent>- Throws:
IOException
-
fromJson
Reads an instance of InputAudioContent from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of InputAudioContent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the InputAudioContent.
-