You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(tts): migrate OpenAI TTS to shared TextToSpeechModel interface and standardize on Double for speed
BREAKING CHANGE: OpenAI TTS now uses shared interfaces instead of provider-specific classes
- Replace deprecated OpenAI-specific classes (SpeechModel, SpeechPrompt, SpeechResponse,
StreamingSpeechModel) with shared interfaces (TextToSpeechModel, TextToSpeechPrompt,
TextToSpeechResponse, StreamingTextToSpeechModel)
- Update interface hierarchy: TextToSpeechModel now extends StreamingTextToSpeechModel
for consistency with ChatModel pattern
- Add @FunctionalInterface annotation to StreamingTextToSpeechModel
- Migrate speed property from Float to Double across all OpenAI TTS components for
consistency with ElevenLabs API and better type uniformity
- Update OpenAiAudioSpeechOptions to implement TextToSpeechOptions interface
- Add TextToSpeechModelTests with 7 comprehensive unit tests for interface behavior
- Improve null safety in TextToSpeechModel.call(String) default method
- Update documentation to reflect new interface hierarchy and Double usage
- Add migration guide to documentation for upgrading from deprecated classes
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
Copy file name to clipboardExpand all lines: auto-configurations/models/spring-ai-autoconfigure-model-openai/src/main/java/org/springframework/ai/model/openai/autoconfigure/OpenAiAudioSpeechProperties.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ public class OpenAiAudioSpeechProperties extends OpenAiParentProperties {
Copy file name to clipboardExpand all lines: models/spring-ai-elevenlabs/src/main/java/org/springframework/ai/elevenlabs/ElevenLabsTextToSpeechModel.java
0 commit comments