Text to Speech Generation Error get_available_voices() missing 1 required positional argument: 'request' #3110

Closed
opened 2025-11-11 15:22:51 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @godsey on GitHub (Dec 26, 2024).

Bug Report

Important Notes

  • Before submitting a bug report: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.

  • Collaborate respectfully: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.

  • Contributing: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.

  • Bug reproducibility: If a bug cannot be reproduced with a :main or :dev Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!

Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!


Installation Method

[Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.]
I use docker ghcr.io/open-webui/open-webui:dev

Environment

  • Open WebUI Version: 0.5.1

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

ElvenLabs TTS to work

Actual Behavior:

ElvenLabs TTS failed

Description

Bug Summary:
elif request.app.state.config.TTS_ENGINE == "elevenlabs":
voice_id = payload.get("voice", "")

    if voice_id not in get_available_voices():
        raise HTTPException(
            status_code=400,
            detail="Invalid voice id",
        )

should be:

elif request.app.state.config.TTS_ENGINE == "elevenlabs":
    voice_id = payload.get("voice", "")

    if voice_id not in get_available_voices(request):
        raise HTTPException(
            status_code=400,
            detail="Invalid voice id",
        )

Reproduction Details

Steps to Reproduce:

Configure ElvenLabs TTS

Logs and Screenshots

Browser Console Logs:
n/a

Docker Container Logs:
n/a

Screenshots/Screen Recordings (if applicable):
n/a

Additional Information

I created a branch, I'll submit PR after creating this issue.

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @godsey on GitHub (Dec 26, 2024). # Bug Report ## Important Notes - **Before submitting a bug report**: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project. - **Collaborate respectfully**: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours. - **Contributing**: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI. - **Bug reproducibility**: If a bug cannot be reproduced with a `:main` or `:dev` Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help! Note: Please remove the notes above when submitting your post. Thank you for your understanding and support! --- ## Installation Method [Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.] I use docker ghcr.io/open-webui/open-webui:dev ## Environment - **Open WebUI Version:** 0.5.1 **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: ElvenLabs TTS to work ## Actual Behavior: ElvenLabs TTS failed ## Description **Bug Summary:** elif request.app.state.config.TTS_ENGINE == "elevenlabs": voice_id = payload.get("voice", "") if voice_id not in get_available_voices(): raise HTTPException( status_code=400, detail="Invalid voice id", ) should be: elif request.app.state.config.TTS_ENGINE == "elevenlabs": voice_id = payload.get("voice", "") if voice_id not in get_available_voices(request): raise HTTPException( status_code=400, detail="Invalid voice id", ) ## Reproduction Details **Steps to Reproduce:** Configure ElvenLabs TTS ## Logs and Screenshots **Browser Console Logs:** n/a **Docker Container Logs:** n/a **Screenshots/Screen Recordings (if applicable):** n/a ## Additional Information I created a branch, I'll submit PR after creating this issue. ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@tjbck commented on GitHub (Dec 26, 2024):

Good catch, fixed on dev!

@tjbck commented on GitHub (Dec 26, 2024): Good catch, fixed on dev!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3110