API Documentation: Quickstart for Transport Announcements

By TransitVoice editorial team · Updated 2026-11-18

This documentation provides the technical reference for integrating VoxCommune’s text-to-speech API into transport operations. It covers the request structure, supported parameters, and error handling required for generating audio files for PA systems, digital signage, and fleet communications. You will find precise details on using standard HTTP clients or the OpenAI SDK to convert text inputs into synthetic speech at scale.

Designed for engineering and announcement teams, this guide explains how to manage API keys, handle rate limits, and select voices from eight presets. It details the supported audio formats, language handling, and character-level billing metrics. Use this reference to implement consistent, clear audio generation for your transport infrastructure with minimal integration overhead.

API Documentation: Quickstart for Transport Announcements

Frequently asked questions

How do I install the OpenAI SDK for this API?

Install the official OpenAI SDK using your preferred package manager (e.g., pip install openai). Initialize the client by setting the base_url to https://api.vip234play.com/v1 and providing your Bearer token via the api_key parameter. This allows you to use the standard speech endpoint with our API without needing a custom SDK.

What is the maximum text length per request?

The maximum input length is 4096 characters per request. If your announcement exceeds this limit, you must split the text into smaller chunks of up to 4096 characters each. Generate audio for each chunk separately and join the resulting audio files to create the final continuous announcement for your PA system.

Can I stream audio while it is generating?

No, the API does not support streaming or WebSocket connections for partial audio. You must wait for the full audio file to be generated and returned in the response. Requests are processed sequentially, so under load, generation may take time, but you receive the complete file only after synthesis finishes.

Does the API support SSML tags?

No, the API does not support SSML (Speech Synthesis Markup Language) tags. You cannot use SSML to control pauses, emphasis, or pronunciation directly within the input text. You must rely on the standard text input and the available voice presets to achieve the desired tone and clarity for your announcements.

How do I specify a different voice?

Include the voice parameter in your JSON request body. You can choose from eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Each voice has a distinct tone, such as calm, energetic, or deep. Select the voice that best matches the context of your transport announcement or digital signage.

What happens if I exceed the rate limit?

The rate limit is 60 requests per minute per key. If you exceed this, subsequent requests will be queued or rejected. Ensure your integration handles retry logic appropriately. For large-scale deployments, consider distributing load across multiple keys or timing your requests to stay within the 60 requests per minute threshold.

Can I send text in multiple languages in one request?

No, each request handles a single language context. You can specify the language using the ISO code in the language parameter. If not specified, the system guesses the language based on the script. For mixed-language announcements, split the text by language and send separate requests for each language segment.

Is the API key shared across all team members?

Yes, each account has one active API key. This key is shared across all team members and servers using that account. You can issue a new key at any time, which immediately invalidates the old one. Ensure your team uses the current key to avoid service interruptions during key rotation.

How do I handle text longer than 4096 characters?

Split the text into parts of up to 4096 characters. Send each part as a separate POST request to the speech endpoint. Receive the audio file for each chunk and join them programmatically or using an audio tool. This ensures consistent audio quality and stays within the single-request character limit.

What is the default language if not specified?

If the language parameter is not set, the system guesses the language from the text script. Latin script text defaults to English. For non-English Latin-script text, you should explicitly set the language parameter to ensure accurate pronunciation. Supported languages include Arabic, Chinese, Danish, Dutch, English, and others listed in the documentation.

Can I use the API key on multiple servers?

Yes, the single API key per account can be used on multiple servers simultaneously. Since the key is shared, all servers share the same rate limit of 60 requests per minute. Monitor your usage to ensure combined traffic from all servers does not exceed the limit, causing queuing or rejection.

How do I verify the API is working correctly?

Send a simple POST request to https://api.vip234play.com/v1/audio/speech with a short text and a valid voice. Check the response for the audio file. You can also use the GET /v1/voices endpoint to list available voices and confirm connectivity. Ensure your Authorization header includes the Bearer token.

Is there a webhook for long-running requests?

No, the API does not provide webhooks for request status or completion. All requests are processed synchronously, and the audio file is returned directly in the response. You do not need to poll for status. If a request fails, the response indicates the error, and no charge is applied.

Can I customize the speed of the voice?

Yes, you can adjust the speed using the speed parameter in the request body. The valid range is 0.25 to 4.0, where 1.0 is normal speed. This allows you to slow down announcements for clarity or speed them up for quick updates. Adjust the speed based on the specific needs of your transport environment.

First request

curl

curl https://api.vip234play.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.vip234play.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.vip234play.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 the /get-api-key/ page on vip234play.com to create your account. You can authenticate using your Google account or by setting up a standard email and password. This creates a unique account per site, allowing you to manage credentials for your transport team’s API integration.

Sign up via Google or email

Sign up via Google or email

