Generate Audio from Text with Our TTS API for Developers

By Phoneme Logic editorial team · Updated 2026-11-19

This documentation provides the technical reference for integrating the Phoneme Logic text-to-speech API into your language learning applications. You will find precise specifications for generating consistent audio output from text, including endpoint structures, parameter constraints, and authentication protocols designed for reliable curriculum delivery.

The guide covers essential workflows for developers, from initial key issuance to handling responses and managing rate limits. It details supported voices, language codes, and error handling to ensure your integration meets the strict accuracy requirements of linguistic instruction without proprietary lock-in.

Generate Audio from Text with Our TTS API for Developers

Frequently asked questions

What is the base URL for the API?

The API base URL is https://api.broo55.cc/v1. All requests, including speech synthesis and voice retrieval, are directed to this endpoint. You can use the official OpenAI SDKs by configuring the base_url parameter to this value, ensuring compatibility with standard integration patterns without requiring proprietary client libraries.

Which SDKs are compatible with this API?

The API is compatible with the official OpenAI SDKs. Since the request shape matches the OpenAI speech endpoint, you can use these SDKs by simply changing the base_url to https://api.broo55.cc/v1. No proprietary SDK is provided, so standard HTTP clients or the OpenAI libraries are recommended for integration.

How do I set the language in the request?

Include the optional 'language' field in the JSON body with an ISO code. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly setting the language field ensures accurate synthesis and prevents misinterpretation of the input characters.

What formats are available for the audio output?

Available response formats are mp3, wav, opus, flac, and pcm. Specify the desired format using the 'response_format' field in your request body. These options allow you to choose between compressed audio for efficient storage or uncompressed formats for high-fidelity instructional materials, depending on your specific deployment requirements.

Can I stream the audio directly?

No, the API does not support streaming or WebSocket connections. Audio is returned as a complete file in the response after synthesis finishes. For real-time playback, you must wait for the full audio file to be generated.

How do I handle rate limit errors?

The limit is 60 requests per minute per key. If you exceed this, implement retry logic with exponential backoff in your application. Requests are processed sequentially, so under load, a request may wait in a queue. Monitor your usage via the dashboard to ensure you stay within the 60 RPM threshold.

What is the maximum input character length?

The maximum input length is 4096 characters per request. For longer texts, split the content into parts of up to 4096 characters and join the resulting audio files. This ensures consistent synthesis quality and prevents truncation, allowing you to generate full-length instructional materials by combining multiple API calls.

Is there an SDK for mobile devices?

No, there is no official mobile SDK. You can use the standard OpenAI SDKs or plain HTTP requests on any platform that supports JSON and HTTPS. You can integrate it into iOS, Android, or cross-platform mobile applications using standard networking libraries available in your development environment.

How do I rotate my API key?

You can issue a new API key at any time from your account dashboard. When a new key is generated, the old one stops working immediately. This allows for seamless rotation without downtime. Ensure your application updates to use the new key promptly to maintain uninterrupted service for your TTS requests.

What happens if the API is down?

There is no SLA or uptime guarantee provided. If the service is unavailable, requests will fail, and you will not be charged for failed synthesis attempts. Monitor the status via your dashboard or standard HTTP status codes. Since there is no SLA, plan your integration with appropriate error handling and retry mechanisms.

Can I send multiple requests in parallel?

Yes, you can send multiple requests in parallel, but they are processed sequentially. Under load, a request may wait in a queue, which can increase latency. For time-sensitive applications, consider spacing out requests or monitoring the queue status to ensure timely delivery of audio files for your instructional materials.

Does the API support SSML tags?

No, the API does not support SSML (Speech Synthesis Markup Language). You can control basic parameters like speed and voice. For precise control, adjust the 'speed' parameter between 0.25 and 4.0, or split text into separate requests to manage pacing manually.

How do I specify a voice by name?

Include the 'voice' field in the JSON body with one of the eight preset names: aria, nova, luna, sage, felix, milo, atlas, or orion. You can retrieve the full list of available voices and their details using the GET /v1/voices endpoint before constructing your synthesis requests.

What is the speed range for audio playback?

The speed range is 0.25 to 4.0. Set the 'speed' field in your request to adjust the playback rate. This allows you to slow down speech for pronunciation drills or speed up content for listening comprehension exercises, providing flexibility for different educational contexts without requiring post-processing of the audio files.

First request

curl

curl https://api.broo55.cc/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.broo55.cc/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.broo55.cc/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 and Keys

Sound wave illustration for: Authentication and Keys

Authentication to the Phoneme Logic API requires a Bearer token passed in the Authorization header. This key grants access to the speech generation endpoint and is tied to your account’s billing balance. Ensure the token is transmitted securely via HTTPS to prevent interception during requests.

Bearer Token Format

Bearer Token Format

Include the header Authorization: Bearer tts-<your_key> with every request. The key must be valid and active to generate audio. Invalid or expired tokens will result in a 401 Unauthorized response, halting the synthesis process immediately.

Key Issuance and Rotation

Key Issuance and Rotation

Keys are issued upon account creation via the /get-api-key/ page. You can generate a new key at any time through the dashboard. This allows for secure rotation without downtime, provided the new key is configured in your integration before the old one expires.

  • One active key per account
  • Old key stops immediately upon new issuance

Single Active Key Policy

Each account maintains only one active API key at a time. Issuing a new key instantly invalidates the previous one. This ensures clear audit trails for billing and usage, as all requests are attributed to the current active credential.

Endpoint Overview

Sound wave illustration for: Endpoint Overview

The Phoneme Logic API provides two primary endpoints for integration. The speech generation endpoint handles the core synthesis process, converting input text into audio files. The voices and models endpoint allows you to retrieve available voice presets, supported languages, and current pricing information.

Both endpoints operate over standard HTTP, ensuring compatibility with existing developer toolchains. You can use the official OpenAI SDKs by simply adjusting the base URL, or interact directly via standard HTTP requests. This design eliminates proprietary lock-in and simplifies integration for linguists and educators.

Speech Generation Endpoint

Send a POST request to https://api.broo55.cc/v1/audio/speech with your text and configuration parameters. The service processes the input and returns the generated audio file in the requested format. Each request can contain up to 4096 characters of text.

  • Endpoint: POST /v1/audio/speech
  • Input: JSON body with model, input, voice, and response_format
  • Output: Direct audio file download

Voices and Models Endpoint

Use GET /v1/voices to list all available voice presets, their associated languages, and supported audio formats. This endpoint also provides current pricing details. Use GET /v1/models to verify the available model identifiers (tts-1 and tts-1-hd).

Retrieving this information ensures your application selects the correct voice and language combination for your instructional materials before sending synthesis requests.

Request Method and Headers

All requests require a Authorization: Bearer tts-... header containing your active API key. The request body must be formatted as JSON. Ensure your client library supports standard HTTP methods and header injection.

Set the base_url to https://api.broo55.cc/v1 and provide your key. This approach leverages familiar SDK structures while adhering to our specific endpoint definitions.

  • Header: Authorization: Bearer <your_key>
  • Content-Type: application/json
  • Base URL: https://api.broo55.cc/v1

Request Parameters

Sound wave illustration for: Request Parameters

The API accepts plain text input via the input field, supporting up to 4,096 characters per request. Spaces, punctuation, and special characters count toward this limit. For texts exceeding this threshold, split the input into segments and concatenate the resulting audio files.

Input Text and Length Limits

Send text as a standard string in the JSON body. The engine processes requests sequentially, so long inputs may experience queue delays under load. Each request consumes characters from your balance at the standard rate of $0.01 per 1,000 characters.

Voice Selection Options

Select one of eight voice presets using the voice parameter. Choices include female voices like Aria and Nova, or male voices like Atlas and Orion, among others. All voices support the full range of 23 supported languages, allowing consistent audio output for diverse instructional materials.

  • Aria: Warm, clear narrator
  • Nova: Bright, upbeat
  • Luna: Soft, storytelling
  • Sage: Calm, instructional
  • Felix: Energetic, promo
  • Milo: Friendly, conversational

Response Format Choices

Specify the output format using the response_format parameter. Supported formats include mp3, wav, opus, flac, and pcm. Choose formats based on your integration needs; mp3 is efficient for web delivery, while wav or flac offer lossless quality for archival or editing.

  • mp3: Compressed audio
  • wav: Uncompressed audio
  • opus: High efficiency
  • flac: Lossless compressed audio
  • pcm: Raw uncompressed audio

Code Examples

Sound wave illustration for: Code Examples

Developers can integrate Phoneme Logic’s TTS API using standard HTTP requests or the OpenAI Python SDK. The API adheres to the OpenAI speech endpoint schema, allowing seamless migration by simply adjusting the base URL.

Below are examples for generating audio files via cURL and Python. These snippets demonstrate the required authentication, parameter structure, and response handling for immediate implementation in your application.

cURL Command Example

Use this command to generate speech directly from the terminal. Replace YOUR_API_KEY with your Bearer token and adjust the voice and format parameters as needed.

The response returns the audio file binary data. Save this output to a local file using the -o flag.

  • curl -X POST "https://api.broo55.cc/v1/audio/speech" \
  • -H "Authorization: Bearer YOUR_API_KEY" \
  • -H "Content-Type: application/json" \
  • -d '{"model": "tts-1", "input": "Hello world", "voice": "nova", "response_format": "mp3"}' \
  • -o output.mp3

OpenAI Python SDK Integration

Install the official OpenAI Python package. Initialize the client with your API key and the Phoneme Logic base URL.

Call the audio.speech.create method with your text and desired voice. The API handles the synthesis and returns the audio content.

  • import openai
  • client = openai.OpenAI(base_url="https://api.broo55.cc/v1", api_key="YOUR_API_KEY")
  • speech = client.audio.speech.create(
  • model="tts-1",
  • voice="nova",
  • input="Text to speech example."
  • )
  • speech.stream_to_file("output.mp3")

Base URL Configuration

The API endpoint is https://api.broo55.cc/v1. All SDKs that support custom base URLs can connect to this service.

Ensure your authentication header uses the format Authorization: Bearer tts-... for valid requests.

Response Handling

Sound wave illustration for: Response Handling

The API returns the synthesized audio file directly in the response body, allowing immediate playback or storage. Generated files are not stored on our servers; they are delivered solely for your immediate use.

Audio File Return

Upon successful synthesis, the response contains the audio data in the specified response_format (mp3, wav, opus, flac, or pcm). The audio is returned as a binary stream, enabling direct saving to your local filesystem or streaming to a client.

Status Codes

A 200 OK status indicates successful generation. Other standard HTTP codes (4xx, 5xx) signal issues such as authentication failures or server errors. Failed requests incur no charge, and the credit is returned to your balance.

Error Messages

Errors include specific details like invalid character limits or unsupported voice codes. The response body provides a clear error message to help you debug request parameters quickly.

Response Handling

Rate Limits and Quotas

Sound wave illustration for: Rate Limits and Quotas

Phoneme Logic enforces a strict rate limit of 60 requests per minute per API key. This cap ensures consistent audio generation quality for linguistic workflows and prevents burst usage from impacting service stability. The limit applies uniformly regardless of text length or voice selected.

Requests Per Minute

The standard allocation allows 60 requests per minute. Each successful or failed synthesis counts toward this quota. Developers should monitor usage via the dashboard to avoid throttling during high-volume curriculum generation.

Pre-Top-Up Limits

New accounts without a completed top-up are restricted to 10 requests per minute. This lower limit remains active until a minimum $5 USDT (TRC-20) transfer is confirmed. Balances do not expire.

  • Minimum top-up: $5 USDT on TRON network
  • Automatic credit within minutes of transfer
  • Limit increases to 60 req/min upon confirmation

Queue Behavior

Requests are processed sequentially within the allocated window. If the queue is full, additional requests wait briefly before being served or returning a 429 status. For long texts split into parts, each segment consumes one request from the quota.

