Integrate Our Text-to-Speech API into Your LMS Platform

By LmsVoice Audit editorial team · Updated 2026-11-18

This guide helps online course teams integrate our text-to-speech API into their LMS with minimal friction. You will find concrete code examples for cURL and the OpenAI SDK, along with clear specifications for voices, formats, and rate limits. Use this page to evaluate our API as a cost-effective alternative to your current provider, ensuring you can standardize audio generation across your platform without vendor lock-in.

We provide transparent, code-ready documentation so you can test integration quickly. The API supports 8 voice presets across 23 languages, with pricing based strictly on character count. Whether you are switching providers or building a new feature, this reference covers the essential details for reliable, scalable audio synthesis in your educational workflows.

Integrate Our Text-to-Speech API into Your LMS Platform

Frequently asked questions

What is the exact endpoint URL for the API?

The endpoint is POST https://api.dca365thai.com/v1/audio/speech. It accepts a JSON body with parameters like model, input, voice, response_format, and speed. You can use the official OpenAI SDKs by changing the base_url to https://api.dca365thai.com/v1. This ensures compatibility with standard integration patterns used in most modern applications.

Do I need to install a specific SDK package?

No, you do not need a proprietary SDK. The API works with the official OpenAI SDKs by simply changing the base_url to https://api.dca365thai.com/v1. This flexibility allows you to integrate the TTS service into your existing LMS infrastructure without installing new dependencies.

How do I pass the API key in the request?

Pass your API key in the Authorization header as a Bearer token. The format is: Authorization: Bearer tts-... Your key is generated when you sign up on the /get-api-key/ page. Ensure you include this header in every request to authenticate your account and track your usage against your balance.

Can I use the same key for multiple projects?

Yes, you can use the same key for multiple projects. Each account has one active key that can be issued at any time. If you issue a new key, the old one stops immediately. This allows you to rotate keys for security without managing multiple credentials for different LMS modules.

What happens if I send a request with no input text?

The API expects an 'input' field containing your text. If the input is missing or invalid, the request will likely fail. Failed requests are free, so you will not be charged for characters if synthesis fails. Ensure your input field contains valid text up to 4096 characters to generate audio successfully.

Does the API support streaming audio chunks?

No, the API does not support streaming or WebSocket connections. You send a text request and receive the complete audio file in the response. For longer texts, you must split them into parts of up to 4096 characters and join the resulting audio files manually in your LMS workflow.

How do I handle voice selection in the JSON body?

Include the 'voice' field in your JSON body with one of the eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. You can list available voices by sending a GET request to /v1/voices. Each voice has a distinct tone, from warm narration to energetic promo styles.

Is there a limit to the number of voices I can use?

There is no limit to the number of voices you can use. You can switch between any of the eight available voices (aria, nova, luna, sage, felix, milo, atlas, orion) in different requests. Each voice can speak any of the 23 supported languages, giving you full flexibility for your course content.

Can I specify a language for a specific voice?

Yes, specify the 'language' field with an ISO code. If omitted, the system guesses from the script, defaulting to English for Latin text. Always set this parameter for non-English Latin text to ensure accuracy. We support 23 languages: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish.

What is the maximum speed multiplier allowed?

The maximum speed multiplier is 4.0. You can adjust the 'speed' parameter between 0.25 and 4.0. This allows you to speed up narration for quick reviews or slow it down for detailed explanations.

Do I need to pay for each format separately?

No, you do not pay extra for different formats. The price is $10 per 1 million characters, regardless of whether you choose mp3, wav, opus, flac, or pcm. The format is specified in the 'response_format' field. This simplifies cost estimation for your LMS audio generation pipeline.

How do I know if a request was successful?

A successful request returns the audio file in the response body. If synthesis fails, the request is free, and you receive an error status. You can check the response status code and headers to determine success. Failed requests do not deduct from your balance, ensuring you only pay for generated audio.

Can I mix voices in a single audio file?

No, each request generates audio for a single voice. To mix voices, you must make separate requests for each voice segment and then join the audio files in your LMS. There is no native support for mixing multiple voices in a single API call or response file.

Is the API key sensitive and should I hide it?

Yes, the API key is sensitive and should be kept secure. It provides access to your account and balance. You can issue a new key at any time, which invalidates the old one immediately. Use environment variables or secure storage in your LMS to protect your key from unauthorized access.

First request

curl

curl https://api.dca365thai.com/v1/audio/speech \
  -H "Authorization: Bearer $TTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"tts-1","voice":"aria","input":"Hello from the API.","response_format":"mp3"}' \
  --output hello.mp3

Python (openai)

from openai import OpenAI

client = OpenAI(base_url="https://api.dca365thai.com/v1", api_key="tts-...")

with client.audio.speech.with_streaming_response.create(
    model="tts-1", voice="nova", input="Hello from Python.", response_format="mp3"
) as response:
    response.stream_to_file("hello.mp3")

Node.js (openai)

import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({ baseURL: "https://api.dca365thai.com/v1", apiKey: process.env.TTS_API_KEY });
const res = await client.audio.speech.create({ model: "tts-1", voice: "milo", input: "Hello from Node.js." });
fs.writeFileSync("hello.mp3", Buffer.from(await res.arrayBuffer()));
voice
ariafemale
novafemale
lunafemale
sagefemale
felixmale
milomale
atlasmale
orionmale
language
arالعربية
zh中文
daDansk
nlNederlands
enEnglish
fiSuomi
frFrançais
deDeutsch
elΕλληνικά
heעברית
hiहिन्दी
itItaliano
ja日本語
ko한국어
msBahasa Melayu
noNorsk
plPolski
ptPortuguês
ruРусский
esEspañol
swKiswahili
svSvenska
trTürkçe

Get Your API Key

Sound wave illustration for: Get Your API Key

Access your API key directly from the /get-api-key/ dashboard. Sign up instantly using your Google account or create a standard email and password account. Once registered, the page displays your active key, current balance, and usage statistics alongside a ready-to-use cURL example.

This key authenticates all requests to the TTS endpoint. You can manage your key settings at any time to ensure secure access for your LMS integration projects.

Google or email sign-up

Create an account by clicking the sign-up button on the dashboard. You can choose to authenticate via Google for quick setup or use a traditional email and password combination. Each account is tied to this specific site, dca365thai.com.

Google sign-ups include a $0.50 free trial valid for 7 days. Email-only accounts start without trial credit. No credit card is required to begin.

  • Instant access via Google OAuth
  • Standard email/password registration available
  • Per-site account isolation

One active key per account

Each account maintains exactly one active API key at any given time. This key is used in the Authorization: Bearer header for all API requests.

If you suspect a key has been compromised or simply want to refresh your credentials, you can generate a new key immediately.

  • Single active key per account
  • Used in Bearer token header
  • No concurrent key management

Revoke and generate new keys

Generating a new key instantly invalidates the previous one. There is no overlap period, so ensure your LMS or integration scripts are updated immediately after generation.

This feature allows for quick security rotations without needing to contact support. Use this whenever you move keys between development and production environments.

  • Instant revocation of old key
  • No overlap period
  • Immediate update required in scripts

First Request with cURL

Sound wave illustration for: First Request with cURL

Send a POST request to https://api.dca365thai.com/v1/audio/speech with your Bearer token. The API accepts JSON input and returns audio directly, making it easy to integrate with your LMS workflow.

Basic JSON structure

Construct a JSON object containing the model, input text, voice, and response format. The structure mirrors the OpenAI speech endpoint, allowing you to use familiar tools with a simple base_url change.

Required fields

You must provide a model ("tts-1" or "tts-1-hd"), the input text (up to 4096 characters), a voice preset, and the desired response format (mp3, wav, opus, flac, or pcm). The speed and language fields are optional.

