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

@Deprecated public class Speech extends Object implements ModelResult<byte[]>
Deprecated.
Use Speech from the core package instead. This class will be removed in a future release.
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)
      Deprecated.
  • Method Details

    • getOutput

      public byte[] getOutput()
      Deprecated.
      Description copied from interface: ModelResult
      Retrieves the output generated by the AI model.
      Specified by:
      getOutput in interface ModelResult<byte[]>
      Returns:
      the output generated by the AI model
    • getMetadata

      public OpenAiAudioSpeechMetadata getMetadata()
      Deprecated.
      Description copied from interface: ModelResult
      Retrieves the metadata associated with the result of an AI model.
      Specified by:
      getMetadata in interface ModelResult<byte[]>
      Returns:
      the metadata associated with the result
    • withSpeechMetadata

      public Speech withSpeechMetadata(@Nullable OpenAiAudioSpeechMetadata speechMetadata)
      Deprecated.
    • equals

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

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

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object