Class Speech
java.lang.Object
org.springframework.ai.openai.audio.speech.Speech
- All Implemented Interfaces:
ModelResult<byte[]>
The Speech class represents the result of speech synthesis from an AI model. It
implements the ModelResult interface with the output type of byte array.
- Since:
- 1.0.0-M1
- Author:
- Ahmed Yousri
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Retrieves the metadata associated with the result of an AI model.byte[]
Retrieves the output generated by the AI model.int
hashCode()
toString()
withSpeechMetadata
(OpenAiAudioSpeechMetadata speechMetadata)
-
Constructor Details
-
Speech
public Speech(byte[] audio)
-
-
Method Details
-
getOutput
public byte[] getOutput()Description copied from interface:ModelResult
Retrieves the output generated by the AI model.- Specified by:
getOutput
in interfaceModelResult<byte[]>
- Returns:
- the output generated by the AI model
-
getMetadata
Description copied from interface:ModelResult
Retrieves the metadata associated with the result of an AI model.- Specified by:
getMetadata
in interfaceModelResult<byte[]>
- Returns:
- the metadata associated with the result
-
withSpeechMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-