[PR #2487] [MERGED] Tts open ai compatible endpoints #4006

Closed
opened 2026-02-22 18:34:56 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/2487
Author: @timothycarambat
Created: 10/16/2024
Status: Merged
Merged: 10/16/2024
Merged by: @timothycarambat

Base: masterHead: tts-openAI-compatible-endpoints


📝 Commits (6)

  • bdf3fb8 Update OpenAI TTS config to allow a custom BaseURL
  • 8799f38 uncheck config file
  • eb948ae break openai generic TTS into its own provider
  • da2dc3a add space
  • 7ada0b3 hide TTS on user msg
  • 633460f Merge branch 'master' into tts-openAI-compatible-endpoints

📊 Changes

11 files changed (+172 additions, -5 deletions)

View changed files

📝 docker/.env.example (+5 -0)
frontend/src/components/TextToSpeech/OpenAiGenericOptions/index.jsx (+69 -0)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/index.jsx (+1 -0)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx (+7 -5)
frontend/src/media/ttsproviders/generic-openai.png (+0 -0)
📝 frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx (+11 -0)
📝 server/.env.example (+5 -0)
📝 server/models/systemSettings.js (+6 -0)
📝 server/utils/TextToSpeech/index.js (+3 -0)
server/utils/TextToSpeech/openAiGeneric/index.js (+50 -0)
📝 server/utils/helpers/updateENV.js (+15 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #xxx

What is in this change?

This adds an input field for a custom BaseURL for the OpenAI TTS endpoint when selecting OpenAI as a TTS provider.

Since OpenAI has become an industry standard many tools have taken to mirroring their API for ease of integration.

With this change it allows for a much richer choice of options to use as a TTS provider.

I tested it using AllTalk_TTS's OpenAI speech endpoint and it works wonderfully.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes

  • [ x] Relevant documentation has been updated
    couldn't find any relevant docs, but it is notated in the env comments

  • [ x] I have tested my code functionality

  • [ x] Docker build succeeds locally
    In order to debug this, I needed to get the frontend/server/collector all working since the docker takes a VERY long time on the production-build 3/3 chown step. There has got to be a way to speed that up. Also, when running the servers independently, it doesn't save the config in any .env file so with every restart I had to set it up again, don't know what I missed there. I was also running it under WSL ubuntu, so that was it's own pita, my dev machine is a MBP, but only my PC can run the models :/

Original PR by @phazei


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/2487 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 10/16/2024 **Status:** ✅ Merged **Merged:** 10/16/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `tts-openAI-compatible-endpoints` --- ### 📝 Commits (6) - [`bdf3fb8`](https://github.com/Mintplex-Labs/anything-llm/commit/bdf3fb82ec0291ecb2c7a02cb8f6a220889060f2) Update OpenAI TTS config to allow a custom BaseURL - [`8799f38`](https://github.com/Mintplex-Labs/anything-llm/commit/8799f389ede0979b9e764a0f54ef14d43cfa36ae) uncheck config file - [`eb948ae`](https://github.com/Mintplex-Labs/anything-llm/commit/eb948ae1c7c6961143783557f5361dd7ca3b46cf) break openai generic TTS into its own provider - [`da2dc3a`](https://github.com/Mintplex-Labs/anything-llm/commit/da2dc3af94fcdfae7aca6539a819275bfb5d325d) add space - [`7ada0b3`](https://github.com/Mintplex-Labs/anything-llm/commit/7ada0b3a70c1e08deb14180f62773e6d99766490) hide TTS on user msg - [`633460f`](https://github.com/Mintplex-Labs/anything-llm/commit/633460f78daf181142e98b16cba895d04fc3a50b) Merge branch 'master' into tts-openAI-compatible-endpoints ### 📊 Changes **11 files changed** (+172 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docker/.env.example` (+5 -0) ➕ `frontend/src/components/TextToSpeech/OpenAiGenericOptions/index.jsx` (+69 -0) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/index.jsx` (+1 -0) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx` (+7 -5) ➕ `frontend/src/media/ttsproviders/generic-openai.png` (+0 -0) 📝 `frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx` (+11 -0) 📝 `server/.env.example` (+5 -0) 📝 `server/models/systemSettings.js` (+6 -0) 📝 `server/utils/TextToSpeech/index.js` (+3 -0) ➕ `server/utils/TextToSpeech/openAiGeneric/index.js` (+50 -0) 📝 `server/utils/helpers/updateENV.js` (+15 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues resolves #xxx ### What is in this change? This adds an input field for a custom BaseURL for the OpenAI TTS endpoint when selecting OpenAI as a TTS provider. Since OpenAI has become an industry standard many tools have taken to mirroring their API for ease of integration. With this change it allows for a much richer choice of options to use as a TTS provider. I tested it using [AllTalk_TTS's OpenAI speech endpoint](https://github.com/erew123/alltalk_tts/wiki/API-%E2%80%90-OpenAI-V1-Speech-Compatible-Endpoint) and it works wonderfully. ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] I ran `yarn lint` from the root of the repo & committed changes - [ x] Relevant documentation has been updated couldn't find any relevant docs, but it is notated in the env comments - [ x] I have tested my code functionality - [ x] Docker build succeeds locally In order to debug this, I needed to get the frontend/server/collector all working since the docker takes a VERY long time on the production-build 3/3 chown step. There has got to be a way to speed that up. Also, when running the servers independently, it doesn't save the config in any .env file so with every restart I had to set it up again, don't know what I missed there. I was also running it under WSL ubuntu, so that was it's own pita, my dev machine is a MBP, but only my PC can run the models :/ Original PR by @phazei --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:56 -05:00
yindo closed this issue 2026-02-22 18:34:57 -05:00
yindo changed title from [PR #2487] Tts open ai compatible endpoints to [PR #2487] [MERGED] Tts open ai compatible endpoints 2026-06-05 15:16:20 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4006