[GH-ISSUE #5164] feat: Add ModelsLab text-to-speech provider #4946

Open
opened 2026-06-05 14:51:03 -04:00 by yindo · 0 comments
Owner

Originally created by @adhikjoshi on GitHub (Mar 7, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5164

Feature Request: ModelsLab TTS Provider

What is ModelsLab?

ModelsLab is an AI API platform offering text-to-speech, image generation, video generation, and more. Their TTS API is available at $0.0047 per generation with support for multiple English voice variants and multiple languages.

What would this add?

A new TTS provider option in AnythingLLM's Text-to-Speech Preferences settings, letting users use ModelsLab's API as an alternative to OpenAI, ElevenLabs, or Piper.

Why is this useful?

  • Cost-effective: $0.0047/generation — significantly cheaper than ElevenLabs
  • Multi-language support: English (US/UK/AU), Spanish, French, German, Italian, Portuguese, Polish, Hindi
  • Multiple voices: 9 built-in voice presets
  • No external dependencies: Pure API-based, no local model required

Implementation plan

Following the existing provider pattern (same as openAiGeneric, elevenLabs):

Backend:

  • server/utils/TextToSpeech/modelslab/index.js — Provider class with ttsBuffer() method + async polling
  • Update server/utils/TextToSpeech/index.js — Add modelslab case
  • Update server/utils/helpers/updateENV.js — Add env key mappings + validator
  • Update server/models/systemSettings.js — Expose settings

Frontend:

  • frontend/src/components/TextToSpeech/ModelsLabOptions/index.jsx — Settings form
  • Update frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx — Add to provider list

Env vars:

  • TTS_MODELSLAB_API_KEY (required)
  • TTS_MODELSLAB_VOICE_ID (optional)
  • TTS_MODELSLAB_LANGUAGE (optional)

API docs: https://docs.modelslab.com/text-to-speech/overview

I have a working implementation ready to submit as a PR once this issue is created (as required by CONTRIBUTING.md).

Originally created by @adhikjoshi on GitHub (Mar 7, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5164 ## Feature Request: ModelsLab TTS Provider ### What is ModelsLab? [ModelsLab](https://modelslab.com) is an AI API platform offering text-to-speech, image generation, video generation, and more. Their TTS API is available at $0.0047 per generation with support for multiple English voice variants and multiple languages. ### What would this add? A new TTS provider option in AnythingLLM's **Text-to-Speech Preferences** settings, letting users use ModelsLab's API as an alternative to OpenAI, ElevenLabs, or Piper. ### Why is this useful? - **Cost-effective:** $0.0047/generation — significantly cheaper than ElevenLabs - **Multi-language support:** English (US/UK/AU), Spanish, French, German, Italian, Portuguese, Polish, Hindi - **Multiple voices:** 9 built-in voice presets - **No external dependencies:** Pure API-based, no local model required ### Implementation plan Following the existing provider pattern (same as `openAiGeneric`, `elevenLabs`): **Backend:** - `server/utils/TextToSpeech/modelslab/index.js` — Provider class with `ttsBuffer()` method + async polling - Update `server/utils/TextToSpeech/index.js` — Add `modelslab` case - Update `server/utils/helpers/updateENV.js` — Add env key mappings + validator - Update `server/models/systemSettings.js` — Expose settings **Frontend:** - `frontend/src/components/TextToSpeech/ModelsLabOptions/index.jsx` — Settings form - Update `frontend/src/pages/GeneralSettings/AudioPreference/tts.jsx` — Add to provider list **Env vars:** - `TTS_MODELSLAB_API_KEY` (required) - `TTS_MODELSLAB_VOICE_ID` (optional) - `TTS_MODELSLAB_LANGUAGE` (optional) **API docs:** https://docs.modelslab.com/text-to-speech/overview I have a working implementation ready to submit as a PR once this issue is created (as required by CONTRIBUTING.md).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4946