Expand description
Generates audio from the input text.
Endpoint: POST /audio/speech (JSON request / binary response). The
response body is the raw audio bytes in the requested format.
Streaming audio is supported through the optional stream_format
parameter: when set, send the request via
PostBinary::get_stream_response_bytes
to receive the response as a stream of raw byte chunks (for
stream_format = "sse" the server-sent-event frames are carried inside
those bytes; parsing them is left to the caller).
![warn] This module is untested! No OpenAI-compatible provider accessible to this project implements this endpoint, and no OpenAI API key was available for testing. If you encounter any issues, please report them on the repository.
Structs§
- Speech
Request - Generates audio from the input text.
Enums§
- Speech
Format - The format of the generated audio.
- Speech
Stream Format - The format to stream generated audio in.
- Speech
Voice - The voice to use when generating audio.