Skip to content

/v1/audio/voices returns plain strings instead of {id, name} objects #462

Closed

Description

@QuantFoundry

Bug

The /v1/audio/voices endpoint returns voices as a list of plain strings:

{"voices": ["af_alloy", "af_nova", ...]}

However, OpenAI-compatible clients (including Open WebUI) expect each voice to be an object with id and name fields:

{"voices": [{"id": "af_alloy", "name": "af_alloy"}, ...]}

This causes Open WebUI to silently fall back to its hardcoded list of 6 voices (alloy, echo, fable, nova, onyx, shimmer) instead of displaying all available Kokoro voices.

Steps to reproduce

  1. Configure Open WebUI to use kokoro-fastapi as the OpenAI-compatible TTS backend
  2. Open Admin > Settings > Audio and check the voice dropdown
  3. Only 6 hardcoded voices appear instead of all available Kokoro voices

Expected behavior

All available Kokoro voices appear in the Open WebUI voice dropdown.

Fix

In api/src/routers/openai_compatible.py, change the list_voices return value from:

return {"voices": voices}

to:

return {"voices": [{"id": v, "name": v} for v in voices]}

Environment

  • Image: ghcr.io/remsky/kokoro-fastapi-cpu:latest
  • Open WebUI: ghcr.io/open-webui/open-webui:main

Activity

  1. remsky commented on May 22, 2026

    @remsky
    Owner

    Should be updated in master, and on the next release. Let me know if not resolved and can reopen!

  2. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions