Class SpeechMessage

java.lang.Object
org.springframework.ai.openai.audio.speech.SpeechMessage

public class SpeechMessage extends Object
The SpeechMessage class represents a single text message to be converted to speech by the OpenAI TTS API.
Since:
1.0.0-M1
Author:
Ahmed Yousri
  • Constructor Details

    • SpeechMessage

      public SpeechMessage(String text)
      Constructs a new SpeechMessage object with the given text.
      Parameters:
      text - the text to be converted to speech
  • Method Details

    • getText

      public String getText()
      Returns the text of this speech message.
      Returns:
      the text of this speech message
    • setText

      public void setText(String text)
      Sets the text of this speech message.
      Parameters:
      text - the new text for this speech message
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object