Frequently asked questions
How do I get an API key for the voice generator?
Visit https://play7j777.com/get-api-key/ to sign up using Google or an email and password. The dashboard displays your active API key, balance, and characters left. You can issue a new key at any time, which immediately invalidates the previous one, ensuring secure access control for your restaurant audio pipeline.
Can I use the OpenAI Python SDK with this API?
Yes. The API follows the same request shape as the OpenAI speech endpoint. You can use the official OpenAI SDKs by changing the base_url to https://api.play7j777.com/v1 and providing your site-specific API key. This allows you to leverage existing code structures without learning a new client library.
What is the maximum text length for a single request?
Each request supports a maximum of 4096 characters for the input text field. For longer menu announcements or waiting room scripts, you must split the text into parts of up to 4096 characters and join the resulting audio files. This ensures consistent processing and avoids payload limits during synthesis.
Does the API support streaming audio playback?
No, the API does not support streaming, WebSocket, or real-time partial audio. You send a POST request and receive the complete audio file in the response. For restaurant digital signage, you should pre-generate the audio files and store them locally before triggering playback on your display systems.
How do I specify the voice for Hindi text?
Include the optional language parameter with the ISO code for Hindi in your request body. If omitted, the system guesses the language based on the script, but Latin text defaults to English. Explicitly setting the language ensures accurate pronunciation for your Hindi menu items or announcements.
What happens if I exceed the 60 requests per minute limit?
Requests are processed sequentially, so exceeding the 60 requests per minute limit per key may cause your request to wait in a queue. Under load, this can increase generation time. Ensure your pipeline handles delays gracefully, as requests are not dropped but simply delayed until capacity is available.
Can I generate audio in WAV format for high quality?
Yes, you can specify WAV as the response_format in your request. The API supports mp3, wav, opus, flac, and pcm formats. WAV provides lossless quality suitable for high-fidelity restaurant speakers, though file sizes will be larger compared to compressed formats like MP3 or Opus.
Is the API key single-use or can I rotate it?
You have one active key per account, but you can rotate it at any time. Issuing a new key immediately invalidates the old one. This allows you to secure your restaurant audio pipeline by regularly updating credentials without downtime, as the new key becomes active instantly.
How do I handle errors in my restaurant's audio pipeline?
If synthesis fails, the charge is returned in full, and you receive an error response. You should implement retry logic in your pipeline to handle transient failures. Failed requests do not incur costs, so you can safely retry without worrying about billing errors affecting your restaurant's audio budget.
Does the API support SSML tags for pronunciation?
No, the API does not support SSML tags, phoneme dictionaries, or custom pronunciation lexicons. You must provide plain text input. For specific pronunciation needs in your restaurant menus, you may need to spell out words phonetically in the input text to achieve the desired audio output.
Can I send multiple texts in one request?
No, each request processes a single input text string up to 4096 characters. To generate audio for multiple menu items or announcements, you must send separate POST requests for each text segment. You can then join the resulting audio files on your end for continuous playback.
How do I test the API before going live?
Sign up with Google to receive a $0.50 free trial credit (about 50,000 characters) valid for 7 days. Use the curl example on the dashboard to test voice selection, language settings, and format options. This allows you to validate audio quality for your restaurant environment before scaling up.
What is the base URL for the API endpoints?
The base URL for all API endpoints is https://api.play7j777.com/v1. Use this base URL when configuring your OpenAI SDK or making direct HTTP requests. All endpoints, including speech synthesis and voice listing, are prefixed with this base URL for consistent integration into your restaurant audio systems.
Are there any SDKs specific to this API?
No, there is no official SDK of our own. You should use the OpenAI SDK or plain HTTP requests. The API is compatible with OpenAI SDKs by adjusting the base URL, allowing you to use familiar libraries without needing a proprietary client for your restaurant audio integration.
First request
curl
curl https://api.play7j777.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.play7j777.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.play7j777.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 |
Authentication setup
Access the VoiceRatio API by generating a unique key via your account dashboard. Each account holds one active key that authorizes all requests to the speech endpoint.
Generate API key
Navigate to /get-api-key/ after signing in with Google or email. The dashboard displays your active key, current balance, and a ready-to-use cURL example for immediate testing.
- Sign up via Google or email/password
- View key and balance on dashboard
- Copy key for authorization headers
Bearer token format
Include your key in the HTTP header as Authorization: Bearer tts-.... The prefix tts- identifies the token type for the API gateway.
- Use
Authorization: Bearer tts-<key> - Include in every POST request
Key rotation process
Issue a new key from the dashboard at any time. The previous key stops working immediately, ensuring secure access control for your restaurant audio workflows.
- Generate new key anytime
- Old key invalidates instantly
First API request
Sending text to the API returns a synthesized audio file ready for your digital signage or waiting room speakers. This quickstart demonstrates generating a menu read using the standard endpoint.
The service accepts UTF-8 text up to 4096 characters. For longer menus, split the text into chunks and join the resulting audio files sequentially.
Curl example for menu reading
Use this command to generate an MP3 file of a daily special menu. Replace YOUR_API_KEY with your key from the dashboard.
$ curl -X POST https://api.play7j777.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "voice": "aria", "input": "Today's special is grilled salmon with lemon sauce.", "response_format": "mp3"}' \ -o menu_today.mp3
JSON body structure
The request body requires model, input, and voice. The input field holds your menu text. The voice field selects from our eight presets, such as aria for a clear narrator or atlas for neutral delivery.
Optional fields include speed (0.25–4.0) and language (ISO code). If language is omitted, the system guesses from the script, defaulting to English for Latin text.
- model: "tts-1" or "tts-1-hd"
- voice: e.g., "aria", "nova", "atlas"
- response_format: "mp3", "wav", "opus", "flac", "pcm"
- input: text string, max 4096 chars
Response handling
A successful request returns HTTP 200 with the audio binary in the response body. Save this directly to an audio file on your server or playback device. Failed requests return an error JSON object and incur no charge.
If the synthesis fails, check the error message for details like invalid input length or rate limits. Retry logic should handle transient errors gracefully.
OpenAI SDK integration
The official OpenAI SDKs work directly with VoiceRatio by updating the base URL. Point your client to https://api.play7j777.com/v1 and use your API key for authentication. This allows you to use standard libraries without custom wrappers.
Base URL configuration
Configure your SDK client to target our API endpoint. The base URL replaces the default OpenAI domain, ensuring all requests route correctly to our synthesis engine.
- Set
base_urltohttps://api.play7j777.com/v1 - Use standard OpenAI Python or Node.js SDKs
Client initialization
Initialize the client with your unique Bearer token. This token authenticates every request you send to generate audio for menus or announcements.
- Pass the key via
Authorization: Bearer <key> - One active key per account
Request parameters
Send a JSON body with model, input, and voice. The input field holds your text (max 4096 characters), and voice selects from our eight presets.
model: "tts-1" or "tts-1-hd"response_format: mp3, wav, opus, flac, or pcm
Voice parameters
VoiceRatio provides eight distinct presets to match the atmosphere of your dining establishment. Female options include Aria for warm narration, Nova for upbeat energy, Luna for storytelling, and Sage for clear instructions. Male voices cover Felix for energetic promos, Milo for conversational tones, Atlas for neutral news updates, and Orion for deep documentary styles.
Selecting female voices
Aria delivers a clear, warm narration ideal for menu descriptions, while Luna’s soft tone suits storytelling segments. Nova adds bright energy for promotional announcements, and Sage offers calm, instructional clarity for waiting area updates.
- Aria: warm, clear narrator
- Nova: bright, upbeat
- Luna: soft, storytelling
- Sage: calm, instructional
Selecting male voices
Felix provides energetic delivery for promotional content, while Milo creates a friendly, conversational experience. Atlas ensures neutral, professional news updates, and Orion offers a deep, documentary-style voice for immersive dining hall audio.
Note: Every voice can speak any of the 23 supported languages. Explicitly setting the language parameter is recommended for non-English Latin-script text to ensure accurate pronunciation.
- Felix: energetic, promo
- Milo: friendly, conversational
- Atlas: neutral, news
- Orion: deep, documentary
Speed adjustment range
Adjust speech rate between 0.25x and 4.0x to fit the dining pace. Slower speeds enhance clarity for complex menu items, while faster speeds keep waiting room announcements concise. Requests are processed sequentially, so longer texts may queue under load.
Audio formats supported
Our API supports five distinct audio formats, allowing you to select the optimal balance between file size and fidelity for your restaurant’s digital signage and PA systems.
Choose MP3 for broad compatibility, WAV for uncompressed quality, or Opus and FLAC for efficient, high-quality storage.
MP3 compatibility
MP3 is the default and most widely supported format, ensuring seamless playback across standard restaurant speakers, waiting room displays, and mobile devices.
WAV quality
Select WAV for uncompressed, broadcast-quality audio ideal for high-fidelity digital signage or archival purposes where file size is less critical than raw audio integrity.
Opus and FLAC options
Opus offers efficient compression, while FLAC provides lossless compression for perfect audio reproduction. Both are efficient alternatives depending on your storage and bandwidth constraints.

