You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOCS] Document the Audio API (POST /v1/audio/speech) and rust-sdk create_speech client #613
The rust-sdk now exposes the Audio API: POST /audio/speech is available on the SDK as InferenceGatewayAPI::create_speech(provider: Option<Provider>, request: CreateSpeechRequest) -> Result<Vec<u8>, GatewayError> (implemented in inference-gateway/rust-sdk#133, types sync from schemas v0.25.0).
The gateway docs do not yet describe the Audio endpoint from a client perspective: what the request body supports (model, input up to 4096 chars, voice, response_format mp3/opus/aac/flac/wav/pcm, speed, reference_audio for voice cloning), that the server must have ENABLE_AUDIO enabled, and that only providers with speech support can serve it (others return 400 with "The Audio API is not supported by this provider yet.").
Acceptance Criteria
The Audio API endpoint (POST /v1/audio/speech) is documented alongside the other provider APIs, noting the ENABLE_AUDIO server flag and provider support caveat
The CreateSpeechRequest body fields and defaults (response_format mp3, speed 1.0) are described
Most of this issue was already shipped. The real gap was the rust-sdk client, so that is what I wrote.
Gather context
Audio API endpoint documented + ENABLE_AUDIO flag + provider caveat - already present (api-reference.md "Audio API", configuration.md)
CreateSpeechRequest fields and defaults - already present for the REST body and the Go SDK
rust-sdk create_speech example linked to rust-sdk#133 - added
Validate (lint:md, format:check, build)
Commit + open PR + move to QA on the roadmap board
What changed
sdks.md - new Speech synthesis section in the Rust chapter, mirroring the existing Go one:
create_speech(Option<Provider>, CreateSpeechRequest) -> Result<Vec<u8>, GatewayError>, noting None lets the gateway route from the model prefix.
The double gate: ENABLE_AUDIO=true (else 404) and speech-capable providers only (else GatewayError::BadRequest("The Audio API is not supported by this provider yet.")).
Field table with defaults (response_format: Mp3, speed: 1.0), plus the two things that bite in Rust specifically: input is a validating CreateSpeechRequestInput newtype built with .parse() (4096-char cap enforced), and reference_audio is pre-encoded base64 Option<String>, not raw bytes like Go's *[]byte.
Voice-cloning example against llama.cpp, and a link to rust-sdk#133.
api-reference.md - one cross-link from the Audio API section to CreateSpeech (Go) and create_speech (Rust).
Also corrected the stale rust-sdk version in sdks.md: 0.13.4 -> 0.23.0 (current Cargo.toml).
Notes
Signatures, field types, defaults and the Default impl were read from rust-sdk@main (src/lib.rs, src/generated/schemas.rs, src/tests.rs), not guessed.
There is no examples/speech in rust-sdk yet, so the section links the PR rather than a runnable example. Worth adding upstream alongside examples/images.
#speech-synthesis-1 anchor verified against the built HTML.
| Branch | PR #619
Activity
edenreich commentedon Aug 31, 2026
@claude Can you work on this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Aug 31, 2026
Claude finished @edenreich's task in 3m 11s —— View job •
docs/issue-613-20260831-1238• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-613-20260831-1238?quick_pull=1&title=Issue%20%23613%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23613%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Done - PR #619
Most of this issue was already shipped. The real gap was the rust-sdk client, so that is what I wrote.
ENABLE_AUDIOflag + provider caveat - already present (api-reference.md"Audio API",configuration.md)CreateSpeechRequestfields and defaults - already present for the REST body and the Go SDKcreate_speechexample linked to rust-sdk#133 - addedlint:md,format:check,build)What changed
sdks.md- new Speech synthesis section in the Rust chapter, mirroring the existing Go one:create_speech(Option<Provider>, CreateSpeechRequest) -> Result<Vec<u8>, GatewayError>, notingNonelets the gateway route from the model prefix.ENABLE_AUDIO=true(else404) and speech-capable providers only (elseGatewayError::BadRequest("The Audio API is not supported by this provider yet.")).response_format: Mp3,speed: 1.0), plus the two things that bite in Rust specifically:inputis a validatingCreateSpeechRequestInputnewtype built with.parse()(4096-char cap enforced), andreference_audiois pre-encoded base64Option<String>, not raw bytes like Go's*[]byte.api-reference.md- one cross-link from the Audio API section toCreateSpeech(Go) andcreate_speech(Rust).Also corrected the stale rust-sdk version in
sdks.md:0.13.4->0.23.0(currentCargo.toml).Notes
Defaultimpl were read fromrust-sdk@main(src/lib.rs,src/generated/schemas.rs,src/tests.rs), not guessed.examples/speechin rust-sdk yet, so the section links the PR rather than a runnable example. Worth adding upstream alongsideexamples/images.#speech-synthesis-1anchor verified against the built HTML.| Branch | PR #619
inference-gateway-releaser commentedon Sep 22, 2026
🎉 This issue has been resolved in version 0.9.14 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