Frequently asked questions
What is the best way to handle Arabic text?
Arabic is fully supported. Send text via POST to https://api.ibat789.info/v1/audio/speech using any of the 8 voices. Explicitly set the language parameter to 'ar' to ensure correct pronunciation, as the system does not auto-detect Arabic script. Each request handles up to 4096 characters. Audio is returned directly in the response without requiring external processing.
Does Google Text to Speech Arabic support all voices?
Yes. All eight voices—Aria, Nova, Luna, Sage, Felix, Milo, Atlas, and Orion—support Arabic. Any voice can speak any of the 23 supported languages without restriction. You do not need custom voice cloning or training to enable multilingual support. Simply set the language parameter to "ar" in your request, and the API handles the synthesis for all available voice presets.
How do I set the language explicitly?
Include the 'language' field in your JSON request body with the ISO code, e.g., 'ar' for Arabic. This ensures accurate synthesis regardless of the voice model. The endpoint is POST https://api.ibat789.info/v1/audio/speech. Explicit setting prevents incorrect language guessing, especially for Latin-script text that may not be English.
What happens if I don't specify a language?
The API guesses the language from the script. Latin script text defaults to English. If you send Arabic text without specifying 'ar', it may default incorrectly. For non-English Latin or specific scripts, always set the 'language' field explicitly to ensure accurate pronunciation and synthesis results.
Can I mix languages in one request?
You can mix languages within the 4096-character input limit. However, you must set the 'language' parameter to the primary script or context. The API does not automatically switch languages mid-sentence. For distinct language segments, consider splitting requests or ensuring the primary language setting covers the majority of the text.
Is UTF-8 encoding required?
Yes, standard JSON UTF-8 encoding is required for the request body. The API accepts Unicode characters, including Arabic, Chinese, and Cyrillic. Ensure your HTTP client sends UTF-8 encoded JSON. The response audio is binary, so handle it as a file or stream, not as text.
How do I handle special characters?
Special characters are treated as standard input text. Spaces and punctuation count toward the 4096-character limit. Ensure your JSON payload correctly escapes special characters. The API processes them as part of the text input without additional configuration. No custom lexicons or SSML tags are available for pronunciation control.
Does the API support right-to-left text?
Yes, Arabic and Hebrew are supported. The API handles the synthesis correctly for right-to-left scripts. You send the text as standard UTF-8 JSON. The audio output is standard. Display formatting for RTL is handled by your client application, not the TTS engine. Set 'language' to 'ar' or 'he' explicitly.
Language Detection
Integration begins with language handling. The API detects the script of your input text automatically, but explicit control ensures accuracy for multilingual projects.
Automatic Detection
The engine infers the language from the Unicode script of the input string. This works reliably for distinct scripts like Cyrillic or Hanzi without additional configuration.
Manual Language Code
Pass the optional language parameter (ISO code) to override detection. Use this when mixing scripts or when the default guess is incorrect, such as for Arabic or Hebrew.
- Supported: Arabic, Chinese, English, French, German, Hindi, Japanese, Korean, Spanish, etc.
- Not supported: Vietnamese, Thai, Ukrainian, Czech, Bengali.
Latin Script Default
If language is omitted and the text uses Latin characters, the system defaults to English. For other Latin-based languages like Dutch or Finnish, you must explicitly set the language field to ensure correct pronunciation.
Voice Selection by Language
Voice selection determines the acoustic characteristics of the generated audio. You choose from eight presets, which are based on licensed recordings from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobook readings. Each voice can generate audio in any of the 23 supported languages, allowing consistent branding across multilingual campaigns.
Arabic Voice Availability
All eight voices support Arabic. Any voice can speak any of the 23 supported languages. Ensure your input text is properly encoded, as the API processes raw characters.
- Supports all eight voices for Arabic output
- No special model required for Arabic scripts
- Compatible with standard ISO language codes
English Voice Options
- Aria for clear narration
- Nova for upbeat delivery
- Felix for energetic promos
- Milo for conversational tone
Cross-Lingual Voice Usage
Any voice preset works with any supported language. For example, you can use the 'Atlas' voice for Spanish or the 'Luna' voice for Japanese. This allows you to maintain a consistent audio identity across different language markets without managing separate voice assets.
- Any voice supports any of the 23 languages
- Maintains consistent brand tone across regions
- No need for language-specific voice models
Request Structure
The synthesis endpoint expects a JSON payload with specific fields. Your integration must structure requests to match the required schema for reliable audio generation.
Ensure your client library handles the JSON serialization correctly to avoid malformed requests that waste your character quota.
JSON Body Format
Send a POST request to /v1/audio/speech with a JSON body containing model, input, voice, response_format, and optionally speed or language.
Use tts-1 or tts-1-hd for the model. The input field holds your text, and voice selects one of the eight presets.
- model: "tts-1" or "tts-1-hd"
- input: string up to 4096 characters
- voice: preset ID (e.g., "aria")
- response_format: mp3, wav, opus, flac, or pcm
Input Field Constraints
The input field accepts plain text strings. Spaces and punctuation count toward the 4096-character limit per request.
If your content exceeds this limit, split the text into chunks, generate audio for each, and join the files client-side.
- Max 4096 characters per request
- Spaces and punctuation count as characters
- Split long texts before sending
Speed Parameter
The speed parameter accepts values between 0.25 and 4.0. Default speed is 1.0.
Adjusting speed affects generation time but not the character count or cost. Use slower speeds for clearer narration in multilingual content.
- Range: 0.25 to 4.0
- Does not affect pricing
- Use for pacing control
Audio Output Handling
The API returns raw audio bytes in the HTTP response body. Your service must read this binary stream directly without parsing it as JSON. The data corresponds exactly to the response_format parameter specified in your request, whether you selected MP3, WAV, OPUS, FLAC, or PCM.
Proper handling ensures the audio file is saved correctly for downstream playback or delivery. Since the response contains only the audio payload, you do not need to extract data from a nested JSON object. This simplifies the integration logic for high-volume agencies managing multilingual content delivery.
Binary Response Data
The response body is a raw byte stream. Do not attempt to parse it as JSON. Your code should read the stream directly and write it to a file or memory buffer. This approach minimizes parsing overhead and ensures compatibility with any audio format.
Binary data preserves the integrity of the audio waveform. Whether you receive MP3 or PCM, the bytes represent the exact synthesized audio. Ensure your HTTP client handles binary responses correctly to avoid corruption during storage or transmission.
- Read response body as raw bytes
- Do not parse as JSON
- Write directly to file or buffer
File Extension Handling
Map the response_format value to the correct file extension. For example, use .mp3 for MP3, .wav for WAV, and .opus for Opus. This ensures that downstream players and storage systems recognize the file type correctly. Incorrect extensions may cause playback issues.
When storing audio files, append the appropriate extension based on the format you requested. This is crucial for agencies managing multilingual content, as different systems may rely on file extensions to determine how to process or display the audio.
- .mp3 for MP3
- .wav for WAV
- .opus for Opus
- .flac for FLAC
- .pcm for PCM
Content Type Headers
The Content-Type header in the response indicates the MIME type of the audio file. Use this to set the correct header when storing or forwarding the file. This helps clients and storage systems identify the file format accurately.
Ensure your HTTP client respects the Content-Type header. This is especially important when integrating with third-party services or CDNs that rely on MIME types to serve audio files correctly. Incorrect headers may lead to playback errors or misidentification of the file.
- Use
Content-Typefor MIME type - Set correct header for storage
- Avoid playback errors
Error Scenarios
Integration failures are predictable when boundaries are respected. Understanding specific error states prevents wasted requests and ensures your pipeline handles edge cases gracefully without manual intervention.
Invalid Voice ID
Requests fail immediately if the voice parameter does not match one of the eight available presets. The API returns an error if you use a non-existent ID or a voice incompatible with the specified language context.
- Verify voice IDs against the
GET /v1/voicesendpoint before sending synthesis requests.
Text Too Long
Each request supports a maximum of 4096 characters in the input field. Exceeding this limit results in a rejection. You must implement client-side splitting for longer scripts, generating audio for each segment and joining the files.
- Split text into chunks of 4096 characters or fewer.
Rate Limit Exceeded
Each API key is limited to 60 requests per minute. If you exceed this threshold, subsequent requests are rejected until the window resets. New accounts start with a lower limit of 10 requests per minute.
- Monitor usage via the dashboard to stay within the 60 req/min limit.
SDK Integration Steps
Our API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing client libraries. This reduces integration overhead for agencies already familiar with OpenAI’s TTS infrastructure. You simply redirect the client to our base URL and use your TableSpeak key.
The following steps outline how to configure the OpenAI SDK for multilingual content delivery. This approach ensures compatibility with standard HTTP clients while leveraging familiar method signatures.
Install OpenAI SDK
Install the official OpenAI Python or Node.js SDK using your preferred package manager. This provides the necessary classes for API communication without requiring custom HTTP request logic.
- npm install openai
- pip install openai
Set Base URL
Configure the SDK’s base_url property to point to https://api.ibat789.info/v1. This redirects all requests to our infrastructure while maintaining the standard request shape for the /v1/audio/speech endpoint.
Configure API Key
Set the Authorization header using your TableSpeak key in the format Bearer tts-.... Ensure the key is active and has sufficient balance, as failed requests are free but valid keys are required for rate limit tracking.
Testing the Integration
To validate your multilingual integration, first confirm the API returns a 200 status code, indicating successful synthesis. This ensures the request reached the engine without immediate failure, which is critical for high-volume agency workflows.
Next, verify the audio output matches your expected duration. For long texts, generation takes roughly real-time (25 characters per second). Short phrases may take a few seconds due to queue processing under load. Always check the file size to ensure content was delivered.
Verify Response Code
Ensure the HTTP response is 200 OK. A 4xx or 5xx error indicates authentication, rate limit, or payload issues. Check the Authorization header matches your active key format tts-....
- 200: Success, audio data present
- 401: Invalid or expired API key
- 429: Rate limit exceeded (60 req/min)
Check Audio Length
Measure the duration of the returned audio file. For long texts, generation takes roughly real-time (about 25 characters per second); short phrases take a few seconds. If your queue is busy, processing may delay, but the final duration remains proportional to input length.
Use the speed parameter (0.25–4.0) to adjust playback rate. A speed of 2.0 halves the output duration. Verify this matches your client’s playback requirements for restaurant menus or announcements.
- Standard speed: ~25 chars/sec
- Speed 2.0: half duration
- Speed 0.5: double duration
Validate Character Count
Count every character in your input text, including spaces and punctuation. The limit is strict: 4096 characters per request. Exceeding this causes a 400 error.
For longer menus or scripts, split the text into chunks of 4096 characters. Generate each chunk separately and join the resulting audio files in your pipeline. This ensures no data loss and consistent billing.
- Limit: 4096 characters per request
- Spaces and punctuation count
- Split and join for longer texts

