Text-to-Speech API for Indie Game Dialogue

By SpriteVoice editorial team · Updated 2026-11-18

SpriteVoice is a cloud text-to-speech API designed specifically for indie game developers who need to turn dialogue scripts into NPC voice lines without hiring voice actors. Send plain text via a simple JSON request and receive high-quality audio files on demand, allowing you to iterate on your game's audio without breaking the budget.

Our API supports 23 languages and eight distinct voice presets, from warm narrators to deep documentary tones. Whether you are building a cozy story or a fast-paced shooter, you get developer-friendly integration with OpenAI SDKs, transparent pricing at $0.01 per 1,000 characters, and a free trial to start generating audio immediately.

Text-to-Speech API for Indie Game Dialogue

Frequently asked questions

Is the text to audio online free service really free?

Yes, signing in with Google gives you a $0.50 free trial valid for 7 days, covering about 50,000 characters. Accounts created with email and password start without trial credit. After the trial or credit runs out, you pay $0.01 per 1,000 characters. There are no monthly plans or hidden fees.

How many characters can I send in one request?

You can send up to 4096 characters per request. For longer dialogue scripts, split the text into parts of this size and join the resulting audio files. Spaces and punctuation count toward the character limit. This ensures efficient processing while maintaining the quality of your NPC voice lines.

Can I use these voices in my commercial game?

The voices are based on licensed recordings from LibriTTS-R (CC BY 4.0) and public-domain audiobook readings. Generated audio files are returned in the response and not stored by us. You can use the output in your commercial projects.

What languages are supported for NPC dialogue?

We support 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 you do not set the language, it defaults to English for Latin script.

Does the API support speed adjustments for NPCs?

Yes, you can adjust the speech speed between 0.25 and 4.0. This allows you to create energetic promo lines or calm instructional dialogue. Simply include the speed parameter in your JSON request body. The API accepts standard OpenAI SDK formats, making integration into your game engine straightforward.

What audio formats are available for game engines?

We support mp3, wav, opus, flac, and pcm formats. Choose the format that best fits your game engine’s requirements. MP3 is efficient for storage, while WAV offers uncompressed quality. All generated files include an inaudible watermark to mark them as synthetic speech, ensuring clear attribution if required.

How do I top up my account with USDT?

Top up using USDT on the TRON network (TRC-20) only. The minimum amount is $5. Credits are automatically added to your balance within minutes after your transfer is confirmed. We do not accept credit cards, PayPal, or subscriptions. Your balance does not expire, so you can top up as needed.

Is my input text used for training the model?

No, your input text is used only to produce the audio and is not used for training. Generated audio is returned in the response and not stored by us. We keep request metadata like time, characters, and status for billing purposes. Your dialogue scripts remain private and secure.

Can I get a refund if synthesis fails?

Yes, failed requests are free. If synthesis fails, the charge is returned in full to your account balance. You do not need to contact support for this. Simply retry the request or adjust your parameters. This ensures you only pay for successfully generated audio files.

How fast is the text to audio generation?

Generation takes roughly real time on long texts, about 25 characters per second. Short phrases may take a few seconds. Requests are processed one after another, so under load, a request may wait in a queue. Typical speed is sufficient for most indie game dialogue workflows.

Do I need an account to try the API?

Yes, you need an account to access the API. Sign up on the /get-api-key/ page using Google or email. Google sign-ins receive a $0.50 free trial. Email accounts start without trial credit. Your API key and balance are visible on the dashboard for easy monitoring.

What happens if I exceed the rate limit?

The limit is 60 requests per minute per key (10 per minute before the first top-up). If you exceed this, requests may queue or fail. You can issue a new key to reset limits, as each account has one active key. Monitor your usage in the dashboard.

Can I use the same voice for multiple characters?

Yes, you can assign any of the 8 preset voices to any NPC. Choose from female voices like Aria or Nova, or male voices like Felix or Milo. Each voice has a distinct tone, allowing you to create diverse character personalities without hiring additional voice actors for your game.

Is there a limit to how many requests I can make?

There is no limit to the total number of requests you can make, only a rate limit of 60 requests per minute. You can process as much text as your balance allows. Split long texts into 4096-character chunks and join the audio files for seamless NPC dialogue.

First request

curl

curl https://api.ab777game.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.mp3

Voice Your Game Without the Studio Cost

Sound wave illustration for: Voice Your Game Without the Studio Cost

Turn your dialogue scripts into NPC voice lines instantly. Send text to our API and receive high-quality audio files ready for your game engine, eliminating the need for studio bookings.

No voice actors required for every line. Generate diverse character voices on demand, allowing you to iterate on your script without breaking the budget.

Instant NPC Dialogue Generation

Instant NPC Dialogue Generation

Receive audio files directly via API response. Our cloud service processes requests sequentially, with typical generation speeds matching real-time for long texts, so you can prototype audio workflows efficiently.

  • JSON API compatible with OpenAI SDKs
  • Support for MP3, WAV, OPUS, FLAC, PCM formats

No Voice Actor Required

Access 8 distinct presets from warm narrators to deep documentary tones. Each voice is based on licensed recordings, ensuring consistent quality across hundreds of lines without hiring talent.

Generate variations without recurring fees. Pay only for what you use, keeping your production costs predictable and low for indie budgets.

Iterate on Dialogue Scripts

Change a word or tone and regenerate in seconds. Test multiple voice options for the same character by switching presets like Aria, Felix, or Luna to find the perfect fit.

Adjust speed from 0.25x to 4.0x to match character animations or emotional states. Split longer texts into parts under 4096 characters for precise control over pacing.

  • Adjustable speed control
  • Split long texts easily

8 Distinct Voices for Diverse Characters

Sound wave illustration for: 8 Distinct Voices for Diverse Characters

Choose from eight distinct presets to give your NPCs unique personalities. Each voice is based on licensed recordings from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobook readings.

Our voices support all 23 languages, allowing you to create diverse characters for global gaming communities. You can easily switch between warm narrators and deep documentary tones to match your game's atmosphere.

Female: Aria, Nova, Luna, Sage

Aria offers a warm, clear narration style perfect for story-driven games. Nova brings a bright, upbeat energy ideal for lively interactions. Luna provides a soft, storytelling voice for emotional scenes, while Sage delivers calm, instructional dialogue for tutorials or guides.

  • Aria: Warm, clear narrator
  • Nova: Bright, upbeat
  • Luna: Soft, storytelling
  • Sage: Calm, instructional

Male: Felix, Milo, Atlas, Orion

Felix is energetic and great for promotional in-game ads. Milo sounds friendly and conversational, perfect for side quests. Atlas provides a neutral, news-style tone for announcements, and Orion offers a deep, documentary voice for lore or historical contexts.

  • Felix: Energetic, promo
  • Milo: Friendly, conversational
  • Atlas: Neutral, news
  • Orion: Deep, documentary

Warm Narrators to Deep Documentaries

Our voices are based on licensed recordings from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobook readings. This ensures that your NPC dialogue sounds professional and authentic, enhancing the immersion of your game without breaking the budget.

Support for Global Gaming Communities

Sound wave illustration for: Support for Global Gaming Communities

SpriteVoice supports 23 languages, enabling indie devs to localize dialogue efficiently. From Arabic to Swahili, cover diverse gaming communities without hiring multiple voice actors.

23 Languages Supported

Our API handles Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Each voice can speak any of these languages, ensuring consistent quality across your game’s global release.

  • Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish

Arabic, Indonesian, and More

Note: We currently support Arabic but not Indonesian, Thai, or Vietnamese. Always verify your target language is in our supported list before generating assets.

Automatic Language Detection

The API guesses the language from the script’s script (e.g., Latin defaults to English). For non-English Latin-script text, set the language parameter explicitly to ensure accurate pronunciation.

