Frequently asked questions
Does the API support SSML for emphasis?
No, the API does not support SSML. It accepts plain text input up to 4096 characters. You control pacing and tone using the speed parameter (0.25–4.0) and by selecting specific voice presets like sage for calm or felix for energetic dialogue. There are no SSML tags for emphasis or pauses.
Can I clone a specific voice for a main character?
No, custom voice cloning is not offered. You must choose from eight preset voices: aria, nova, luna, sage, felix, milo, atlas, or orion. These are based on licensed recordings from LibriTTS-R and LibriVox. You cannot upload your own audio to create a unique voice model for a specific character.
Is the speech generated in real-time or pre-rendered?
The API is not real-time streaming; it is a standard HTTP endpoint. You send a POST request and receive the audio file upon completion. Generation takes roughly real-time duration (25 characters per second), but requests are processed sequentially, so latency depends on queue load and network speed.
Do the voices sound robotic or human-like?
The voices are based on licensed recordings from LibriTTS-R and LibriVox public-domain audiobook readings. They are designed to sound natural and human-like. Each generated file contains an inaudible watermark marking it as synthetic speech, but the audio quality is intended for clear, realistic NPC dialogue without obvious robotic artifacts.
What happens if my internet connection drops during generation?
The API processes requests server-side. If your connection drops after the request is sent, the synthesis continues. Failed requests are free, and charges are only applied when the audio file is successfully generated and returned in the response.
Are the voices royalty-free for commercial games?
The voices are based on LibriTTS-R (CC BY 4.0) and LibriVox public-domain readings. You pay for the synthesis service per character. There are no additional licensing fees or royalty obligations for using the generated audio in commercial games, as the base recordings are public domain or CC BY 4.0.
Can I change the speed of the dialogue for cutscenes?
Yes, you can adjust the speed parameter between 0.25 and 4.0. This allows you to slow down narration for cutscenes or speed up quick NPC interactions. The default speed is 1.0. Adjusting speed affects the duration of the generated audio file directly within the API request body.
Is there a limit to the number of voices I can use?
No, there is no limit to the number of distinct voices you can use. You have eight presets: aria, nova, luna, sage, felix, milo, atlas, and orion. You can switch between any of these voices in your requests as needed for different characters without any additional constraints or fees.
Do I need to download a SDK to use the API?
No, you do not need to download a specific SDK. 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.playgperya.com/v1, or use plain HTTP requests with your Bearer token for authentication.
How do I handle text longer than 4096 characters?
You must split the text into parts of up to 4096 characters each. Send multiple requests for each part and then join the resulting audio files client-side. The API does not handle long-form text natively; splitting is your responsibility to ensure the input fits within the character limit per request.
Is there a free trial available for developers?
Yes, signing in with Google provides $0.50 of credit (about 50,000 characters) valid for 7 days. Accounts created with email and password start without trial credit. You can top up with USDT on TRON to continue using the service after the trial or initial credit is exhausted.
Can I use the API for voiceovers in YouTube videos?
Yes, the API generates audio files that can be used in any media, including YouTube videos. The base recordings are from public domain or CC BY 4.0 sources. You pay for the synthesis per character. There are no restrictions on the type of content you create with the generated audio.
What languages are supported for dialogue?
The API supports 23 languages: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Any voice can speak any of these languages. If language is not set, it defaults to English for Latin script.
Do you offer bulk discounts for large game studios?
No, there are no bulk discounts or volume-based pricing tiers. The price is flat at $10 per 1 million characters ($0.01 per 1,000 characters). There are no monthly plans, seats, or minimum spend requirements. Pricing is consistent regardless of usage volume or studio size.
First request
curl
curl https://api.playgperya.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.mp3NPC-ready synthesis API
NPC Audio delivers a cloud-based text-to-speech API designed for game dialogue. We handle the synthesis engine so you can focus on narrative design and integration, ensuring consistent character voices across your project without licensing overhead.
Consistent character voices
Assign specific presets like Aria or Orion to characters. The engine maintains vocal consistency, allowing seamless integration into your game’s audio pipeline.
- 8 distinct voice presets available
- Consistent tone across requests
Script-to-audio pipeline
Send JSON bodies with text input and receive audio files directly. Split longer texts into 4096-character segments and join the resulting audio files for continuous dialogue.
Developer-first integration
Use the standard OpenAI SDK by changing the base URL to https://api.playgperya.com/v1. Standard HTTP status codes and JSON responses fit directly into your existing codebase.
- OpenAI SDK compatible
- Standard HTTP responses
Voices for any character type
NPC Audio provides eight distinct voice presets designed to cover the full spectrum of game dialogue needs. Each voice is derived from licensed LibriTTS-R recordings, ensuring consistent character identity across your project without complex audio engineering.
Select a voice that matches your character’s archetype. The engine handles the synthesis, delivering clear, consistent audio files ready for immediate integration into your game engine.
Warm narrator (aria)
Aria offers a warm, clear narrative tone ideal for exposition, lore entries, or guiding protagonists through complex storylines.
- Best for: Story narration, tutorial guides, calm AI companions
Energetic promo (felix)
Felix brings high energy and enthusiasm, perfect for shopkeepers, quest givers, or dynamic announcers.
- Best for: Quest announcements, shop interfaces, energetic side characters
Deep documentary (orion)
Orion delivers a deep, authoritative voice suitable for historical logs, ancient artifacts, or serious antagonist monologues.
- Best for: Historical logs, villain monologues, serious cutscenes

Supported formats and languages
NPC Audio supports five audio formats for seamless integration into your game engine: MP3, WAV, FLAC, Opus, and PCM. These options cover compressed delivery, lossless quality, and raw data needs without requiring external conversion steps.
The API supports 23 languages, including English, Japanese, and Spanish. Each voice preset can speak any supported language, allowing you to maintain consistent character timbres across different linguistic assets.
MP3, WAV, FLAC, Opus, PCM
Choose the format that best fits your pipeline. MP3 and Opus are efficient for delivery, while WAV and FLAC provide lossless quality for cinematic sequences. PCM is available for direct raw audio ingestion.
23 languages including English, Japanese, Spanish
We support Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Other languages like Vietnamese or Thai are not supported.
- Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
Automatic language detection or explicit setting
If you do not set the language field, the API guesses the language from the text script. Latin-script text defaults to English. For non-English Latin text, explicitly set the language parameter to ensure correct pronunciation.
Developer workflow
Integrate NPC Audio into your game engine using standard HTTP requests or the official OpenAI Python SDK. By overriding the base_url to https://api.playgperya.com/v1, you can reuse existing client code with minimal changes.
The API accepts JSON payloads and returns standard HTTP status codes. This predictable structure allows for straightforward error handling and integration into existing CI/CD pipelines without custom adapters.
OpenAI SDK compatible
Use the OpenAI Python SDK by setting base_url="https://api.playgperya.com/v1" and providing your API key. The request shape matches the OpenAI speech endpoint exactly, allowing immediate drop-in replacement for existing TTS logic.
- Reuses existing OpenAI client implementations
- Minimal code changes for migration
JSON request body
Send a POST request with a JSON body containing model, input, voice, and optional parameters like speed or language. The API returns the audio file directly in the response body.
- Standard JSON payload structure
- Supports all 8 voice presets
Standard HTTP status codes
The API returns standard HTTP status codes (200 for success, 4xx/5xx for errors) and the audio file. This allows for robust error handling in your game’s audio system, ensuring smooth playback even when synthesis fails.
Licensing and data
NPC Audio uses voices derived from the LibriTTS-R dataset (CC BY 4.0) and public-domain LibriVox readings, providing a clear licensing foundation for game dialogue. Every generated file contains an inaudible watermark identifying it as synthetic speech.
LibriTTS-R licensed voices
We rely on licensed recordings from the LibriTTS-R dataset and LibriVox public-domain audiobook readings. This gives you consistent, high-quality character voices without the overhead of negotiating individual voice actor rights for every NPC line.
- Voices based on LibriTTS-R (CC BY 4.0)
- Includes inaudible synthetic speech watermark
- No complex attribution tracking required
Input text not used for training
Your script content is used solely to produce the audio file for that specific request. We do not use your input text to train or improve our synthesis models.
Audio returned in response, not stored
Generated audio is returned directly in the API response and is not stored on our servers after delivery. We retain only request metadata (time, characters, status) for billing purposes.

Pricing structure
NPC Audio charges $10 per 1 million characters processed. You only pay for successful synthesis; if the engine fails to generate audio, the request is free and no charge is applied to your balance.
$10 per 1 million characters
Pricing is straightforward: $0.01 per 1,000 characters. There are no monthly plans, seats, or minimum spend requirements. Your balance does not expire, allowing you to top up only when needed.
Space and punctuation count
Every character in your input string contributes to the total. This includes spaces, punctuation marks, and special characters. Ensure your text length stays within the 4,096 character limit per request to avoid fragmentation.
Failed requests are free
If synthesis fails, the charge is returned in full. The API returns a standard HTTP error code, and the request count is deducted from your rate limit but not your balance.
Performance and limits
The API enforces a strict rate limit of 60 requests per minute per key. New accounts start with 10 requests per minute until the first top-up is processed. Requests are processed sequentially, so under load, synthesis may queue slightly behind the initial request.
60 requests per minute
Each API key supports up to 60 requests per minute. If you exceed this limit, subsequent requests will be rejected until the window resets. This limit ensures consistent performance for background voice generation during asset creation pipelines.
- Standard limit: 60 req/min per key
- Initial limit: 10 req/min for new accounts
- Limits reset every 60 seconds
4096 character input limit
Each API call accepts a maximum of 4096 characters of text. For longer dialogues, split your script into chunks under this limit and concatenate the resulting audio files. Spaces and punctuation count toward this character limit.
- Maximum input: 4096 characters
- Split longer texts into multiple requests
- Concatenate output files for full dialogue
Real-time speed on long texts
Synthesis generates audio at roughly real-time speed for long texts, approximately 25 characters per second of generated audio. Short phrases may take a few seconds to process due to startup overhead. Requests are processed one after another, so queueing may add slight latency during high load.
- Generation speed: ~25 chars/sec
- Short phrases: a few seconds latency
- Sequential processing under load
Integration examples
NPC Audio uses the standard OpenAI-compatible endpoint, allowing you to integrate voice synthesis directly into your game’s audio pipeline with minimal code changes. The API returns audio files in the response body, ensuring seamless compatibility with existing HTTP clients and SDKs.
Below are concrete examples demonstrating how to generate speech in Python and via command line, along with a strategy for assigning consistent voices to specific character roles.
Python SDK snippet
Use the official OpenAI Python library, pointing to our base URL. Replace YOUR_API_KEY with your key from /get-api-key/.
```python import openai client = openai.OpenAI(base_url="https://api.playgperya.com/v1", api_key="tts-...") audio = client.audio.speech.create( model="tts-1", voice="aria", input="The quest begins at dawn.", response_format="mp3" ) audio.stream_to_file("output.mp3") ```
cURL command example
Send a POST request with JSON body. This works for any language supported by the API.
```bash curl https://api.playgperya.com/v1/audio/speech \ -H "Authorization: Bearer tts-..." \ -H "Content-Type: application/json" \ -d '{"model": "tts-1-hd", "voice": "milo", "input": "Welcome, traveler.", "response_format": "wav"}' \ -o speech.wav ```
Voice selection by role
Assign voices based on narrative function. Use aria for consistent narration, felix for energetic shopkeepers, and orion for deep lore entries.
Ensure voice consistency across dialogue trees by hardcoding the voice parameter for each character ID in your game engine.
- Female: aria (narrator), nova (upbeat), luna (storytelling), sage (instructional)
- Male: felix (promo), milo (conversational), atlas (news), orion (documentary)

Why NPC Audio
NPC Audio strips away recurring billing complexity. You pay only for the characters you synthesize, with no monthly plans or hidden seat fees. Your balance never expires, allowing you to scale voice production exactly as your narrative needs dictate.
No monthly plans
We operate on a straightforward pay-as-you-go model. There are no minimum spends, no subscriptions, and no recurring charges. You simply fund your account, generate audio, and pay only for what you use. This structure eliminates waste if your project has fluctuating dialogue volumes.
- No monthly subscriptions
- No minimum spend
- No recurring seat fees
USDT top-up only
Funding is handled exclusively via USDT on the TRON network (TRC-20). There are no credit cards, no PayPal, and no invoices with VAT. Transfers are credited automatically within minutes. This method ensures instant account funding without the friction of traditional payment gateways.
- USDT (TRC-20) only
- No credit cards or PayPal
- Automatic credit within minutes
Email support only
We maintain a lean operational model by offering support exclusively via email. There is no phone number, no live chat, and no SLA. This allows us to keep infrastructure costs low and pass those savings directly to you as a lower per-character rate.
- Email support only
- No phone or live chat
- No SLA or uptime guarantee
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. The game developer hired a freelancer to voice the quirky NPCs in their new fantasy title.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- openai-node on GitHub
- LibriVox public-domain audiobooks
- LibriTTS-R paper (arXiv 2305.18802)
- OpenAI API reference: create speech
- IETF RFC 7845: Ogg Opus
- Python documentation
- Node.js documentation
- ISO 639 language codes
- W3C WAI: making audio and video accessible
- FFmpeg documentation
- Creative Commons Attribution 4.0
