Class OpenAiTextToSpeechModel
java.lang.Object
dev.langchain4j.model.openai.OpenAiTextToSpeechModel
- All Implemented Interfaces:
TextToSpeechModel
Represents an OpenAI text-to-speech model with a speech generation interface.
The supported models are tts-1, tts-1-hd, gpt-4o-mini-tts, and gpt-4o-mini-tts-2025-12-15.
You can find a description of the parameters here.
You can find a description of the parameters here.
- Since:
- 1.18.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()provider()synthesize(TextToSpeechRequest audioRequest) Given a text-to-speech request, synthesizes speech audio.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TextToSpeechModel
synthesize
-
Constructor Details
-
OpenAiTextToSpeechModel
-
-
Method Details
-
synthesize
Description copied from interface:TextToSpeechModelGiven a text-to-speech request, synthesizes speech audio.- Specified by:
synthesizein interfaceTextToSpeechModel- Parameters:
audioRequest- The speech request containing the input text and optional parameters.- Returns:
- The generated speech response.
-
provider
- Specified by:
providerin interfaceTextToSpeechModel
-
builder
-