Choosing Google authentication provides an immediate $0.50 trial credit valid for 7 days, sufficient for approximately 50,000 characters of test announcements. Email-based accounts start without this trial credit. This initial credit allows you to verify voice quality and integration speed before committing to a top-up.

  • Google sign-in includes a 7-day, $0.50 trial credit
  • Email/password accounts start with zero balance
  • Accounts are tied to the specific vip234play.com domain

View key in dashboard

View key in dashboard

Once registered, your dashboard displays your active API key, current balance, and character usage statistics. The interface provides a ready-to-use cURL example, enabling immediate testing of the speech synthesis endpoint. You can monitor your request history and remaining balance in real time.

  • API key displayed prominently for easy copying
  • Real-time balance and character usage tracking
  • Built-in cURL example for instant testing

Regenerate key if compromised

If your API key is exposed, you can issue a new one at any time from the dashboard. The old key stops working immediately upon regeneration, ensuring your fleet communications remain secure without interrupting active services. There is no limit to the number of keys you can rotate.

First Request with cURL

Sound wave illustration for: First Request with cURL

Use cURL to send a POST request to the speech endpoint. This standard HTTP call accepts your text payload and authentication header, initiating the synthesis process immediately.

POST to /v1/audio/speech

Direct your request to https://api.vip234play.com/v1/audio/speech. Include your API key in the Authorization: Bearer <key> header. This endpoint handles the conversion of your input string into an audio stream.

JSON body with model and input

Construct a JSON object containing the model (tts-1 or tts-1-hd), the input text (max 4096 characters), and the voice preset. Specify the response_format and optional speed multiplier. Ensure the input does not exceed the character limit for a single request.

  • model: "tts-1" or "tts-1-hd"
  • input: your announcement text
  • voice: e.g., "atlas" for news
  • response_format: "mp3" or "wav"

Receive audio file in response

The API returns the synthesized audio file directly in the response body. For transport announcements, save this binary data to a file or stream it to your PA system. Failed requests incur no charge and return the error details in the JSON response.

OpenAI SDK Compatibility

Sound wave illustration for: OpenAI SDK Compatibility

VoxCommune’s API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing integration code with minimal adjustments. By simply redirecting the base URL, your transport announcement systems can switch to our engine without rewriting request logic.

Change base_url to api endpoint

Update your client configuration to point to https://api.vip234play.com/v1 instead of the default OpenAI endpoint. This single change routes all synthesis requests through our infrastructure while maintaining standard request behavior.

Use official OpenAI SDKs

Leverage the official OpenAI SDKs (Python, Node.js, etc.) directly. Since the request shape is identical, you can use standard libraries without installing custom dependencies. This ensures stability and reduces maintenance overhead for your fleet communication software.

Standard request shape

Pass parameters like model, input, and voice in the same JSON format as OpenAI. Authenticate using your tts-... key in the Authorization header. The response returns the audio file directly, ready for playback on PA systems or digital signage.

Supported Audio Formats

Sound wave illustration for: Supported Audio Formats

Select the response_format parameter to determine the output file type. MP3 provides efficient compression ideal for web delivery and standard PA systems. WAV is available for high-quality, uncompressed playback in digital signage environments.

MP3 for web and web and PA systems

MP3 is the default and most compatible format for broad distribution. It offers a balance of quality and file size, making it suitable for fleet communication systems and web-based player implementations.

WAV for high-quality playback

WAV delivers uncompressed audio, preserving the full fidelity of the generated speech. This format is recommended for high-fidelity digital signage and environments where audio artifacts must be minimized.

FLAC, OPUS, PCM available

For specialized use cases, FLAC provides lossless compression. OPUS offers efficient compression, while PCM provides raw, uncompressed audio data for direct hardware integration.

  • FLAC: Lossless compression for archival or high-fidelity needs
  • OPUS: Efficient codec for streaming applications
  • PCM: Raw audio data for direct hardware integration

Request Parameters

Sound wave illustration for: Request Parameters

The API accepts two model variants, tts-1 and tts-1-hd, which use the same underlying engine and pricing tier. Both models use the same engine and price; choose based on your preference for the output format. Both models support the same 8 voice presets and speed ranges.

Model: tts-1 or tts-1-hd

Both models process text up to 4096 characters per request. The audio generation speed is roughly real-time (25 characters per second), ensuring predictable latency for time-sensitive announcements.

Voice: 8 presets available

Select from four female voices (aria, nova, luna, sage) and four male voices (felix, milo, atlas, orion). All voices support 23 languages, including English, Spanish, German, and Chinese. Choose atlas for neutral news-style delivery or nova for upbeat station updates.

  • aria: warm, clear narrator
  • nova: bright, upbeat
  • luna: soft, storytelling
  • sage: calm, instructional
  • felix: energetic, promo
  • milo: friendly, conversational
  • atlas: neutral, news
  • orion: deep, documentary