Developer-Friendly API Integration

Sound wave illustration for: Developer-Friendly API Integration

Integrate SpriteVoice directly into your game’s audio pipeline using standard HTTP requests. Our API endpoint mirrors the OpenAI speech structure, allowing you to reuse existing SDK clients by simply updating the base URL to https://api.ab777game.com/v1. This compatibility means you can generate NPC dialogue with minimal code changes, leveraging tools you already know.

OpenAI SDK Compatible

Use the official OpenAI SDKs by pointing them to our API base URL. Pass your Bearer token in the Authorization header, and your existing Python or Node.js clients will work seamlessly. This reduces integration time, letting you focus on game logic rather than parsing custom response formats.

  • Compatible with official OpenAI SDKs
  • Standard Bearer token authentication
  • No proprietary client library required

Simple JSON Requests

Send a straightforward POST request with your dialogue text, selected voice, and desired format. The API returns the audio file directly in the response body. For longer scripts, split the text into chunks under 4096 characters and concatenate the resulting audio files in your game engine.

  • POST to /v1/audio/speech
  • JSON body with model, input, and voice
  • Direct audio file response

Multiple Audio Formats

Choose the output format that best fits your engine’s audio pipeline. We support MP3, WAV, OPUS, FLAC, and PCM. Selecting the right format helps balance file size and quality, ensuring your NPC lines load quickly without compromising audio clarity.

  • MP3, WAV, OPUS, FLAC, PCM
  • Optimize for engine compatibility
  • Balance quality and file size

Start with a Free Trial

Sound wave illustration for: Start with a Free Trial

Kickstart your game's audio pipeline with zero financial risk. Upon signing in with Google, you instantly receive $0.50 in free credit, granting you approximately 50,000 characters to test the API's quality and speed.

$0.50 Credit on Sign-up

This trial balance lets you generate dialogue for multiple NPCs or test different voices without spending a dime. It is the perfect way to verify that the synthesized speech fits your game's tone before committing to larger projects.

  • Approximately 50,000 characters of generation time
  • Immediate access upon Google sign-in

7 Days Validity

Your trial credit remains active for seven days, giving you ample time to experiment with different voices, speeds, and formats. If you need more characters after the trial, you can top up seamlessly.

No Credit Card Needed

Start testing your NPC dialogue scripts immediately without linking a payment method. You only pay when you decide to expand your library via USDT top-up.

Start with a Free Trial

Transparent Pricing for Indie Budgets

Sound wave illustration for: Transparent Pricing for Indie Budgets

Game audio doesn't need to break the bank. SpriteVoice charges just $0.01 per 1,000 characters, with spaces and punctuation counting toward the total. You pay only when synthesis succeeds; failed requests are refunded in full, so you never waste credits on errors.

$0.01 per 1000 Characters

Generate NPC dialogue in bulk. Whether you are scripting a single quest or an entire open-world city, the rate stays flat. Long texts are split into 4,096-character chunks and stitched together automatically.

Pay Only for Success

If the API returns an error, you are not charged. This protects your indie budget from wasted attempts during development. Your balance only decreases when audio files are successfully generated and delivered.

USDT Top-up Available

Top up your account with USDT on the TRON network (TRC-20). Minimum deposit is $5, and credits appear automatically within minutes. No credit cards, no subscriptions, and no VAT invoices to manage.

  • Minimum top-up: $5
  • Network: TRON (TRC-20)
  • Automatic credit within minutes
  • No monthly plans or seats

Technical Specs for Game Engines

Sound wave illustration for: Technical Specs for Game Engines

Generate audio files in the formats your game engine prefers, including MP3, WAV, OPUS, FLAC, or raw PCM. Each request returns a single audio file ready for immediate playback or further processing in your pipeline.

MP3, WAV, OPUS, FLAC, PCM

