feat(audio): list available TTS voices - #11607
Open
localai-org-maint-bot wants to merge 1 commit into
Open
Conversation
Clients cannot discover the named voices that an installed TTS model accepts without consulting backend-specific documentation. Expose voice metadata through the audio API and let custom model configs declare their own catalog. Assisted-by: Codex:gpt-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
GET /v1/audio/voicesand/audio/voicesso clients can discover named voices for installed TTS models. The optionalmodelquery filters the response. The endpoint respects per-user model allowlists and resolves aliases.Model configs can declare
tts.voicesentries with name, language, and gender metadata. Pocket TTS receives a built-in catalog, including pinned backend variants. The change also updates route discovery, API instructions, Swagger, authorization, configuration metadata, tests, and TTS documentation.Closes #11604
Verification
go test ./core/config -ginkgo.focus='TTSVoicesForModel'go test ./core/http/endpoints/localai -ginkgo.focus='TTSVoicesEndpoint'go test ./core/config/meta ./core/http/authgo test ./core/http/routes -run '^$'jq -e '.paths["/v1/audio/voices"].get.responses["200"]' swagger/swagger.jsongit diff --checkThe full routes suite was not run because one existing spec requires a rootless Docker/Postgres provider that is unavailable in this worktree.
Notes for Reviewers
The endpoint returns only models with known voice metadata when unfiltered. A filtered installed model without metadata returns an empty
voiceslist.Signed commits