Frequently asked questions
What is the endpoint URL for the API?
Send your requests to POST https://api.play889a.com/v1/audio/speech. This endpoint accepts a JSON body containing your text, selected voice, model, and desired audio format. It follows the same request shape as the OpenAI speech endpoint, ensuring compatibility with standard HTTP clients and SDKs.
Which SDKs are compatible with this API?
The API uses the same request shape as the OpenAI speech endpoint. You can use the official OpenAI SDKs by changing the base_url to https://api.play889a.com/v1 and providing your site-specific key. Alternatively, any standard HTTP client that can send JSON POST requests will work.
How do I set the speed of the speech?
Include the speed field in your JSON request body, with a value between 0.25 and 4.0. This allows you to adjust the playback rate for better pronunciation modeling or narrative pacing. The default speed is 1.0, but you can slow it down for clarity or speed it up for reviews.
Can I generate audio in real-time streaming?
No, the API does not support streaming or WebSocket connections for real-time partial audio. 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.
What is the maximum input length per request?
Each request can contain up to 4096 characters of text. If your course material exceeds this limit, you should split the text into smaller chunks. The API processes requests sequentially, so under load, a request may wait in a queue before synthesis begins.
How do I specify a specific voice gender?
Specify the voice name in the voice field. Female voices are aria, nova, luna, and sage. Male voices are felix, milo, atlas, and orion. Each voice has a distinct character, such as aria for clear narration or atlas for neutral news-style reading, allowing precise pedagogical matching.
Does the API support SSML for emphasis?
No, the API does not support SSML (Speech Synthesis Markup Language). You cannot use tags for emphasis, pauses, or pronunciation adjustments. The input is plain text. If you need specific pacing, adjust the speed parameter or split your text into separate requests.
What happens if the server is down?
If synthesis fails, the charge is returned in full. There is no SLA or uptime guarantee, so availability may vary. Failed requests are free, ensuring you only pay for successfully generated audio files. You can retry the request after a brief wait.
Can I use the same key for multiple projects?
Yes, you have one active key per account that can be used across multiple projects. The key authenticates all requests. You can issue a new key at any time, which immediately invalidates the old one, allowing you to rotate credentials if needed.
How do I authenticate my requests?
Include an Authorization: Bearer tts-... header in your HTTP requests. Your API key is available on the /get-api-key/ page after signing up. Each account has one active key, which you can regenerate at any time to secure your usage.
Is the API response JSON or binary?
The response contains the audio file itself. The response_format field in your request determines the audio format: mp3, wav, opus, flac, or pcm. The generated audio is returned directly in the response body for immediate download or playback.
Can I change the voice after the request starts?
No, the voice is determined at the time of the request. Once the synthesis job begins, the parameters are fixed. You cannot alter the voice, speed, or format mid-generation. You must specify all parameters, including voice and speed, in the initial JSON body.
Do you support webhooks for long jobs?
No, the API does not support webhooks. Requests are processed synchronously, and you receive the audio file directly in the response. For long texts, you split the input into chunks and handle the resulting audio files in your own workflow without waiting for external notifications.
How do I handle special characters in text?
Send your text as standard UTF-8 in the input field. Spaces and punctuation count as characters toward the 4096 limit. The API handles standard special characters naturally. If you need specific pronunciation, you may need to adjust the text manually, as there is no custom lexicon support.
First request
curl
curl https://api.play889a.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.mp3Python (openai)
from openai import OpenAI
client = OpenAI(base_url="https://api.play889a.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.play889a.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 | |
|---|---|
aria | female |
nova | female |
luna | female |
sage | female |
felix | male |
milo | male |
atlas | male |
orion | male |
| language | |
|---|---|
ar | العربية |
zh | 中文 |
da | Dansk |
nl | Nederlands |
en | English |
fi | Suomi |
fr | Français |
de | Deutsch |
el | Ελληνικά |
he | עברית |
hi | हिन्दी |
it | Italiano |
ja | 日本語 |
ko | 한국어 |
ms | Bahasa Melayu |
no | Norsk |
pl | Polski |
pt | Português |
ru | Русский |
es | Español |
sw | Kiswahili |
sv | Svenska |
tr | Türkçe |
Getting Your API Key
To begin using VoiceMethod, visit the /get-api-key/ page and create an account using Google or an email and password combination. This dashboard is specific to play889a.com and serves as your central hub for managing access credentials and monitoring usage.
Once registered, you will be issued a single active API key. This key authenticates your requests to the TTS engine and is the only credential needed to start generating audio files for your course materials.
Sign Up on the Dashboard
Navigate to the sign-up page and choose either Google authentication or traditional email registration. Note that Google sign-ups include a $0.50 free trial credit, while email accounts start with zero balance.
After creating your account, you gain immediate access to the dashboard where your API key is displayed. This key is tied to your specific site instance, ensuring secure and isolated access.
- Google sign-up includes $0.50 trial credit
- Email sign-up starts with zero balance
- Accounts are per site (play889a.com)
Locate Your Secret Key
Your API key appears prominently on the dashboard upon login. It begins with the prefix tts- and is the sole authentication token for your account.
The dashboard also displays your current balance, character count, and a ready-to-use cURL example. Keep this key handy as it is required for every API request you send.
Secure Your Key Properly
Treat your API key like a password. Since each account has only one active key, anyone with access can use your balance.
If you suspect your key has been compromised, you can issue a new key immediately via the dashboard. The old key stops working at once, ensuring your account remains secure without interruption.
Making Your First Request
To generate your first audio file, send a POST request to the speech endpoint with your API key. The API accepts standard JSON payloads, allowing you to specify the text content, voice model, and output format in a single call.
Use the provided cURL example to test with Spanish text. Ensure you replace the placeholder key with your own secret token from the dashboard. The system will process the request and return the audio file in the specified format.
cURL Example for Spanish Text
Execute the following command to synthesize a Spanish phrase. Replace 'YOUR_API_KEY' with your actual key. This example uses the 'nova' voice for a bright, upbeat tone.
curl -X POST https://api.play889a.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Buenos días, clase. Hoy aprenderemos los verbos irregulares.", "voice": "nova", "response_format": "mp3"}'
- Replace YOUR_API_KEY with your secret key.
- Ensure the voice 'nova' supports the target language.
- Check the response for a binary audio stream or file download.
JSON Body Structure Explained
The request body is a standard JSON object. It contains all parameters needed for synthesis, including the model version, the input text, the chosen voice, and the desired output format. You can also include optional fields like speed or language.
The API validates the JSON structure before processing. Ensure all keys are correctly spelled and values match the expected types, such as strings for text and voices, and numbers for speed adjustments.
- model: 'tts-1' or 'tts-1-hd'
- input: string, max 4096 characters
- voice: one of the 8 presets
- response_format: mp3, wav, opus, flac, or pcm
Required Fields: Model, Input, Voice
Three fields are mandatory for every request. The 'model' determines the engine quality, with 'tts-1-hd' offering higher fidelity. The 'input' field holds your text, limited to 4096 characters. The 'voice' field selects the preset that best fits your pedagogical goal.
Without these three fields, the API returns an error. Ensure the 'input' text does not exceed the character limit. If your text is longer, split it into smaller chunks before sending the request.
- model: tts-1 or tts-1-hd
- input: max 4096 characters
- voice: aria, nova, luna, sage, felix, milo, atlas, or orion
Supported Voices and Formats
VoiceMethod provides eight distinct voice presets, each designed to support specific pedagogical goals in language learning. These voices range from warm narrators to energetic promo styles, allowing teachers to match audio tone to lesson content effectively.
List of 8 Available Voices
The API offers four female voices and four male voices, all capable of speaking all 23 supported languages. Each voice has a distinct character, such as Aria for clear narration or Felix for energetic segments. Teachers can select the most appropriate voice to model pronunciation or maintain student engagement during narrative reading exercises.
- 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
Output Formats: MP3, WAV, OPUS, FLAC, PCM
You can choose from five audio formats: MP3, WAV, OPUS, FLAC, and PCM. The choice depends on your distribution needs, balancing file size against audio fidelity for classroom materials or mobile apps.
Choosing the Right Format for Students
For general listening, MP3 offers a good balance of quality and size. WAV or FLAC are preferable when you need uncompressed audio for precise pronunciation analysis in linguistic software. PCM is useful for raw data processing. Remember that generated files carry an inaudible watermark identifying them as synthetic speech.
Handling Long Texts
When preparing audio course materials, long texts must be divided into chunks of up to 4096 characters per request. This limit ensures stable synthesis and accurate character counting for billing purposes.
You can split your text programmatically and join the resulting audio files. Each segment is billed separately, so monitor your character count to avoid unexpected charges.
Splitting Text at 4096 Characters
The API accepts a maximum of 4096 characters per request, including spaces and punctuation. For longer lessons, split the text into smaller segments before sending them to the endpoint.
- Count characters carefully, as spaces and punctuation are included in the limit.
- Ensure each segment is independent to avoid context loss between segments.
Joining Audio Segments
After receiving multiple audio files, use a standard audio library or tool to concatenate them into a single file. This allows you to deliver a cohesive listening experience to students.
- Use tools like FFmpeg or Python’s
pydubto merge MP3 or WAV files. - Maintain consistent voice and speed settings across segments for seamless playback.
Managing Character Count Limits
Each request consumes characters from your account balance. Failed requests are free, but successful ones are billed at $0.01 per 1,000 characters. Monitor usage to stay within budget.
- Track character counts per segment to avoid exceeding limits mid-sentence.
- Use the /v1/voices endpoint to check available voices and formats before generating.
Rate Limits and Performance
VoiceMethod’s API enforces a strict rate limit of 60 requests per minute per key. This limit ensures stable performance.
Under heavy load, requests are processed sequentially. If you exceed the limit, additional requests wait in a queue until capacity frees up, ensuring no data is lost but potentially increasing latency.
60 Requests Per Minute Limit
Each API key allows up to 60 requests per minute. New accounts start with a lower limit of 10 requests per minute until the first top-up is credited. Exceeding this limit returns an HTTP 429 error, pausing further requests until the window resets.
- Limit: 60 requests/minute per key
- New accounts: 10 requests/minute initially
- Error code: 429 Too Many Requests
Queue Processing Under Load
Requests are processed one after another. During peak usage, your request may wait in a queue before synthesis begins. This sequential processing means concurrent requests will experience delays.
Estimating Generation Time
Generation speed is roughly real-time, averaging 25 characters of text per second of audio. Short phrases may take a few seconds to process, while long texts scale linearly with duration. Plan your workflow accordingly to avoid unexpected waits during live demos.
- Avg speed: ~25 chars/sec of audio
- Short phrases: few seconds delay
- Long texts: scale linearly with length

Error Handling and Codes
When integrating VoiceMethod into your course production workflow, understanding error responses ensures smooth audio generation. Errors typically stem from invalid inputs, rate limits, or network issues. This guide helps you diagnose and resolve common API failures efficiently.
Common HTTP Error Codes
The API returns standard HTTP status codes to indicate request outcomes. A 200 OK confirms successful audio synthesis. Use 400 Bad Request for invalid JSON or missing required fields like input or voice. A 401 Unauthorized error indicates an invalid or expired API key, requiring you to verify your credentials in the dashboard.
A 429 Too Many Requests signals that you have exceeded the rate limit. This occurs when you send more than 60 requests per minute. Ensure your application handles retries appropriately to avoid disrupting your lesson planning schedule.
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 429: Rate Limit Exceeded
Handling Rate Limit Exceeded
Your API key is limited to 60 requests per minute. If you exceed this, the API returns a 429 error. New accounts start with a 10 requests per minute limit until the first top-up. Monitor your usage in the dashboard to adjust your generation pacing.
Debugging Failed Requests
If a request fails, check the response body for detailed error messages. Ensure your text does not exceed 4096 characters. Verify that the voice name matches one of the eight available presets. Failed requests are free, so you can retry without worrying about additional charges.
Using the OpenAI SDK
VoiceMethod’s API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing code with minimal adjustments. You simply redirect the client’s base URL to https://api.play889a.com/v1 and supply your unique tts-... bearer key in the authorization header. This approach lets teachers leverage familiar Python or JavaScript libraries without learning a new SDK from scratch.
Changing the Base URL
Update your client configuration to point to https://api.play889a.com/v1. This single change ensures all requests hit our infrastructure while maintaining the standard request shape compatible with official OpenAI SDKs.
- Base URL: https://api.play889a.com/v1
- Endpoint: /v1/audio/speech
Auth Header Configuration
Include your API key in the Authorization header as Bearer tts-.... Ensure your key is kept secure within your teaching platform or script environment to prevent unauthorized usage of your character balance.
- Header: Authorization: Bearer tts-...
Compatibility with Official SDKs
The official OpenAI SDKs work directly by changing the base_url. You can use tts-1 or tts-1-hd models with the same parameters, ensuring a smooth transition for developers familiar with standard TTS integrations.
- Uses standard OpenAI request shape
- Supports official SDKs via base_url change
Language Parameter Usage
The API automatically infers language from the input script, defaulting to English for Latin characters. However, relying on auto-detection can lead to incorrect voice synthesis for non-English texts written in Latin script, such as German or French. For precise control, explicitly setting the language parameter ensures the correct pronunciation model is applied.
Auto-Detection vs Manual Setting
Auto-detection works well for clear script-specific languages like Japanese or Arabic. For Latin-script languages other than English, manual setting is recommended to avoid mispronunciation. This is important for language teachers modeling specific accents or dialects for their students.
- Set
languagefor non-English Latin text - Omit for unambiguous scripts like Chinese
- Default fallback is English
ISO Code Requirements
Use standard ISO 639-1 codes (e.g., es, fr, de). The API supports 23 specific languages. If the code is not in the supported list, synthesis may fail or produce unexpected results. Always verify the language code against the supported list before sending requests.
- Supported:
en,es,fr,de,it,pt,ru,zh,ja,ko,ar,hi,tr,sv,no,da,fi,pl,nl,el,he,sw,ms - Invalid codes may cause errors
Handling Ambiguous Scripts
Some texts may contain mixed scripts or ambiguous characters. In such cases, explicitly providing the language parameter prevents the API from guessing incorrectly. This is especially useful for code-switching examples or texts with loanwords from unsupported languages.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Effective language learning requires consistent engagement with authentic materials that stimulate genuine communicative interaction.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- OpenAI API reference: create speech
- openai-python on GitHub
- W3C WAI: making audio and video accessible
- LibriTTS-R corpus (OpenSLR 141)
- ISO 639 language codes
- TRON developer hub: TRC-20
- FFmpeg documentation
- curl documentation
- openai-node on GitHub
- LibriVox public-domain audiobooks
- Node.js documentation
