Class SpeechResponse
java.lang.Object
org.springframework.ai.openai.audio.speech.SpeechResponse
- All Implemented Interfaces:
ModelResponse<Speech>
Creates a new instance of SpeechResponse with the given speech result.
- Since:
- 1.0.0-M1
- Author:
- Ahmed Yousri
-
Constructor Summary
ConstructorsConstructorDescriptionSpeechResponse(Speech speech) Creates a new instance of SpeechResponse with the given speech result.SpeechResponse(Speech speech, OpenAiAudioSpeechResponseMetadata speechResponseMetadata) Creates a new instance of SpeechResponse with the given speech result and speech response metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the response metadata associated with the AI model's response.Retrieves the result of the AI model.Retrieves the list of generated outputs by the AI model.inthashCode()
-
Constructor Details
-
SpeechResponse
Creates a new instance of SpeechResponse with the given speech result.- Parameters:
speech- the speech result to be set in the SpeechResponse- See Also:
-
SpeechResponse
Creates a new instance of SpeechResponse with the given speech result and speech response metadata.- Parameters:
speech- the speech result to be set in the SpeechResponsespeechResponseMetadata- the speech response metadata to be set in the SpeechResponse- See Also:
-
-
Method Details
-
getResult
Description copied from interface:ModelResponseRetrieves the result of the AI model.- Specified by:
getResultin interfaceModelResponse<Speech>- Returns:
- the result generated by the AI model
-
getResults
Description copied from interface:ModelResponseRetrieves the list of generated outputs by the AI model.- Specified by:
getResultsin interfaceModelResponse<Speech>- Returns:
- the list of generated outputs
-
getMetadata
Description copied from interface:ModelResponseRetrieves the response metadata associated with the AI model's response.- Specified by:
getMetadatain interfaceModelResponse<Speech>- Returns:
- the response metadata
-
equals
-
hashCode
public int hashCode()
-