Voice and Language Options

Sound wave illustration for: Voice and Language Options

Phoneme Logic provides eight distinct voice presets optimized for linguistic clarity and instructional consistency. These voices cover a range of tones suitable for diverse educational contexts, from neutral news delivery to warm storytelling.

Selecting the appropriate voice ensures that generated audio materials meet specific pedagogical standards for pronunciation drills and listening comprehension exercises without requiring additional processing.

Available Voice Presets

Our eight presets are engineered for distinct auditory characteristics to support varied curriculum needs. Each voice offers consistent synthetic speech with an inaudible watermark for identification.

Female options include Aria (warm, clear narrator), Nova (bright, upbeat), Luna (soft, storytelling), and Sage (calm, instructional). Male options include Felix (energetic, promo), Milo (friendly, conversational), Atlas (neutral, news), and Orion (deep, documentary).

  • Aria: Warm, clear narrator
  • Nova: Bright, upbeat
  • Luna: Soft, storytelling
  • Sage: Calm, instructional
  • Felix: Energetic, promo
  • Milo: Friendly, conversational

Supported Languages List

The API supports 23 languages, allowing any voice to speak any supported language. This flexibility enables educators to create multilingual learning materials using a single voice model.

Unsupported languages include Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali and all others not in the list. Ensure your curriculum targets only the supported languages to avoid synthesis failures.

  • Arabic
  • Chinese
  • Danish
  • Dutch
  • English
  • Finnish

Language Code Specification

If the language parameter is omitted, the system guesses the language from the script. Latin script defaults to English. For non-English Latin-script text, explicitly set the language field to ensure phonetic accuracy.

Using ISO codes guarantees correct pronunciation regardless of the voice's primary training data. This is critical for language educators requiring precise phonetic output for instructional materials.

Troubleshooting Common Issues

Sound wave illustration for: Troubleshooting Common Issues

Even with correct syntax, requests may fail due to input constraints or network latency. Understanding the specific boundaries of the API prevents unnecessary debugging cycles and ensures smooth integration into your language learning workflows.

This section addresses the most frequent technical hurdles: exceeding character limits, selecting invalid audio formats, and handling queue delays during peak usage.

Invalid Character Limits

Each request is capped at 4096 characters. If your source text exceeds this limit, the API will reject the request with a 400 error. You must split longer texts into chunks and concatenate the resulting audio files client-side.

Note that spaces and punctuation count toward the total character count. Ensure your preprocessing logic accounts for these before sending the payload.

  • Maximum input length: 4096 characters per request
  • Spaces and punctuation are counted as characters
  • Split long texts manually or via a helper function

Unsupported Format Errors

The API only accepts specific response formats: mp3, wav, opus, flac, and pcm. Sending an unsupported format string results in a validation error. Ensure your client library correctly maps the response_format field to one of these five values.

Using an unsupported format does not consume your character credit if the request fails validation before synthesis begins.

  • Supported formats: mp3, wav, opus, flac, pcm
  • Invalid format strings trigger a 400 error
  • Failed validation requests do not charge credits

Timeout and Queue Delays

Requests are processed sequentially. Under high load, your request may wait in a queue before synthesis begins. While typical speed is roughly real-time, short phrases may take a few seconds to generate.

If a request exceeds the HTTP timeout window, retry logic should be implemented. Failed synthesis requests are refunded automatically.

  • Requests are processed one after another
  • Queue delays occur under high load
  • Implement retry logic with exponential backoff

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. This section details specific voice applications for instructional, energetic, and conversational contexts.

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. openai-node on GitHub
  3. TRON developer hub: TRC-20
  4. IETF RFC 7845: Ogg Opus
  5. LibriTTS-R corpus (OpenSLR 141)
  6. MDN: Web Speech API
  7. W3C WAI: making audio and video accessible
  8. OpenAI API reference: create speech
  9. Tether (USDT)
  10. Creative Commons Attribution 4.0
  11. Node.js documentation
  12. FFmpeg documentation

More on this site