Frequently asked questions
What is the best way to integrate TTS into a game?
Q: How do I integrate TTS into a game? A: Send text via POST to https://api.wau88.cc/v1/audio/speech to receive an audio file. Use the standard OpenAI SDK by changing the base_url to https://api.wau88.cc/v1. This fits directly into your production pipeline, turning text scripts into ready-to-use audio files without managing infrastructure.
Can I use Python for the integration?
Yes. The API uses the same request shape as the OpenAI speech endpoint, so official OpenAI SDKs work by changing base_url to https://api.wau88.cc/v1. You can use any language that supports HTTP requests or the standard SDKs, including Python, Go, or JavaScript.
How do I handle large scripts?
Split your text into parts of up to 4096 characters per request. Generate audio for each part separately, then join the resulting audio files. This ensures you stay within the character limit while producing complete narration for longer game dialogues or quests.
Is the API RESTful?
Yes. It is a standard REST API. Send a POST request to https://api.wau88.cc/v1/audio/speech with a JSON body. You can also use GET /v1/voices to list available voices and GET /v1/models to check model details. Authentication uses a Bearer token.
Do I need a backend server?
Not strictly. You can call the API directly from your client if you secure your API key. However, for production games, it is often better to route requests through a backend to hide your key and manage rate limits (60 requests per minute).
How do I manage multiple voices?
Choose from 8 presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Pass the desired voice name in the request body. Each voice has a distinct tone, from warm narrator to deep documentary, allowing you to assign different characters easily.
Can I automate the voice generation?
Yes. Since the API is RESTful and uses standard JSON, you can automate generation using scripts or CI/CD pipelines. Generate audio files in bulk during development or build processes, storing the results for use in your game assets without manual intervention.
What is the latency like?
Typical speed is roughly real time, about 25 characters per second. Short phrases take a few seconds. Requests are processed sequentially, so under load, a request may wait in a queue. Plan your audio loading times accordingly for smooth gameplay.
How do I test the API before production?
Sign up for a free trial with Google authentication to receive $0.50 credit (about 50,000 characters). Use the curl example on the /get-api-key/ page to test your integration. Failed requests are free, so you can experiment without worrying about costs.
Can I use this with Unity?
Yes. Since the API uses standard HTTP requests and JSON, you can easily integrate it into Unity using C# HTTP clients or the OpenAI SDK. Generate audio files via your build pipeline or call the API at runtime if latency permits.
How do I handle errors in the API?
Check the HTTP status code and response body for error details. If synthesis fails, the charge is returned in full. Implement retry logic for transient errors, but be mindful of the 60 requests per minute rate limit per API key.
Is there a demo environment?
There is no separate demo environment. You can test the live API using your free trial credit of $0.50. Use the provided curl example or SDK integration to generate audio immediately after signing up and obtaining your API key.
How do I store the generated audio?
The API returns the audio file in the response. You are responsible for storing these files in your own game assets or cloud storage. The API does not store generated audio long-term; it is returned in the response and not kept.
Can I use this for real-time games?
It is possible but depends on your latency tolerance. Generation takes a few seconds for short phrases. For real-time dialogue, pre-generate audio files during development. If generating live, ensure your game can handle the queue time and network latency.
Prerequisites for Integration
Before generating game audio lines, you need an API key and a basic environment configured to send requests. This setup ensures your pipeline can authenticate and process text-to-speech commands without friction.
API Key Acquisition
Register on our /get-api-key/ page to generate your bearer token. Accounts are per site, so ensure you are on wau88.cc. You can sign up with Google or email. The page displays your key, balance, and a ready curl example for immediate testing.
- Google or email registration
- Single active key per account
- Immediate key visibility
Environment Setup
Ensure your development environment can send HTTPS POST requests. You will need to store your API key securely as an environment variable. The API expects a JSON body with model, input, voice, and response_format fields.
- HTTPS support required
- Secure key storage
- JSON payload capability
Network Requirements
Your servers must have outbound internet access to reach api.wau88.cc. Ensure no firewalls block port 443. Requests are processed sequentially, so allow time for queueing during high-volume generation sessions.
- Outbound internet access
- Port 443 open
- Queue time allowance
Authentication Setup
Authentication is straightforward: send your key as a Bearer token in the Authorization header. This works with the official OpenAI SDKs or plain HTTP requests.
You get one active key per account. If compromised, issue a new one immediately; the old key stops at once.
Bearer Token Usage
Include Authorization: Bearer tts-... in every request header. This single key authenticates your account for all API calls.
One key per account ensures simple tracking. If you need a fresh start, generate a new key from your dashboard.
- - Key format:
tts-... - - One active key per account
- - Immediate invalidation of old keys
Header Configuration
Set the header exactly as shown in your client library. For cURL, use -H "Authorization: Bearer YOUR_KEY".
Ensure no extra spaces or quotes interfere with the token value. Most HTTP libraries handle this automatically when you pass the string.
Key Rotation
Generate a new key anytime from your dashboard. The old key becomes invalid immediately.
Use this to rotate keys without downtime. Issue the new key, update your pipeline, and discard the old one.
Making the First Request
To generate your first audio file, send a POST request to the speech endpoint. The API accepts standard JSON payloads and returns raw audio data, making it easy to integrate into your existing game engine or LMS pipeline without complex middleware.
cURL Example
Use this command to test the endpoint directly from your terminal. Replace YOUR_API_KEY with your key from /get-api-key/ and adjust the voice or text as needed for your specific character narration needs.
- curl -X POST https://api.wau88.cc/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello world", "voice": "nova"}'
JSON Payload
The request body requires the model, input, and voice fields. You can optionally specify response_format, speed, and language. Ensure your text stays within the 4096-character limit per request to avoid truncation.
Response Handling
A successful response returns the audio file directly in the body with a content-type matching your chosen format (e.g., mp3, wav). Failed requests return a JSON error object, and no characters are deducted from your balance if synthesis fails.
Using OpenAI SDK
Using the official OpenAI SDK simplifies integration by leveraging familiar client libraries. Since our API mimics the OpenAI speech endpoint structure, you can reuse existing code with minimal adjustments. This approach is ideal for teams already comfortable with Python or Node.js environments, reducing the learning curve for new developers.
You only need to change the base_url to point to our infrastructure. The rest of the request shape remains identical, allowing your game’s audio pipeline to process text scripts into audio files without rewriting core logic.
Client Configuration
Initialize the client using your API key. Ensure the environment variable or configuration file holds the key securely. No additional headers are required beyond standard authentication.
- Install the official OpenAI library via pip or npm.
- Import the
Audiomodule from the library. - Set the API key in your environment variables.
Base URL Override
Point the client to https://api.wau88.cc/v1. This single change redirects all requests to our infrastructure while maintaining compatibility with the OpenAI SDK interface.
Verify the base URL includes the /v1 prefix to ensure correct endpoint routing.
- base_url: "https://api.wau88.cc/v1"
Code Snippets
Use the standard audio.speech.create method. Pass your text, voice preset, and desired format. The SDK handles the HTTP request and returns the audio stream or file.
Handle responses as you would with any OpenAI-compatible service. The SDK parses the binary audio data for easy saving or playback.
Note: SDK compatibility is based on endpoint shape, not brand affiliation.
- client = OpenAI(base_url="https://api.wau88.cc/v1", api_key="tts-...")
- audio = client.audio.speech.create(model="tts-1", voice="nova", input="Hello world", response_format="mp3")
- with open("output.mp3", "wb") as f:
- f.write(audio.content)
Handling Responses
Once the API returns a 200 status, the response body contains the raw audio binary. This data must be handled as a binary stream rather than JSON, ensuring no character encoding corruption occurs during transfer. The response headers provide the content type, which varies based on your chosen response_format.
Saving this binary data directly to disk creates the final voice asset. Ensure your storage pipeline preserves the exact byte sequence received. This step ensures the audio file is ready for import into your game engine or LMS player.
Binary Data Reception
The API returns raw audio bytes. Do not parse the body as JSON; treat it as a binary stream. This ensures the audio file remains intact regardless of the format selected, such as MP3 or WAV.
Verify the Content-Type header matches your requested format. If the response indicates an error, the body will contain a JSON object with an error field instead of audio data.
- Response body is raw audio bytes.
- Content-Type indicates the file format.
- Error responses return JSON, not audio.
File Saving
Write the received binary data to a file with the correct extension (e.g., .mp3, .wav, .opus). Use your language’s binary file handling capabilities to avoid truncation or corruption.
Store the file in your designated asset directory. This ready-to-use file can now be linked directly to character scripts or dialogue trees in your production pipeline.
- Save with the correct file extension.
- Use binary write mode.
- Verify file size matches expectations.
Error Parsing
If synthesis fails, the API returns a non-200 status code with a JSON error object. Parse this object to retrieve the code and message for debugging.
Common errors include invalid voice IDs or rate limits. Log these messages to help your team troubleshoot issues without stopping the entire generation pipeline.
Failed requests are free, so no credit is deducted even if an error occurs. Handle these gracefully to avoid unnecessary retries.
- Check HTTP status codes.
- Parse JSON error objects.
- Log error codes for debugging.
- Failed requests do not charge credit.
Voice Selection Strategy
Choosing the right voice is critical for game audio narration, where character personality drives immersion. Our API offers eight distinct presets designed to match specific narrative roles, from warm narrators to deep documentary styles. By selecting the appropriate voice, you ensure that each character’s audio line feels authentic and consistent with the script’s tone.
We provide detailed voice descriptions to help you map characters to the correct preset. This strategy simplifies the workflow for large teams, allowing you to generate diverse dialogue without managing infrastructure or custom voice designs.
Matching Tone to Character
Start by defining the emotional arc of each character. Use the warm, clear narrator tone of Aria for exposition, or the energetic promo style of Felix for action sequences. Matching the voice to the script’s mood ensures players connect with the story.
For conversational dialogue, Milo’s friendly tone works well, while Atlas provides a neutral backdrop for news-style updates. Reserve Orion’s deep, documentary style for lore entries or serious narrative moments.
- Aria: Warm, clear narrator
- Felix: Energetic, promo
- Milo: Friendly, conversational
- Orion: Deep, documentary
Using Presets
We offer eight presets based on licensed recordings from LibriVox. These voices are ready to use immediately without additional training or cloning. Simply pass the voice ID in your API request to generate the audio file.
Each voice supports all 23 languages, allowing you to maintain consistent character voices across different language versions of your game. This eliminates the need for separate voice direction for each locale.
- 8 distinct presets available
- No voice cloning needed
- Supports 23 languages
- Licensed LibriVox recordings
Consistency Across Lines
To maintain character consistency, stick to one voice ID per character across all requests. Since we do not offer custom voice cloning, relying on the existing presets ensures uniformity without technical complexity.
Use the speed parameter (0.25–4.0) to adjust pacing without changing the voice identity. This helps align audio with animation timing while keeping the character’s tone recognizable throughout the game.
- Use one voice per character
- Adjust speed with parameter
- Maintain tone consistency
- No custom cloning needed
Language Configuration
Explicitly setting the language parameter ensures accurate pronunciation, especially when your game scripts contain Latin-script text that isn't English. Without it, the model defaults to English, which may mispronounce names or specific terms.
Our API supports 23 languages, allowing any voice to speak any supported language. This flexibility is crucial for diverse game worlds where characters might speak different tongues without needing voice actor recasts.
Setting ISO Codes
Pass the ISO 639-1 code in the request body to lock the language. This overrides auto-detection and guarantees consistent output across all voice lines, regardless of the input text's script.
For example, sending "language": "fr" ensures French pronunciation even if the text contains English loanwords. This is essential for maintaining character integrity in multilingual RPGs.
- Supported codes include: ar, zh, da, nl, en, fi, fr, de, el, he, hi, it, ja, ko, ms, no, pl, pt, ru, es, sw, sv, tr
Auto-Detection Limits
If you omit the language field, the system guesses based on the script. Latin text defaults to English, which can cause errors for other Latin-based languages like Spanish or Italian.
Non-Latin scripts like Arabic or Chinese are detected automatically, but explicit codes are safer for mixed-language dialogue to avoid ambiguous interpretations.
Multi-Language Projects
You can mix languages in a single project by setting the correct code per request. Each voice preset can handle all 23 languages, so you don't need separate voice lines for each language.
Just ensure you split longer texts into chunks under 4096 characters to maintain audio quality and consistent language delivery across scenes.