Response format

On success, the response contains the audio file in the requested format. Failed requests are free.

First Request with cURL

Using OpenAI SDKs

Sound wave illustration for: Using OpenAI SDKs

Leverage the familiar OpenAI SDKs to integrate our TTS API into your LMS with minimal code changes. By simply adjusting the base_url, your existing Python or Node.js clients can route requests directly to our endpoint without rewriting core logic.

Modify base_url

Point your SDK client to https://api.dca365thai.com/v1 instead of the default OpenAI address. This single configuration change redirects all speech endpoint calls to our infrastructure while preserving the standard request shape.

Use official SDKs

We support the official OpenAI SDKs. Since our API mirrors the standard speech endpoint structure, you can use familiar methods like client.audio.speech.create() without custom wrappers.

Authentication headers

Pass your unique API key in the Authorization header as Bearer tts-<your_key>. This standard header ensures secure access to your account’s character balance and voice presets.

Available Voices

Sound wave illustration for: Available Voices

The API provides eight distinct voice presets, each based on licensed recordings from LibriTTS-R and LibriVox. These voices are designed to provide clear, consistent audio for your online course materials, ensuring your learners receive high-quality narration without variability between lessons.

Female presets

Four female voices offer varied tones for different content types. Aria serves as a warm, clear narrator suitable for standard lessons. Nova provides a bright, upbeat tone for engaging introductions. Luna delivers a soft, storytelling voice for narrative-driven courses, while Sage offers a calm, instructional style for complex topics.

  • Aria: warm, clear narrator
  • Nova: bright, upbeat
  • Luna: soft, storytelling
  • Sage: calm, instructional

Male presets

Four male voices cover additional use cases. Felix brings an energetic, promo-style tone ideal for marketing modules. Milo provides a friendly, conversational voice for interactive content. Atlas delivers a neutral, news-style delivery for factual information, and Orion offers a deep, documentary tone for serious educational content.

  • Felix: energetic, promo
  • Milo: friendly, conversational
  • Atlas: neutral, news
  • Orion: deep, documentary

Voice characteristics

All eight voices can speak any of the 23 supported languages. You can control the speaking speed between 0.25x and 4.0x. Each generated audio file includes an inaudible watermark to mark it as synthetic speech. The voices are based on licensed recordings: LibriTTS-R (CC BY 4.0), from LibriVox public-domain audiobook readings.

Audio Formats

Sound wave illustration for: Audio Formats

Select the audio format that best fits your LMS player and bandwidth constraints. Each format balances file size, compatibility, and quality differently, allowing you to optimize delivery for various devices and network conditions without compromising on the synthetic speech clarity.

MP3 for web

MP3 is the standard choice for web playback, offering broad compatibility across all modern browsers and LMS players. It provides a good balance between file size and audio quality, making it ideal for standard course narration where bandwidth efficiency matters.

WAV and FLAC for quality

Use WAV for uncompressed, lossless audio when you need exact fidelity, such as for archival purposes or high-end e-learning modules. FLAC offers lossless compression, reducing file size significantly while preserving the full audio quality, suitable for users with ample storage but strict quality requirements.

Opus and PCM options

Opus provides high-quality audio at lower bitrates, resulting in smaller files for faster downloads. PCM is an uncompressed raw audio format, useful for direct processing or integration with systems that handle raw audio streams, though it results in larger file sizes.

Audio Formats

Rate Limits

Sound wave illustration for: Rate Limits

The API enforces a limit of 60 requests per minute per key. This cap applies to all synthesis attempts, regardless of text length or voice selected. Teams generating large course libraries should monitor their usage to avoid hitting this threshold during peak production hours.

60 requests per minute

Each key allows a maximum of 60 simultaneous or sequential requests within a one-minute window. If you exceed this limit, the API returns an error. Plan your generation scripts to respect this ceiling to ensure consistent delivery for your LMS audio assets.

  • Limit applies per API key
  • Resets every 60 seconds
  • Counts all request types

10 requests before top-up

New accounts start with a reduced limit of 10 requests per minute. This lower tier applies until you complete your first top-up via USDT (TRC-20). Once the transfer is confirmed, your quota increases to the full 60 requests per minute immediately.

  • Initial limit: 10 req/min
  • Requires USDT top-up
  • Instant upgrade after confirmation

Queue behavior under load

Requests are processed sequentially, not in parallel. If many voices are requested simultaneously, they enter a queue. Longer texts may take several seconds to generate, and subsequent requests will wait their turn. This behavior is normal and ensures fair processing without complex batching logic from your side.

Handling Long Text

Sound wave illustration for: Handling Long Text

The API accepts up to 4,096 characters per request. If your course content exceeds this limit, you must split the text on the client side before sending it to the endpoint.

Once you receive the audio files for each segment, join them to create a continuous audio track for your LMS. This ensures no data is lost and playback remains seamless.

Split into 4096 chars

Divide your script into chunks of 4,096 characters or fewer. Each chunk becomes a separate API call. This approach prevents truncation and ensures every part of your lesson is processed correctly.

  • Count characters including spaces and punctuation.
  • Send each chunk as a distinct POST request.

Join audio files

After receiving the audio responses, concatenate the files in the order you sent them.

Ensure your client code handles the sequential nature of requests. Under load, requests may queue, so plan your integration accordingly to avoid delays.

Character counting rules

Every character counts toward the 4,096 limit. Spaces, punctuation, and numbers are all included in the count. This affects your billing, as you are charged per character processed.

Accurate counting helps you estimate costs and ensure you stay within the per-request limit without wasting characters on unnecessary whitespace.

Handling Long Text

Error Handling

Sound wave illustration for: Error Handling

Synthesis failures are fully refunded, ensuring you only pay for successfully generated audio. This protects your budget during integration testing or when input data causes unexpected errors.

Understanding error responses helps you troubleshoot quickly without losing credits. Common issues include invalid voice IDs, text exceeding length limits, or temporary rate limit hits.

Failed request refunds

If synthesis fails, the charge is returned in full. You only pay for completed audio files, making it safe to retry or debug your integration.

Common error codes

400 Bad Request: Check your JSON structure or invalid parameters. 429 Too Many Requests: You have exceeded the 60 requests per minute limit. 500 Internal Server Error: A temporary issue; retry after a short delay.

  • 400: Invalid request
  • 429: Rate limit exceeded (60 req/min)
  • 500: Temporary server error

Retry strategies

For 429 errors, implement exponential backoff. Wait briefly before retrying to avoid overwhelming the queue. For 500 errors, retry once after a short pause. Always check the response body for specific error details to guide your fix.

  • Use exponential backoff for rate limits
  • Retry once for 500 errors
  • Log error codes for debugging

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Our platform empowers product teams to seamlessly deliver engaging and measurable learning experiences.

Avatar of the voice aria
ariafemale
Avatar of the voice nova
novafemale
Avatar of the voice luna
lunafemale
Avatar of the voice sage
sagefemale
Avatar of the voice felix
felixmale
Avatar of the voice milo
milomale
Avatar of the voice atlas
atlasmale
Avatar of the voice orion
orionmale

23 languages

Any voice speaks any of these languages.

Sources and further reading

  1. Wikipedia
  2. LibriTTS-R paper (arXiv 2305.18802)
  3. Node.js documentation
  4. ISO 639 language codes
  5. Creative Commons Attribution 4.0
  6. openai-node on GitHub
  7. MDN: Web Speech API
  8. curl documentation
  9. Tether (USDT)
  10. W3C WAI: making audio and video accessible
  11. openai-python on GitHub
  12. FFmpeg documentation

More on this site