[PR #5044] [CLOSED] feat: Add ModelsLab TTS provider #4874

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5044
Author: @adhikjoshi
Created: 2/22/2026
Status: Closed

Base: masterHead: feat/add-modelslab-tts


📝 Commits (1)

  • fb581e2 feat: Add ModelsLab TTS provider

📊 Changes

8 files changed (+206 additions, -0 deletions)

View changed files

📝 docker/.env.example (+3 -0)
frontend/src/components/TextToSpeech/ModelsLabOptions/index.jsx (+58 -0)
📝 frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx (+8 -0)
📝 server/.env.example (+3 -0)
📝 server/models/systemSettings.js (+3 -0)
📝 server/utils/TextToSpeech/index.js (+3 -0)
server/utils/TextToSpeech/modelsLab/index.js (+115 -0)
📝 server/utils/helpers/updateENV.js (+13 -0)

📄 Description

Summary

Adds ModelsLab as a new TTS provider for AnythingLLM, following the exact same integration pattern as the existing ElevenLabs, OpenAI, and OpenAI-compatible TTS providers.

Changes

File Change
server/utils/TextToSpeech/modelsLab/index.js New ModelsLabTTS class
server/utils/TextToSpeech/index.js Add modelslab case to dispatcher
server/models/systemSettings.js Add TTSModelsLabKey/VoiceModel settings
server/utils/helpers/updateENV.js Env var handlers + provider registration
server/.env.example Add TTS_MODELSLAB_KEY, TTS_MODELSLAB_VOICE_MODEL
docker/.env.example Same env vars
frontend/src/components/TextToSpeech/ModelsLabOptions/index.jsx New settings component
frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx Add ModelsLab to provider list

Features

  • 10 voices: Bella, Antoni, Elli, Josh, Arnold, Adam, Sam, Rachel, Domi, Gigi
  • Async polling: handles status: "processing" responses (polls every 5s, up to 5 min)
  • 2,500-char limit: enforced automatically per ModelsLab API constraints
  • No new dependencies: uses existing node-fetch

Usage

TTS_PROVIDER=modelslab
TTS_MODELSLAB_KEY=your_api_key
TTS_MODELSLAB_VOICE_MODEL=Bella  # optional, defaults to Bella

Or configure via the AnythingLLM Settings > Audio Preferences UI.

About ModelsLab

ModelsLab offers affordable AI inference including TTS, image generation, and video generation via REST API. API docs: https://docs.modelslab.com/text-to-audio/realtime/tts


🔄 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/5044 **Author:** [@adhikjoshi](https://github.com/adhikjoshi) **Created:** 2/22/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/add-modelslab-tts` --- ### 📝 Commits (1) - [`fb581e2`](https://github.com/Mintplex-Labs/anything-llm/commit/fb581e2d23905a05bf84a9f23c9baf0df814e3a1) feat: Add ModelsLab TTS provider ### 📊 Changes **8 files changed** (+206 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docker/.env.example` (+3 -0) ➕ `frontend/src/components/TextToSpeech/ModelsLabOptions/index.jsx` (+58 -0) 📝 `frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx` (+8 -0) 📝 `server/.env.example` (+3 -0) 📝 `server/models/systemSettings.js` (+3 -0) 📝 `server/utils/TextToSpeech/index.js` (+3 -0) ➕ `server/utils/TextToSpeech/modelsLab/index.js` (+115 -0) 📝 `server/utils/helpers/updateENV.js` (+13 -0) </details> ### 📄 Description ## Summary Adds [ModelsLab](https://modelslab.com) as a new TTS provider for AnythingLLM, following the exact same integration pattern as the existing ElevenLabs, OpenAI, and OpenAI-compatible TTS providers. ## Changes | File | Change | |------|--------| | `server/utils/TextToSpeech/modelsLab/index.js` | New `ModelsLabTTS` class | | `server/utils/TextToSpeech/index.js` | Add `modelslab` case to dispatcher | | `server/models/systemSettings.js` | Add TTSModelsLabKey/VoiceModel settings | | `server/utils/helpers/updateENV.js` | Env var handlers + provider registration | | `server/.env.example` | Add TTS_MODELSLAB_KEY, TTS_MODELSLAB_VOICE_MODEL | | `docker/.env.example` | Same env vars | | `frontend/src/components/TextToSpeech/ModelsLabOptions/index.jsx` | New settings component | | `frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx` | Add ModelsLab to provider list | ## Features - **10 voices**: Bella, Antoni, Elli, Josh, Arnold, Adam, Sam, Rachel, Domi, Gigi - **Async polling**: handles `status: "processing"` responses (polls every 5s, up to 5 min) - **2,500-char limit**: enforced automatically per ModelsLab API constraints - **No new dependencies**: uses existing `node-fetch` ## Usage ```bash TTS_PROVIDER=modelslab TTS_MODELSLAB_KEY=your_api_key TTS_MODELSLAB_VOICE_MODEL=Bella # optional, defaults to Bella ``` Or configure via the AnythingLLM Settings > Audio Preferences UI. ## About ModelsLab [ModelsLab](https://modelslab.com) offers affordable AI inference including TTS, image generation, and video generation via REST API. API docs: https://docs.modelslab.com/text-to-audio/realtime/tts --- <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:36:42 -05:00
yindo changed title from [PR #5044] feat: Add ModelsLab TTS provider to [PR #5044] [CLOSED] feat: Add ModelsLab TTS provider 2026-06-05 15:20:49 -04:00
yindo closed this issue 2026-06-05 15:20:50 -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#4874