Choose the output format that best fits your storage and bandwidth constraints. MP3 offers high compression for smaller file sizes, while WAV provides uncompressed quality. OPUS and FLAC balance quality and size, and PCM is raw audio data.

  • MP3: Standard compression, widely supported
  • WAV: Uncompressed, high fidelity
  • OPUS: Efficient for streaming
  • FLAC: Lossless compression
  • PCM: Raw audio data

Speed Control 0.25x to 4.0x

Adjust the speech rate to match the pacing of your characters or scenes. Speed ranges from 0.25x for slow, deliberate dialogue to 4.0x for rapid-fire exchanges. This control helps maintain narrative flow without requiring manual editing of audio timing.

Character Limit 4096 per Request

Each API request supports up to 4096 characters. For longer dialogues, split the text into chunks and concatenate the resulting audio files. This ensures consistent quality and manageable processing times, keeping your game's audio assets organized and efficient.

Why Indie Devs Choose Us

Sound wave illustration for: Why Indie Devs Choose Us

Indie developers need tools that scale with their budget, not against it. SpriteVoice removes the risk of recurring costs, letting you allocate funds directly to game assets rather than software subscriptions. Our pricing model is designed for variable development cycles, ensuring you only pay for what you actually use.

No Monthly Subscriptions

We don’t lock you into monthly plans or seat limits. Whether you are prototyping a small dialogue tree or generating audio for a full release, your costs remain predictable and tied directly to usage. This flexibility is crucial for indie teams managing cash flow during development spikes.

  • Pay-as-you-go model
  • No minimum spend requirements
  • No seat limits

No Hidden Fees

Every character counts, and we charge transparently. You pay only for successful synthesis, with failed requests refunded in full. There are no surprise charges for format conversions or extra API calls. Your balance does not expire, so you can pause development and resume later without losing your credit.

  • $0.01 per 1,000 characters
  • Free failed requests
  • USDT top-up only

Fast Generation Times

Game audio iteration requires speed. Our API processes requests sequentially, delivering audio in roughly real-time for long texts. While short phrases may take a few seconds, the system handles queues efficiently, allowing you to generate dozens of voice lines quickly during testing phases without waiting for external studio slots.

  • Real-time generation for long texts
  • Efficient queue processing
  • Audio delivery after queue processing

Get Your API Key Now

Sound wave illustration for: Get Your API Key Now

Create your account using your Google credentials to instantly receive a $0.50 trial credit, valid for 7 days. No credit card is required to begin, and you can start generating NPC dialogue immediately.

Sign Up with Google

Visit the /get-api-key/ page and click the Google sign-in button. Your account is created instantly, and you receive a unique API key along with your initial trial balance.

Get Instant Access

Upon registration, you are assigned one active API key. You can issue a new key at any time, which immediately invalidates the old one, ensuring your credentials are always secure.

Start Generating Audio

Use your key to make POST requests to the API. With 50,000 characters of trial credit, you can test multiple voices and languages to find the perfect fit for your game’s characters.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. We need the voice actor to capture the subtle shift in tone when the NPC realizes the player has betrayed their trust.

Avatar of the voice aria
ariafemale
Avatar of the voice nova
novafemale
Avatar of the voice luna
lunafemale
Avatar of the voice sage
sagefemale
Avatar of the voice felix
felixmale
Avatar of the voice milo
milomale
Avatar of the voice atlas
atlasmale
Avatar of the voice orion
orionmale

23 languages

Any voice speaks any of these languages.

Sources and further reading

  1. Wikipedia
  2. IETF RFC 7845: Ogg Opus
  3. Tether (USDT)
  4. ISO 639 language codes
  5. W3C WAI: making audio and video accessible
  6. openai-node on GitHub
  7. curl documentation
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. LibriTTS-R corpus (OpenSLR 141)
  10. FFmpeg documentation
  11. LibriVox public-domain audiobooks
  12. openai-python on GitHub

More on this site