Bug: The TTS API request model is fixed as "tts-1" and does not follow the settings. #1174

Closed
opened 2025-11-11 14:39:23 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @karllee830 on GitHub (Jun 8, 2024).

Bug Report

Description

Bug Summary:
This bug will not occur in version 0.2.5.
The TTS API request is fixed as "tts-1" and does not follow the settings.

Steps to Reproduce:
Set the TTS voice to a non-standard openai voice in the admin panel. In my case, I used OneAPI to convert Azure's TTS to the format of OpenAI's API. I set the voice to zh-CN-XiaoxiaoMultilingualNeural and the model to tts-az-1, then clicked the "Read Aloud" button, which resulted in a pop-up error message.

Based on my examination of the browser logs, despite setting the TTS model to "tts-az-1," the request still indicates "tts-1.“

Expected Behavior:
Properly read out text using the tts api.

Actual Behavior:
The request to fix the model as "tts-1" is causing the tts API to not be called correctly.

Environment

  • Open WebUI Version: v0.3.0.dev1
  • Operating System: Unraid 6.12.6
  • Browser (if applicable): Chrome 125.0.6422.142

Reproduction Details

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.

Logs and Screenshots

Browser Console Logs:
image

image

Docker Container Logs:

INFO:     127.0.0.1:51954 - "GET /health HTTP/1.1" 200 OK
ERROR:apps.audio.main:400 Client Error: Bad Request for url: https://**********/v1/audio/speech
Traceback (most recent call last):
  File "/app/backend/apps/audio/main.py", line 211, in speech
    r.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://**********/v1/audio/speech
INFO:     2**.***.***.**:0 - "POST /audio/api/v1/speech HTTP/1.1" 400 Bad Request

Screenshots (if applicable):
1717843297523

Installation Method

Docker

Additional Information

image

After manually changing the value of 'model' to 'tts-az-1' in line 101 of src\lib\apis\audio\index.ts, the tts API call resumed normal operation. The browser log after modifying the file is as follows:
image

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 @karllee830 on GitHub (Jun 8, 2024). # Bug Report ## Description **Bug Summary:** **This bug will not occur in version 0.2.5.** The TTS API request is fixed as "tts-1" and does not follow the settings. **Steps to Reproduce:** Set the TTS voice to a non-standard openai voice in the admin panel. In my case, I used [OneAPI](https://github.com/songquanpeng/one-api) to convert Azure's TTS to the format of OpenAI's API. I set the voice to zh-CN-XiaoxiaoMultilingualNeural and the model to tts-az-1, then clicked the "Read Aloud" button, which resulted in a pop-up error message. **Based on my examination of the browser logs, despite setting the TTS model to "tts-az-1," the request still indicates "tts-1.“** **Expected Behavior:** Properly read out text using the tts api. **Actual Behavior:** The request to fix the model as "tts-1" is causing the tts API to not be called correctly. ## Environment - **Open WebUI Version:** v0.3.0.dev1 - **Operating System:** Unraid 6.12.6 - **Browser (if applicable):** Chrome 125.0.6422.142 ## Reproduction Details **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. ## Logs and Screenshots **Browser Console Logs:** ![image](https://github.com/open-webui/open-webui/assets/61072264/afbe50c5-76c5-4c50-9cae-cf3833aaf7d5) ![image](https://github.com/open-webui/open-webui/assets/61072264/f787b176-5f5c-4d1f-9845-6be76278ebe2) **Docker Container Logs:** ``` INFO: 127.0.0.1:51954 - "GET /health HTTP/1.1" 200 OK ERROR:apps.audio.main:400 Client Error: Bad Request for url: https://**********/v1/audio/speech Traceback (most recent call last): File "/app/backend/apps/audio/main.py", line 211, in speech r.raise_for_status() File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://**********/v1/audio/speech INFO: 2**.***.***.**:0 - "POST /audio/api/v1/speech HTTP/1.1" 400 Bad Request ``` **Screenshots (if applicable):** ![1717843297523](https://github.com/open-webui/open-webui/assets/61072264/a335647a-fa7d-4cb7-9768-9e73402848f4) ## Installation Method Docker ## Additional Information ![image](https://github.com/open-webui/open-webui/assets/61072264/b71cc920-0bd1-4d16-947f-e5dfc70da0b5) After manually changing the value of 'model' to 'tts-az-1' in line 101 of src\lib\apis\audio\index.ts, the tts API call resumed normal operation. The browser log after modifying the file is as follows: ![image](https://github.com/open-webui/open-webui/assets/61072264/342a07b4-c42c-4ebd-a6c9-8920f612766f) ## 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 (Jun 8, 2024):

Fixed on dev, Let me know if the issue persists!

@tjbck commented on GitHub (Jun 8, 2024): Fixed on dev, Let me know if the issue persists!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1174