Skip to content
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

Implements response_format to the /v1/audio/speech endpoint #2732

Closed
SuperPat45 opened this issue Jul 5, 2024 · 0 comments · Fixed by #4035
Closed

Implements response_format to the /v1/audio/speech endpoint #2732

SuperPat45 opened this issue Jul 5, 2024 · 0 comments · Fixed by #4035
Labels
enhancement New feature or request

Comments

@SuperPat45
Copy link

SuperPat45 commented Jul 5, 2024

The LocalAI /v1/audio/speech endpoint return a wav audio file.

OpenAI supports all these formats: mp3 (which is the default), opus, aac, flac, wav, and pcm.
To set the desired format, OpenAI has a response_format request parameter for /v1/audio/speech:
https://platform.openai.com/docs/api-reference/audio/createSpeech

mp3 and opus formats are smaller files and better for website than wav.
So, when ffmpeg is available, could LocalAI add supports for the response_format parameter to convert automatically, the generated wav audio file, to the desired format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant