Routing

Language-Based Routing

Overview

(Beta)

slng.ai supports Language-Based Routing, enabling developers to send requests in any supported language and automatically receive the best quality output available — without needing to choose a model manually.

Behind the scenes, we maintain a growing library of general-purpose and language-specialized TTS and STT models. Our routing engine selects the most capable model for the given language, accent, or dialect — ensuring natural output and high accuracy regardless of input type.

Key Features

  • Automatic Language Matching
  • Dialect-Specific Support
  • Specialized Models for High-Volume Languages
  • Fallbacks for Rare Languages
  • Works Across TTS and STT

How It Works

When you send a request with a language parameter (e.g. fr-FR, ar-SA, es-MX), slng.ai will:

  1. Match your input to available models with native or fine-tuned support for that language.
  2. Prioritize specialized models where available for higher output quality.
  3. Fall back to general multilingual models if needed.
  4. Automatically apply the best model for your target region, quality, and cost preferences.

Example Request

Code(json)
POST /tts Content-Type: application/json { "text": "Bonjour, bienvenue sur notre site.", "language": "fr-FR" }

Sample cURL

Code(bash)
curl -X POST https://api.slng.ai/tts \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "مرحبا بكم في منصتنا", "language": "ar-SA" }'

Request Parameters (Language Routing)

FieldTypeDescription
languagestringLanguage code (e.g., en-US, fr-FR, ar-SA, es-419)

slng.ai supports full BCP-47 tags, including regional variants.


Model Selection Strategy

  1. Exact match to fine-tuned or specialized model
  2. Fallback to general multilingual model
  3. Adjust pronunciation or tone by dialect when available
  4. Evaluate model quality scores for the chosen language

Benefits

  • 🌍 Global Language Support: Dozens of languages and dialects supported
  • 🧠 Smarter Defaults: No need to research which model supports your language
  • 🔊 Higher Naturalness: Specialized models sound more authentic
  • 🔄 Seamless Switching: STT and TTS models matched automatically per request

Limitations (Beta)

  • Some dialects may fall back to general language models
  • Quality can vary based on available training data for rare languages
  • Language-based quality scoring is evolving with feedback

Coming Soon

  • Dashboard-level language usage analytics
  • Custom default models per language (enterprise tier)
  • Community feedback voting on model quality by language


Last updated: June 2025

Last modified on