Skip to content

Conversation

@apappascs
Copy link
Contributor

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

Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:

  • Add a Signed-off-by line to each commit (git commit -s) per the DCO
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

For more details, please check the contributor guide.
Thank you upfront!

…ce 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>
@apappascs
Copy link
Contributor Author

@ericbottard @markpollack
this commit is the follow up after the updates on OpenAI transcribe and TTS models and Implement ElevenLabs Text-to-Speech which added the shared interfaces and deprecate the audio speach classes that where placed inside the openai package as the only provider at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant