API Documentation for Text-to-Speech Voices

By SynapseSpeak editorial team · Updated 2026-11-19

This documentation covers the core endpoints for generating synthetic speech from text. You will find detailed specifications for the speech endpoint, including required JSON structures, supported audio formats, and available voice presets. The guide also explains how to integrate with the OpenAI SDK or use raw cURL requests to start generating audio immediately.

Designed for startups building interactive fiction, game dialogue, and e-learning modules, this page helps you generate distinct character voices quickly without hiring voice actors. We cover authentication, rate limits, and error handling so you can reliably integrate text-to-speech into your workflows with minimal friction.

API Documentation for Text-to-Speech Voices

Frequently asked questions

What is the API endpoint URL?

The endpoint is POST https://api.wlnbd.info/v1/audio/speech. It accepts a JSON body with fields like model, input, voice, response_format, and speed. This endpoint follows the same request shape as the OpenAI speech endpoint, allowing you to use the official OpenAI SDKs by changing the base URL to https://api.wlnbd.info/v1.

How do I authenticate my requests?

Include your API key in the Authorization header using the Bearer scheme. The header should look like: Authorization: Bearer tts-... You get one active key per account. If you issue a new key, the old one stops immediately. You can generate your key on the /get-api-key/ page.

Can I use the OpenAI Python SDK?

Yes. The API uses the same request shape as the OpenAI speech endpoint. You can use the official OpenAI Python SDK by changing the base_url to https://api.wlnbd.info/v1 and providing your SynapseSpeak API key. This allows you to use standard SDK methods.

What is the maximum character limit per request?

Each request supports up to 4096 characters in the input field. If your text exceeds this limit, you must split it into parts of up to 4096 characters each. Generate audio for each part separately and then join the resulting audio files to create the final output.

Which voices are available for male characters?

There are four male voice presets: felix (energetic, promo), milo (friendly, conversational), atlas (neutral, news), and orion (deep, documentary). These voices are based on licensed recordings from LibriTTS-R and LibriVox public-domain audiobook readings. Each voice has a distinct tone suitable for different character types in interactive fiction.

How do I specify the audio format?

Use the response_format field in your request body. Supported formats are mp3, wav, opus, flac, and pcm. Choose the format that best fits your application’s requirements. The API returns the audio file directly in the response body in the specified format.

Can I adjust the speaking speed?

Yes, you can set the speed between 0.25 and 4.0 using the speed field in your request. This allows you to control how fast the text is spoken. Adjusting the speed can help match the pacing of your interactive fiction or e-learning modules.

What happens if I exceed the rate limit?

The rate limit is 60 requests per minute per key (10 per minute before the first top-up). If you exceed this, requests may be processed in a queue or rejected. Under load, requests are processed one after another, so delays may occur. Monitor your usage on the dashboard.

Is SSML supported in the API?

No, SSML is not supported. The API accepts plain text input. It does not offer SSML tags for controlling pronunciation, pauses, or emphasis. You must rely on the natural speech patterns of the selected voice or adjust speed and language parameters to achieve desired effects.

How do I get my API key?

Sign up on the /get-api-key/ page using Google or an email and password. After signing up, your account page will display your API key, balance, and usage details. You can issue a new key at any time, which will immediately invalidate the old one.

Can I generate audio in multiple languages?

Yes, the API supports 23 languages including English, Spanish, French, German, Chinese, and Japanese. Any voice can speak any of these languages. You can optionally specify the language using an ISO code in the request to ensure correct pronunciation.

Do I need to install a specific SDK?

No, you do not need a specific SDK. You can use the official OpenAI SDKs by changing the base_url, or use plain HTTP requests. There is no official SDK from SynapseSpeak, nor a mobile SDK or WordPress plugin. Standard HTTP libraries work perfectly.

How do I handle long texts exceeding 4096 characters?

Split your text into chunks of up to 4096 characters each. Send each chunk as a separate request to the speech endpoint. Once you receive the audio files for each chunk, join them together to create the final audio file. This ensures compatibility with the character limit.

What is the default language if none is specified?

If the language field is not set, the API guesses the language from the script. Latin script text defaults to English. For non-English Latin-script text, you should explicitly set the language parameter to ensure accurate synthesis. This applies to all 23 supported languages.

First request

curl

curl https://api.wlnbd.info/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.wlnbd.info/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.wlnbd.info/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

Authentication

Sound wave illustration for: Authentication

Authentication for the SynapseSpeak API relies on a single active API key per account, issued via the /get-api-key/ dashboard. This key serves as the sole credential for all requests, ensuring straightforward access control without complex token rotations or multi-key overhead.

API Key Format

API Key Format

Your API key is a string starting with the prefix tts- followed by alphanumeric characters. This format is consistent across all endpoints, including the speech generation and voice listing routes.

Bearer Token Header

Bearer Token Header

Include the key in the Authorization header of every HTTP request using the Bearer scheme. The header must be formatted exactly as Authorization: Bearer tts-your_key_here. Missing or incorrect headers result in immediate rejection.

Key Management

Each account holds one active key at a time. You can issue a new key from your dashboard at any time; the previous key stops working immediately upon generation. This allows instant revocation if a key is compromised.

  • Rotate keys instantly via the dashboard
  • Old keys cease access immediately
  • Single active key per account

Speech Endpoint

Sound wave illustration for: Speech Endpoint

The core functionality of SynapseSpeak is exposed through a single cloud endpoint. You send text data in JSON format and receive synthesized audio files directly in the response. This design keeps integration simple for startups building interactive fiction or e-learning modules without needing complex streaming pipelines.

The endpoint accepts standard HTTP POST requests. You must include your API key in the Authorization header to authenticate each request. The system processes the input text and returns the audio file in your chosen format, ready for immediate playback in your application.

POST Method

Send requests to https://api.wlnbd.info/v1/audio/speech using the HTTP POST method. This is the only endpoint required for generating speech. The request body must contain the text to be spoken and the configuration parameters for voice and format.

The endpoint supports standard JSON payloads. Ensure your client sends the correct Content-Type header. The server processes the text and returns the audio file directly in the response body, allowing you to save it or stream it to your users.

  • Method: POST
  • Endpoint: /v1/audio/speech
  • Content-Type: application/json

JSON Body Structure

The request body includes fields for the model, input text, voice selection, response format, and optional speed adjustment. The model field accepts "tts-1" or "tts-1-hd", which use the same engine. The input field contains the text string up to 4096 characters. Specify the voice from the eight available presets and choose your desired audio format.

You can also adjust the speed between 0.25 and 4.0 and specify a language code if needed. The system guesses the language from the script if not provided, but setting it explicitly ensures accuracy for non-English Latin-script text. All fields are sent in a single JSON object.

  • model: "tts-1" or "tts-1-hd"
  • input: text string
  • voice: preset name
  • response_format: mp3, wav, opus, flac, or pcm
  • speed: 0.25–4.0
  • language: optional ISO code

Input Field Limits

Each request can process up to 4096 characters of text. Spaces and punctuation count toward this limit. If your content exceeds this length, split the text into smaller parts, generate audio for each part, and join the files together in your application. This ensures consistent quality and prevents timeout issues.

The API processes requests sequentially. Under load, a request may wait in a queue before synthesis begins. Typical generation speed is roughly real time, meaning about 25 characters of text are generated per second of audio. Short phrases may take a few seconds to process.

Available Voices

Sound wave illustration for: Available Voices

SynapseSpeak offers eight distinct voice presets designed to help startups create engaging interactive fiction, game dialogue, and e-learning modules without hiring voice actors. Each voice is based on licensed recordings from LibriTTS-R and LibriVox, providing a clear, consistent foundation for your audio content.

Female Voice List

The female voices provide versatile tones for narration and character interaction.

  • Aria: Warm, clear narrator.
  • Nova: Bright, upbeat.
  • Luna: Soft, storytelling.
  • Sage: Calm, instructional.

Male Voice List

Male voices are optimized for energetic delivery and neutral reporting styles.

  • Felix: Energetic, promo.
  • Milo: Friendly, conversational.
  • Atlas: Neutral, news.
  • Orion: Deep, documentary.

Voice Description

Every voice can speak any of the 23 supported languages. If the language field is omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language code to ensure accuracy. All generated files carry an inaudible watermark marking them as synthetic speech.

Audio Formats

Sound wave illustration for: Audio Formats

The API supports five standard audio formats, allowing you to choose the best balance between file size and quality for your interactive fiction or e-learning modules. All formats are generated directly from the synthesis engine with no additional processing required.

MP3 Support

MP3 is the default format and is ideal for web delivery and mobile apps. It offers a small file size while maintaining speech quality suitable for dialogue and narration.

WAV Support

WAV provides uncompressed audio. Use this format when you need uncompressed audio for post-production editing.

Opus, FLAC, PCM

Opus offers high quality at low bitrates. FLAC provides lossless compression. PCM returns raw uncompressed audio data, useful for immediate playback in specific middleware.

Parameters

Sound wave illustration for: Parameters

Configure audio output by adjusting playback speed, specifying the language, and selecting the model. These parameters let you tailor synthetic voices for interactive fiction and e-learning modules without re-recording.

Speed Control

Set the speed parameter between 0.25 and 4.0 to adjust voice pacing. Faster speeds help shorten long narrations, while slower rates improve clarity for e-learning content.

  • Minimum speed: 0.25
  • Maximum speed: 4.0

Language Code

The API guesses language from the script, defaulting to English for Latin text. For non-English Latin scripts, explicitly set the language field with an ISO code to ensure correct pronunciation.

  • Supported: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish

Model Selection

Choose between tts-1 or tts-1-hd. Both use the same engine and price ($0.01 per 1,000 characters), so the choice depends only on your quality preference.

Parameters

Quickstart with cURL

Sound wave illustration for: Quickstart with cURL

Generate audio files instantly using standard cURL commands. The API accepts JSON payloads and returns binary audio data directly to your terminal, allowing you to pipe the output into local files for immediate testing of character voices.

Basic Request

Send a POST request to the speech endpoint with your model, voice, and input text. Replace the placeholder with your actual API key to authenticate the request.

  • Use tts-1 for standard generation or tts-1-hd for higher quality.
  • Set voice to one of the 8 available presets like 'nova' or 'atlas'.
  • Limit input to 4096 characters per request.

Response Handling

A successful response returns the raw audio binary. Redirect the output to a file using > audio.mp3 to save the generated audio locally.

Error Responses

If the request fails, the API returns a JSON error object. Failed requests are free: if synthesis fails, the charge is returned in full.

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

Our API mimics the OpenAI speech structure, allowing you to swap the base URL and use standard OpenAI SDKs without custom wrappers. This simplifies integration for teams already familiar with the official client libraries.

You only need to configure the base_url to point to our endpoint. The request shape remains identical to OpenAI’s /v1/audio/speech, ensuring a seamless drop-in replacement for your existing codebase.

Base URL Change

Set the base_url to https://api.wlnbd.info/v1 in your SDK configuration. This directs all requests to our infrastructure while maintaining compatibility with standard OpenAI client methods.

Client Initialization

Initialize the OpenAI client using your API key. Ensure you are using the tts-1 or tts-1-hd model values as defined in our specification.

The client handles JSON serialization automatically, so you pass standard parameters like input, voice, and response_format just as you would for OpenAI.

  • Use OpenAI class from openai package
  • Set api_key to your tts-... key
  • Configure base_url for wlnbd.info

Code Example

Below is a minimal Python example using the OpenAI SDK to generate speech. It demonstrates setting the voice to nova and requesting an MP3 output.

The response returns the audio binary data directly, which you can save to a file or stream to your application.

```python import openai client = openai.OpenAI( base_url="https://api.wlnbd.info/v1", api_key="tts-your-api-key-here" ) response = client.audio.speech.create( model="tts-1", voice="nova", input="Hello, this is a test of the SynapseSpeak API.", response_format="mp3" ) with open('output.mp3', 'wb') as f: f.write(response.content) ```

Limits & Errors

Sound wave illustration for: Limits & Errors

The API enforces a rate limit of 60 requests per minute per active key. Before your first top-up, this limit is reduced to 10 requests per minute. Requests are processed sequentially, so high load may introduce queuing delays.

Rate Limits

Exceeding the limit returns a 429 error. Each key maintains its own counter. Ensure your application handles retries gracefully during peak usage.

Character Limit

Each request supports up to 4,096 characters of input text. For longer scripts, split the text into chunks and join the resulting audio files. Spaces and punctuation count toward the limit.

Common Error Codes

401 indicates an invalid or expired API key. 429 means you hit the rate limit. 400 suggests malformed JSON or missing required fields. All errors include a message explaining the issue.

  • 401: Unauthorized
  • 429: Too Many Requests
  • 400: Bad Request

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Generating distinct character voices quickly is essential for interactive fiction and game dialogue.

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. Tether (USDT)
  3. W3C WAI: making audio and video accessible
  4. LibriVox public-domain audiobooks
  5. Creative Commons Attribution 4.0
  6. LibriTTS-R paper (arXiv 2305.18802)
  7. LibriTTS-R corpus (OpenSLR 141)
  8. TRON developer hub: TRC-20
  9. openai-python on GitHub
  10. FFmpeg documentation
  11. MDN: Web Speech API
  12. ISO 639 language codes

More on this site