Rate limits and quotas
Efficient voice generation for restaurant audio relies on understanding request quotas. Our API enforces strict rate limits to ensure stable performance for menu readings and waiting room announcements across your digital signage network.
60 requests per minute
Each API key supports up to 60 requests per minute under normal conditions. This limit applies per key, allowing you to manage multiple audio assets simultaneously without degradation.
10 requests before top-up
New accounts or those with a $0.50 trial start with a lower limit of 10 requests per minute. Once you top up via USDT (TRC-20), the limit increases to 60 requests per minute (from 10 per minute).
Queue behavior
Requests are processed sequentially. Under load, additional requests may wait in a queue. Generation speed is roughly real-time (about 25 characters per second), so longer menu texts take more time to complete.
Error codes and handling
When your key is missing or invalid, the API returns HTTP 401. This occurs if the Authorization header is malformed or the key was revoked during rotation.
HTTP 429 indicates you have exceeded the 60 requests per minute limit. If your account has not yet topped up, the limit is stricter at 10 requests per minute.
HTTP 401 authentication
Ensure the header format is exactly Authorization: Bearer tts-.... A new key issued via the dashboard instantly invalidates the previous one, so update your configuration immediately upon rotation.
HTTP 429 rate limit
Requests are processed sequentially. If you send multiple parallel requests, they queue. Exceeding the limit results in a 429 status until the window resets or you top up via USDT.
Failed synthesis requests do not count against your character quota but may still trigger rate limits depending on processing time.
- Limit: 60 requests/minute (post top-up)
- Limit: 10 requests/minute (pre top-up)
- Status: 429 Too Many Requests
Retry logic
Implement exponential backoff for 429 errors. Wait briefly before retrying, as the queue clears as prior requests finish. Do not retry 401 errors without refreshing your key.
Language detection
Language handling in your dining audio API depends on clear rules to ensure accurate pronunciation for menus and announcements. The system either infers the language from the text script or uses an explicit code you provide.
Correct language selection prevents awkward accents in foreign menu items or cultural announcements, ensuring the synthetic voice sounds natural to diners.
Auto-detection from script
The API analyzes the input text script to guess the language. This works well for standard text, but for non-English Latin-script text, you should explicitly set the language parameter.
For example, detecting Chinese characters or Arabic script triggers the correct voice model automatically without extra configuration.
- Supports 23 languages including Chinese, Arabic, and Japanese.
- Analyzes character sets to determine the target language.
Explicit language setting
You can force a specific language by providing its ISO code in the request. This is crucial for non-English Latin-script texts that might otherwise be misinterpreted.
Setting the language explicitly ensures consistent pronunciation for bilingual menus or specific cultural announcements in dining halls.
- Use the
languageparameter with ISO codes. - Recommended for mixed-language text or ambiguous scripts.
Default English fallback
If no language is set and the script is Latin, the system defaults to English. This simplifies setup for standard English menus.
For non-English Latin text, such as French or Spanish, always set the language parameter to avoid English pronunciation.
- Latin script defaults to English if unspecified.
- Set
languagefor non-English Latin text.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. This reduces administrative overhead and ensures that updates to menu items or announcements are deployed uniformly across your network.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- LibriVox public-domain audiobooks
- openai-python on GitHub
- IETF RFC 7845: Ogg Opus
- W3C WAI: making audio and video accessible
- MDN: Web Speech API
- FFmpeg documentation
- Node.js documentation
- Creative Commons Attribution 4.0
- openai-node on GitHub
- LibriTTS-R paper (arXiv 2305.18802)
- LibriTTS-R corpus (OpenSLR 141)
