java.lang.Object
org.springframework.ai.openai.audio.speech.Speech
All Implemented Interfaces:
org.springframework.ai.model.ModelResult<byte[]>

public class Speech extends Object implements org.springframework.ai.model.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 Details

    • Speech

      public Speech(byte[] audio)
  • Method Details

    • getOutput

      public byte[] getOutput()
      Specified by:
      getOutput in interface org.springframework.ai.model.ModelResult<byte[]>
    • getMetadata

      public OpenAiAudioSpeechMetadata getMetadata()
      Specified by:
      getMetadata in interface org.springframework.ai.model.ModelResult<byte[]>
    • withSpeechMetadata

      public Speech withSpeechMetadata(@Nullable OpenAiAudioSpeechMetadata speechMetadata)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object