feat: Add missing TTS models and voices#958
Merged
sashabaranov merged 3 commits intosashabaranov:masterfrom Apr 26, 2025
Merged
feat: Add missing TTS models and voices#958sashabaranov merged 3 commits intosashabaranov:masterfrom
sashabaranov merged 3 commits intosashabaranov:masterfrom
Conversation
- From docs: Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #958 +/- ##
==========================================
+ Coverage 98.46% 98.88% +0.41%
==========================================
Files 24 27 +3
Lines 1364 1786 +422
==========================================
+ Hits 1343 1766 +423
+ Misses 15 14 -1
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sashabaranov
approved these changes
Apr 26, 2025
Owner
|
Thank you! |
bububa
pushed a commit
to bububa/go-openai
that referenced
this pull request
Apr 28, 2025
* feat: Add missing TTS models and voices * feat: Add new instruction field to create speech request - From docs: Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd. * fix: add canary-tts back to SpeechModel
icowan
pushed a commit
to icowan/go-openai
that referenced
this pull request
May 8, 2025
* feat: Add missing TTS models and voices * feat: Add new instruction field to create speech request - From docs: Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd. * fix: add canary-tts back to SpeechModel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the change
This adds the new OpenAI TTS model, includes a new instructions field, and adds missing speech voices.
Provide OpenAI documentation link
https://platform.openai.com/docs/api-reference/audio
Describe your solution
TTSModelGPT4oMinitoSpeechModeltypeSpeechVoicetypeinstructionsfield to theCreateSpeechRequestobject, specific to thegpt-4o-mini-ttsmodel.Tests
No test changes were required. The
SpeechModelandSpeechVoicetypes were already defined, and theinstructionsfield is omitted when empty.