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?
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?