Speed: 0.25 to 4.0 multiplier

Adjust playback speed from 0.25x to 4.0x to fit specific broadcast windows. Lower speeds improve clarity for complex route announcements, while higher speeds compress repetitive messages. The speed parameter applies uniformly across all selected voices and languages.

Request Parameters

Rate Limits and Quotas

Sound wave illustration for: Rate Limits and Quotas

Rate limits protect synthesis stability during high-volume transport announcements. Each API key processes requests sequentially, ensuring consistent audio quality for PA systems and digital signage. Understanding these limits helps you plan batch jobs for fleet communications without interruption.

Failed requests are free, so retrying on transient errors does not consume your character balance. However, rapid retries can hit limits quickly. Monitor your dashboard usage to adjust your polling frequency accordingly.

60 requests per minute per key

The standard limit is 60 requests per minute per active key. This allows for steady throughput of announcement scripts. If you exceed this, subsequent requests will be rejected until the window resets.

  • Limit applies per key, not per account.

10 requests before first top-up

New accounts start with a 10 requests per minute limit. This applies before your first top-up. After topping up via USDT, the limit increases to the standard 60 requests per minute.

  • Top-up via USDT on the TRON network (TRC-20) triggers the increase.

Queue handling under load

Requests are processed one after another. Under heavy load, a request may wait in a queue. Typical speed is roughly real-time, but short phrases take a few seconds. Plan your announcement schedules to avoid peak queue times.

Error Handling and Status Codes

Sound wave illustration for: Error Handling and Status Codes

Transport announcements require reliable audio delivery, and knowing how failures are reported helps your integration team maintain consistent PA system outputs. The API returns standard HTTP status codes to indicate the result of each synthesis request, allowing your fleet communication software to react appropriately.

400 for invalid parameters

A 400 status indicates that the request body is malformed or contains invalid values. Common causes include exceeding the 4096-character input limit, using an unsupported voice name, or setting a speed multiplier outside the 0.25–4.0 range. The response body includes a detailed error message specifying which field caused the rejection.

  • Invalid voice preset name
  • Input text exceeds 4096 characters
  • Speed outside 0.25–4.0 range
  • Missing required model or input fields

429 for rate limit exceeded

Requests receive a 429 status when the limit is reached for a given API key. New accounts start with a limit of 10 requests per minute before the first top-up. When this limit is hit, subsequent requests are rejected until the window resets. Ensure your fleet management system implements exponential backoff to handle these rejections gracefully during peak announcement periods.

  • Standard limit: 60 requests/minute
  • Initial limit: 10 requests/minute
  • Limit resets every minute
  • Backoff recommended for retry logic

500 for internal synthesis errors

A 500 status indicates that the server encountered an unexpected error while processing the speech synthesis. This may occur due to temporary infrastructure issues or processing failures. These requests are free, so no credit is deducted, and you can safely retry the request after a brief delay.

  • Temporary infrastructure issue
  • Processing failure during synthesis
  • No charge for failed requests
  • Safe to retry with backoff

Language and Voice Selection

Sound wave illustration for: Language and Voice Selection

Language handling in transport announcements requires precision. Our API supports 23 languages, allowing any voice preset to speak any supported language. This flexibility ensures consistent audio quality across diverse fleet communications or station PA systems, regardless of the target demographic.

Proper language configuration prevents mispronunciation in mixed-script environments. While the system attempts to infer language from text scripts, explicit configuration is the standard for reliable operational audio delivery.

ISO code for language hint

Provide the ISO 639-1 code in the language field. This explicitly tells the synthesis engine which language model to prioritize for pronunciation rules and intonation patterns.

Supported codes include en, zh, de, es, fr, ja, ko, ar, hi, and others listed in our voice specifications. Using this field ensures deterministic output for critical announcements.

Auto-detect from Latin script

If the language field is omitted, the system infers the language from the input text's script. Latin script text defaults to English.

Non-Latin scripts like Cyrillic, Arabic, or CJK are generally detected correctly based on character ranges, but inference is not guaranteed for mixed-language inputs.

Explicit language setting recommended

For non-English Latin-script text (e.g., German or Spanish), always set the language parameter. Without it, the engine may default to English pronunciation rules.

This is critical for transport operators broadcasting in multilingual regions or for international fleet communications where consistent accent and clarity are required for safety and compliance.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Select the engine based on your hardware’s resolution capabilities without impacting your per-character budget.

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. W3C WAI: making audio and video accessible
  3. LibriTTS-R paper (arXiv 2305.18802)
  4. FFmpeg documentation
  5. Node.js documentation
  6. openai-node on GitHub
  7. openai-python on GitHub
  8. Tether (USDT)
  9. Python documentation
  10. OpenAI API reference: create speech
  11. LibriTTS-R corpus (OpenSLR 141)
  12. Creative Commons Attribution 4.0

More on this site