Production Deployment
Production deployment requires strict adherence to the 60 requests per minute rate limit per key. Agencies managing high-volume multilingual audio delivery must implement client-side retry logic with exponential backoff to avoid transient failures. Since requests are processed sequentially, under load a request may wait in a queue, affecting latency predictions.
Monitor your usage dashboard to ensure you stay within the 10 requests per minute threshold before the first top-up. Implementing a token bucket algorithm helps smooth out burst traffic, ensuring consistent synthesis times for restaurant menu audio or dining hall announcements without hitting hard limits.
Monitor Rate Limits
Track requests per minute against the 60-request cap. If you exceed the limit, the API returns a 429 error. Implement automatic retries with jitter to prevent thundering herd issues during peak dining hours.
Use the /v1/voices endpoint to pre-fetch available voices, reducing unnecessary metadata requests that contribute to your rate usage.
- Implement exponential backoff for 429 errors.
- Pre-fetch voice lists to minimize metadata calls.
- Track usage via the dashboard to anticipate limits.
Handle Queues
Requests are processed one after another. During high load, synthesis may delay. Design your pipeline to handle variable latency gracefully, perhaps by pre-generating audio assets during off-peak hours for static content like daily specials.
For real-time applications, buffer audio chunks if possible, though our API returns complete files. Monitor queue depth to adjust client-side timeouts accordingly.
- Pre-generate static audio during off-peak hours.
- Adjust client-side timeouts based on queue depth.
- Use asynchronous processing for non-critical updates.
Log Metadata
Request metadata (time, characters, status) is kept for billing. Log these details to reconcile charges and identify patterns in failed requests. This data is crucial for auditing multilingual content delivery costs.
Store the response audio briefly if needed for client delivery, but note that generated audio is not stored by the API. Ensure your logs include the character count to verify pricing accuracy.
- Log timestamp, character count, and status code.
- Reconcile billing data with internal logs.
- Store response audio locally if required.
Support for Arabic Scripts
Agencies delivering multilingual dining content must ensure Arabic script is processed correctly. While the API guesses language from script, setting the language field explicitly prevents misinterpretation of non-Arabic Latin text that might otherwise default to English.
RTL Text Handling
The API accepts standard UTF-8 encoded Arabic text. Your integration should pass the raw string directly to the input field without manual direction adjustments, as synthesis is direction-agnostic.
- Pass raw UTF-8 strings directly to the
inputfield. - Do not pre-process direction markers; the engine handles synthesis internally.
Character Encoding
Ensure your client library sends JSON with application/json content type. Special characters and punctuation count toward the 4096-character limit per request, so verify encoding integrity before submission.
- Verify UTF-8 encoding before sending the JSON payload.
- Punctuation and spaces count toward the 4096-character limit.
Voice Clarity
All eight voices, including aria and nova, support Arabic natively. For restaurant menus or announcements, select a voice that matches your brand tone; clarity is consistent across all supported languages.
- All 8 voices support Arabic without quality degradation.
- Select voices like aria for clear menu reading or nova for upbeat promotions.
Common Mistakes
Agencies managing multilingual audio delivery often assume voice selection implies language correctness. Our voices are language-agnostic, meaning Aria can speak Arabic or Milo can deliver English text. Without explicit instruction, the system guesses the language, defaulting to English for Latin script. This leads to accented or mispronounced output for non-English content.
Ensuring correct language tags prevents quality degradation. Similarly, exceeding the 4096-character limit per request causes synthesis failure or truncation. Always split long scripts into manageable chunks. Finally, omitting the response format forces a default, which may not suit your pipeline’s requirements for MP3, WAV, or Opus files.
Ignoring Language Tag
Our API does not infer language from voice selection. If you send Latin-script text without a language code, the system defaults to English. For Danish, Greek, or Swahili text, you must explicitly set the ISO code. Failure to do so results in English phoneme rules applied to foreign text, causing unnatural pronunciation.
This is critical for agencies handling diverse client portfolios. A single missing tag can ruin a entire multilingual campaign asset. Always verify the language field matches the input script's actual language, not just the voice's native tongue.
- Default is English for Latin script
- Set
languagefor non-English content - Voices are language-agnostic
Exceeding Character Limit
Each request supports up to 4096 characters. Sending longer texts without splitting them will result in errors or incomplete audio. Agencies managing high-volume content should implement client-side splitting logic to handle long scripts efficiently.
Splitting ensures consistent audio quality and prevents queue timeouts. Remember that spaces and punctuation count toward the limit. Plan your character budget accordingly to avoid wasted API calls and billing discrepancies.
- Max 4096 characters per request
- Spaces and punctuation count
- Split long scripts manually
Missing Audio Format
If you do not specify response_format, the API returns MP3 by default. If your infrastructure expects WAV or Opus, missing this field causes integration errors. Always define the format in your JSON body to ensure compatibility with your storage and playback systems.
Choosing the right format affects bandwidth and storage costs. FLAC offers lossless quality, while Opus provides efficient compression. Specify your preferred format explicitly to avoid unnecessary conversion steps in your delivery pipeline.
- Default is MP3
- Specify format in JSON
- WAV, Opus, FLAC available
Audio Quality Settings
Selecting the right audio configuration ensures your multilingual content meets specific playback and storage requirements. The API offers two distinct synthesis engines that differ primarily in processing overhead and output fidelity, allowing you to balance quality against cost for different client deliverables.
HD vs Standard Model
Both tts-1 and tts-1-hd utilize the same underlying engine and pricing structure. The distinction lies in the synthesis complexity, with the HD model providing slightly richer audio detail at no additional character cost.
- Use
tts-1for high-volume, background narration where subtle audio variations are less critical. - Choose
tts-1-hdfor higher fidelity audio.
Speed Adjustment
The speed parameter accepts values between 0.25 and 4.0, allowing precise control over narration pacing. Adjusting speed does not alter the character count or price, making it a flexible tool for matching voiceover timing to visual media.
- Set speeds near 1.0 for natural conversational tones.
- Increase speed for quick updates or time-sensitive announcements.
Format Selection
Output formats include mp3, wav, opus, flac, and pcm. Choose mp3 for efficient bandwidth usage in web delivery, or wav/flac for lossless archival in your agency’s asset library.
- mp3: Standard for web integration and mobile apps.
- wav/flac: Ideal for high-fidelity client reviews or broadcasting standards.
Debugging Tips
Debugging integration issues requires verifying the request payload structure against the OpenAI-compatible schema. Ensure all required fields like model, input, and voice are present and correctly typed. Mismatched data types often cause silent failures or unexpected audio outputs.
Reviewing error messages and validating your API key are critical first steps. A malformed request or an expired key will return specific HTTP status codes. Use these signals to pinpoint whether the issue lies in your network configuration or your API credentials.
Check Request Payload
Ensure the JSON body matches the expected schema exactly. The input field must not exceed 4096 characters. Verify that the voice value corresponds to one of the eight available presets. Incorrect field names or missing parameters will result in immediate rejection.
- Verify
modelistts-1ortts-1-hd - Check
inputlength is ≤ 4096 characters - Confirm
response_formatis valid (mp3, wav, etc.) - Ensure
speedis between 0.25 and 4.0
Review Error Messages
HTTP 400 errors indicate invalid parameters or malformed JSON. HTTP 401 errors suggest an issue with the Authorization header. HTTP 429 errors mean you have exceeded the 60 requests per minute limit. Each error response includes a message detailing the specific failure point for quick resolution.
- 400: Bad Request (invalid JSON or parameters)
- 401: Unauthorized (missing or invalid API key)
- 429: Too Many Requests (rate limit exceeded)
- 500: Internal Server Error (transient issue)
Validate API Key
Ensure the key starts with tts- and is passed in the Authorization: Bearer header. Keys are single-use per account; issuing a new key immediately invalidates the old one. If playback fails unexpectedly, verify the key is active and has sufficient balance or trial credit.
- Key format:
tts-... - Header:
Authorization: Bearer <key> - New key invalidates previous key instantly
- Check balance on /get-api-key/
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Understanding technical constraints is critical for agencies managing high-volume audio delivery.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- IETF RFC 7845: Ogg Opus
- MDN: Web Speech API
- LibriTTS-R corpus (OpenSLR 141)
- LibriTTS-R paper (arXiv 2305.18802)
- Tether (USDT)
- OpenAI API reference: create speech
- Creative Commons Attribution 4.0
- Node.js documentation
- ISO 639 language codes
- W3C WAI: making audio and video accessible
- openai-node on GitHub