Speed and Format Options
Adjusting playback speed allows you to fine-tune character pacing without re-generating audio, with a range from 0.25x to 4.0x. This is useful for creating exaggerated comedic timing or slow, ominous dialogue in narrative-driven games.
Adjusting Playback Speed
The speed parameter accepts values between 0.25 and 4.0, allowing precise control over delivery rate. This feature is ideal for emphasizing emotion or adjusting character personality without altering the voice preset itself.
Choosing Audio Formats
Select from mp3, wav, opus, flac, or pcm based on your engine’s requirements. MP3 offers small file sizes for fast loading, while WAV and FLAC provide lossless quality for high-fidelity narration. PCM is suitable for raw audio processing pipelines.
- MP3: Common format for general use and smaller assets.
- WAV/FLAC: Ideal for uncompressed, high-quality voice lines.
- OPUS: Efficient format for smaller file sizes.
Quality vs Size
The model parameter (tts-1 or tts-1-hd) determines audio fidelity, with both priced equally. Higher quality models may produce richer sound but do not affect file size directly, which is driven by the chosen response_format. Balance file storage limits with audio clarity for optimal player experience.
Rate Limit Management
Rate limits protect the service during peak generation times. Your API key allows 60 requests per minute once funded, but starts at 10 requests per minute until your first top-up. Knowing these boundaries helps prevent unexpected pauses in your character voice line pipeline.
Understanding these constraints allows your team to schedule bulk narration tasks efficiently, ensuring smooth integration with your game’s audio engine without overwhelming the server or hitting hard caps during critical development sprints.
Understanding Limits
Each API key is capped at 60 requests per minute after the initial funding. Before the first top-up, the limit is stricter at 10 requests per minute. This baseline ensures stable service for all users generating character dialogue at scale.
- 60 requests/minute after first top-up
- 10 requests/minute before first top-up
- Limits reset on a rolling minute basis
Burst Handling
When generating large batches of voice lines, avoid sending all requests simultaneously. Instead, implement a simple delay between calls to stay within the per-minute cap. This prevents rejection of valid requests due to temporary oversubscription.
Queue Behavior
Requests are processed sequentially. Under load, a request may wait in a queue before synthesis begins. Typical speed is roughly real-time (25 characters per second), but short phrases may take a few seconds to generate. Plan your pipeline to accommodate these slight delays.
Testing Your Integration
Testing ensures your pipeline handles the API’s synchronous nature correctly. Since requests are processed sequentially and long texts may queue, verify that your integration waits for completion before proceeding to the next voice line generation step.
Local Testing
Start by sending short text samples (under 4096 characters) to confirm basic connectivity. Use the provided curl example to verify that you receive valid audio files in your chosen format, such as MP3 or WAV.
- Verify character counting matches expectations, including spaces and punctuation.
- Check that the response header contains the correct audio format.
Staging Environment
Simulate a realistic game asset workflow by generating multiple voice lines in sequence. Observe how the system handles sequential processing delays, which typically average around 25 characters per second for long texts.
- Test speed adjustments between 0.25 and 4.0 to match character pacing.
- Ensure your script correctly joins split audio parts for texts exceeding 4096 characters.
Production Readiness
Monitor your 60 requests-per-minute limit under realistic load. Ensure your team’s generation pipeline respects this cap to avoid queuing delays during bulk asset creation. Remember that failed requests are free, but successful ones consume your balance.
Troubleshooting Common Issues
When integrating TTS for game audio, authentication and rate limits are the most frequent hurdles. Ensure your API key is active and correctly formatted, as a new key immediately invalidates the old one. Verify that your requests include the correct Bearer token header.
Authentication Errors
Check that your key starts with tts- and is sent via the Authorization: Bearer header. If you rotated your key recently, ensure your code is using the new one, as the old key stops instantly.
- Ensure key prefix is 'tts-'
- Use Authorization: Bearer header
- Rotate keys only if needed
Rate Limit Exceeded
You have 60 requests per minute after initial top-up. If you exceed this, requests queue or fail. Monitor your usage dashboard to adjust batch sizes. Failed requests do not consume credits, but they do count against rate limits temporarily.
- Limit: 60 req/min
- Queue behavior under load
- Failed requests are free
Invalid Voice ID
Use GET /v1/voices to confirm available IDs. Ensure the voice ID matches the language setting. Mismatched language codes can cause synthesis failures or unexpected default language guesses.
- Check /v1/voices endpoint
- Match voice to language
- Verify ISO codes
Best Practices for Teams
Large game audio teams often generate hundreds of character lines daily. Caching repeated voice lines prevents redundant API calls and keeps costs predictable. Since generated audio is not stored server-side, you must handle persistence locally or in your asset pipeline to avoid re-synthesizing identical text.
Caching Strategies
Store audio files by hashing the input text, voice, speed, and format. This ensures consistent results while minimizing unnecessary requests. For dynamic games, consider caching variations of the same line with different emotional presets or speeds if your pipeline supports it.
- Hash combined parameters (text, voice, speed, format) as cache keys.
- Store results in your game’s asset bundle or CDN.
- Invalidate cache only when text or parameters change.
Batch Processing
Split large scripts into chunks of 4096 characters to stay within request limits. Process these batches sequentially or with controlled parallelism to respect the 60 requests per minute limit. This approach prevents throttling during bulk narration generation for open-world titles.
- Limit input text to 4096 characters per request.
- Process requests sequentially or with controlled parallelism.
- Respect the 60 requests per minute rate limit per key.
Monitoring Usage
Track character counts and request status via the dashboard to forecast costs. Failed requests are free, so monitor error rates to distinguish between network issues and invalid inputs. Regularly review usage to ensure your key rotation policy aligns with team size and project scale.
- Monitor character counts against your balance.
- Check error rates to identify invalid inputs.
- Rotate keys as needed for security without losing usage history.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Select the preset that best embodies your brand's personality and stick with it for consistency across all content.
23 languages
Any voice speaks any of these languages.
