-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add speech endpoint #130
Add speech endpoint #130
Conversation
Thank you! 🎉 ( There's https://crates.io/crates/serde_bytes too, not sure what difference would be between
I think for Voice as enum makes sense - go for it . I usually defer to spec when it lists a filed of type string + enum. They haven't released updated spec though. I'm getting "The model |
OH they just did release spec 11 mins ago :D |
Not sure what the difference is either, but Will add the enum in a sec. Model releases in 1h (supposedly) so not available yet lmeow |
Aha here, https://openai.com/blog/new-models-and-developer-products-announced-at-devday
30mins to go 🕐 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. will target releasing this in v0.16.0 with other new APIs
* Add speech endpoint * Add voice parameter and example * Add voice enum
post_raw
andexecute_raw
internal functions, since we don't want to JSON-decode the response body for the speech endpoints (which return raw audio). Modified theexecute
function to wrap aroundexecute_raw
.Note that the struct corresponding to the
response_format
parameter was namedSpeechResponseFormat
instead ofAudioResponseFormat
, since the later already existed for defining whisper response formats.I'd love to add an enum for voices as well (with an Other wildcard and marked as non-exhaustive), but refrained since the library's pattern seems to be deferring to strings (same case as model IDs all across).