What is the Text-to-Speech API and How Does It Work?

By AudioGen editorial team · Updated 2026-11-19

This page explains how the AudioGen Text-to-Speech API transforms your podcast scripts into high-quality audio files. You will learn the step-by-step workflow: sending text via a simple JSON request and receiving an audio file ready for editing. We cover technical details like Python integration, voice selection, and format options, tailored specifically for freelance creators who want to produce narration without wrestling with complex SDKs.

Whether you are automating long-form episodes or prototyping a new show, this guide clarifies exactly how the service works. We break down pricing, language support, and common misconceptions so you can integrate audio generation seamlessly into your Python workflows. By the end, you will know how to generate consistent, studio-quality narration quickly, letting you focus on your show’s voice rather than your code.

What is the Text-to-Speech API and How Does It Work?

Frequently asked questions

What is a text-to-speech API?

It is a cloud service that converts text into audio files. You send text via a simple API endpoint and receive an audio file in return. It works like the OpenAI speech endpoint, allowing you to use standard HTTP requests or SDKs to integrate speech generation directly into your podcast production workflow.

How does TTS work?

You send a POST request with your script, voice choice, and format to our endpoint. The system processes the text and returns an audio file. For longer scripts, split the text into parts under 4096 characters and join the resulting audio files. Requests are processed sequentially, so load may cause slight delays.

Is TTS the same as voice cloning?

No. We do not offer custom voice cloning or uploading your own voice. Our eight voices are based on licensed recordings from LibriTTS-R and LibriVox. Each generated file contains an inaudible watermark marking it as synthetic speech. We provide fixed presets rather than personalized voice replication.

Can TTS sound like a human?

Our voices are based on licensed recordings from LibriVox public-domain audiobook readings. They sound natural and clear, suitable for podcast narration. However, every file carries an inaudible watermark indicating it is synthetic speech. They are distinct from human recordings but designed for high-quality, realistic audio output.

Do I need to install software?

No. This is a cloud-based API. You interact with it via HTTP requests or by using the official OpenAI SDKs with the base_url set to https://api.apatu.cc/v1. You can generate audio from any device with internet access. No local software installation is required to start using the service.

Is the API cloud-based?

Yes. All processing happens on our servers. You send text to our endpoint and receive the audio file back. There is no on-premise installation option. Your input text is used only to produce the audio and is not stored or used for training after generation.

Can I use TTS for commercial projects?

Yes. You can use the generated audio for your freelance podcast projects. The voices are based on licensed recordings. There are no monthly plans or seat limits. You simply pay for the characters you use, with no restrictions on how you apply the audio in your commercial work.

Are the voices natural sounding?

Our eight voices are based on licensed recordings from LibriVox public-domain audiobook readings. They offer clear, distinct tones like warm narration or energetic promo styles. While natural, every file carries an inaudible watermark marking it as synthetic speech. They are designed to sound professional for podcast content.

How many languages are supported?

We support 23 languages, including English, Spanish, German, French, Japanese, and Hindi. Any voice can speak any of these languages. If you do not specify a language, the system guesses it from the script, defaulting to English for Latin text. Vietnamese and Indonesian are not supported.

Can I change the voice speed?

Yes. You can adjust the speed between 0.25 and 4.0. This allows you to speed up long narrations or slow down complex sections. The speed parameter is part of your API request body, giving you precise control over the pacing of your generated audio files.

Is there a character limit?

Yes, each API request accepts up to 4096 characters. Spaces and punctuation count toward this limit. For longer scripts, split the text into parts and join the resulting audio files. This ensures efficient processing and maintains audio quality within the constraints of a single API call.

Can I generate audio instantly?

Generation takes roughly real time for long texts, about 25 characters per second. Short phrases may take a few seconds. Requests are processed sequentially, so under load, a request may wait in a queue. It is not instantaneous streaming, but generally fast for typical podcast segments.

Do I own the generated audio?

You receive the audio file directly in the response. The input text is not stored or used for training. Generated audio is not stored on our servers after delivery. You can use the files for your projects without ongoing subscription fees.

Is the service reliable?

We do not offer an SLA or uptime guarantee. Requests are processed sequentially, so high load may cause queueing delays. Failed requests are free, with charges returned in full. Support is by email only. The service is stable, but there is no formal reliability contract.

Definition of TTS API

Sound wave illustration for: Definition of TTS API

The Text-to-Speech API is a cloud-based service that converts written text into natural-sounding audio files. Instead of recording human voice actors, you send a text string to our servers and receive a synthesized audio file in return. This programmatic approach removes the need for manual audio engineering, allowing you to generate narration directly within your software or scripts.

Cloud-based audio generation

Our engine processes your input on remote servers, eliminating the need for local hardware or specialized software installations. You simply send a request, and the neural synthesis engine generates the audio file, which is then returned to your application. This infrastructure scales with your volume, ensuring consistent quality whether you are generating a short phrase or a full podcast episode.

  • Zero local infrastructure required
  • Scales with your request volume
  • Consistent engine performance across all requests

Send text, receive audio

The core workflow is straightforward: you provide the text string (up to 4,096 characters per request) and receive a ready-to-use audio file. The API handles the complex phonetic mapping and prosody generation internally. You do not need to manage audio codecs or file formats manually; the system outputs the file in your chosen format, such as MP3, WAV, or FLAC.

  • Simple JSON request body
  • Up to 4,096 characters per request
  • Direct audio file response

Programmatic access

The API is designed for developers, offering standard HTTP endpoints compatible with most programming languages, including Python. You authenticate with a Bearer token and use standard JSON structures for your requests. This means you can integrate voice generation directly into your podcast production pipeline, automating narration generation without wrestling with complex SDKs or custom middleware.

  • Standard HTTP/JSON interface
  • Compatible with Python and other languages
  • Easy integration via simple API calls

How It Works

Sound wave illustration for: How It Works

The API accepts your script text, ensuring it stays within the 4,096-character limit per request. If your narration is longer, you split the text into manageable chunks and join the resulting audio files seamlessly.

Input text processing

Your text is validated for length and format before processing. Spaces and punctuation count toward the character limit, so concise scripting helps optimize usage.

Neural synthesis engine

The engine converts text into speech using licensed voice models. It generates audio at roughly real-time speed (about 25 characters per second), though requests are processed sequentially and may wait in a queue under load.

  • Processes requests sequentially; queueing may occur under high load.

Audio file delivery

Once synthesized, the audio file is returned directly in the response. You receive the file immediately, ready for download or direct integration into your podcast workflow.

Use Cases for Podcasters

Sound wave illustration for: Use Cases for Podcasters

Generate consistent narration for your podcast episodes without booking studio time. Paste your script, select a voice, and receive an audio file ready for editing. This workflow lets you focus on storytelling rather than recording logistics.

Create episodes in multiple languages using the same voice presets. Whether your script is in Spanish, Japanese, or German, the API handles the synthesis, allowing you to reach broader audiences without hiring separate voice talent.

Automated narration

Send your script via a simple API call and receive a finished audio file. This eliminates the need for a home studio setup or coordinating schedules with voice actors, streamlining your production pipeline.

Ideal for solo creators who want consistent quality across every episode without the fatigue of repeated recording sessions.

  • No studio equipment required
  • Consistent voice quality
  • Faster production turnaround

Multi-language episodes

Support 23 languages including Arabic, Hindi, and Portuguese. Set the language code explicitly for non-English Latin scripts to ensure accurate pronunciation.

Expand your reach by dubbing existing content or creating original episodes for international listeners without hiring native speakers.

  • 23 supported languages
  • Automatic language detection
  • Explicit language control

Rapid prototyping

Test different narrative styles by quickly generating samples with varying voices like Aria, Nova, or Felix. Evaluate tone before committing to a full episode.

Iterate on your script’s pacing and tone instantly, reducing the cost of trial-and-error in the recording phase.

  • Quick voice sampling
  • Easy script iteration
  • Low-risk experimentation

Benefits Over Traditional Methods

Sound wave illustration for: Benefits Over Traditional Methods

Traditional podcast narration often requires booking studio time, hiring voice actors, and managing file transfers. Our API removes these logistical hurdles by generating audio directly from your script via code, letting you focus on your show’s voice rather than your recording schedule.

You get production-ready audio files in seconds without waiting for human schedules. This speed allows freelance creators to iterate on narration quickly, ensuring the final product matches their vision without the overhead of traditional recording workflows.

No studio recording needed

You don’t need a microphone, acoustic treatment, or a dedicated recording space. Just send your script via a simple HTTP request, and receive an audio file. This eliminates the need to coordinate with voice talent or manage large WAV files during editing.

All you need is an internet connection and your API key. This simplicity means you can generate narration for any episode segment directly from your Python scripts, keeping your workflow entirely digital and streamlined.

  • Eliminate microphone and acoustic treatment costs
  • No need to coordinate voice actor schedules
  • Generate audio directly from your script via code

Instant generation

Unlike human recording, which requires setup, take, and review, our API delivers audio files almost immediately. For short phrases, generation takes just a few seconds. For longer texts, the system processes requests at roughly real-time speed (about 25 characters per second), though requests are processed sequentially and may wait in a queue under load.

This immediacy allows for rapid prototyping. You can test different voice styles or script variations in minutes rather than days. If a line doesn’t sound right, regenerate it instantly without the friction of re-recording.

  • Receive audio files in seconds for short phrases
  • Real-time processing for longer texts
  • Rapid iteration on script variations

Consistent voice quality

Human voices fatigue, and tone can vary between recording sessions. Our AI voices maintain consistent quality across every word, ensuring your podcast sounds uniform from start to finish. Whether you’re recording a 5-minute segment or a 50-minute episode, the vocal character remains steady.

You have access to 8 distinct presets: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, and Orion. Each voice is based on licensed recordings, providing a professional, polished sound that doesn’t degrade over time or with repeated use.

  • Uniform tone across long episodes
  • No vocal fatigue or quality drops
  • 8 distinct presets for varied narration styles

Technical Requirements

Sound wave illustration for: Technical Requirements

To use the API, you need a stable internet connection and the ability to send JSON payloads. Authentication is handled via a Bearer token in the Authorization header, ensuring secure access to your generated audio files.

Internet connection required

Since this is a cloud API, every request travels over the internet. Your script must maintain connectivity to api.apatu.cc to submit text and receive the resulting audio file.

JSON request format

Requests use a standard JSON body similar to the OpenAI speech endpoint. You specify the model, input text, voice, and response_format. The API accepts up to 4096 characters per request, including spaces and punctuation.

  • Use POST to https://api.apatu.cc/v1/audio/speech
  • Include model, input, voice, and response_format in the body
  • Supports mp3, wav, opus, flac, and pcm formats

API key authentication

Secure your endpoint with a unique API key issued to your account. Pass it in the header as Authorization: Bearer tts-.... You can regenerate this key at any time, which immediately invalidates the previous one.

Common Misconceptions

Sound wave illustration for: Common Misconceptions

Many assume text-to-speech sounds robotic, but our engine delivers natural-sounding narration suitable for professional podcasting. The voices carry distinct character, though every generated file carries an inaudible watermark that marks it as synthetic speech.

Not just robotic voices

Our 8 presets, built from licensed recordings, offer warm narrators, upbeat hosts, and calm instructional tones that fit podcast workflows naturally.

Not real-time streaming

We do not offer WebSocket streaming or partial audio chunks. You send text and receive a complete audio file once synthesis finishes, ensuring stable integration.

Not human cloning

We do not clone your voice or upload custom samples. You choose from our 8 licensed presets, which are based on public-domain audiobook readings.

Integration with Python

Sound wave illustration for: Integration with Python

Generating speech in Python is straightforward using the standard requests library or the OpenAI SDK. You send a POST request to https://api.apatu.cc/v1/audio/speech with your API key and text payload, receiving an audio file directly in the response.

Simple HTTP requests

You can send a basic JSON payload containing the model, input, and voice parameters. The API returns the audio file immediately, allowing you to save it or play it directly in your script without external dependencies.

  • Use requests.post() with the https://api.apatu.cc/v1/audio/speech endpoint.
  • Include Authorization: Bearer tts-... in the headers.
  • Pass text via the input field in the JSON body.

Library compatibility

The API follows the OpenAI request shape, so the official OpenAI Python SDK works by changing the base_url to https://api.apatu.cc/v1. You simply configure the base_url to https://api.apatu.cc/v1 and use your site-specific key. This allows you to leverage familiar methods like Audio.create() without learning a new library.

Error handling

Implement basic retry logic for transient network issues. If synthesis fails, the charge is returned in full, so failed requests do not impact your balance. Always check the HTTP status code before processing the audio data.

Integration with Python

Voice Selection Process

Sound wave illustration for: Voice Selection Process

Choosing the right voice is simple: pick from eight presets that cover warm narrators, bright upbeat tones, and deep documentary styles. Each voice is designed to match specific podcast genres, from conversational interviews to serious news updates.

8 distinct voices

Select from female voices like Aria (warm narrator) and Nova (bright, upbeat), or Luna (soft storytelling) and Sage (calm, instructional). Male options include Felix (energetic promo), Milo (friendly conversation), Atlas (neutral news), and Orion (deep documentary).

All voices support the same 23 languages, allowing you to maintain consistent character voices across different episodes or languages without changing the audio engine.

  • Aria: Warm, clear narrator
  • Nova: Bright, upbeat
  • Luna: Soft, storytelling
  • Sage: Calm, instructional
  • Felix: Energetic, promo
  • Milo: Friendly, conversational
  • Atlas: Neutral, news
  • Orion: Deep, documentary

Gender and tone variety

Each voice offers a distinct emotional texture, letting you match the tone of your script precisely. Whether you need a friendly conversational style for a casual podcast or a neutral delivery for news, the presets cover the spectrum.

Licensing sources

The voices are based on licensed recordings from LibriTTS-R (CC BY 4.0), derived from LibriVox public-domain audiobook readings. This ensures high-quality, natural-sounding speech without the complexity of custom voice cloning.

Audio Format Options

Sound wave illustration for: Audio Format Options

The API supports multiple output formats, allowing you to choose the best balance between file size and fidelity for your podcast workflow. You can request audio as mp3, wav, opus, flac, or pcm directly in your JSON request body.

MP3 for compatibility

MP3 is the standard for most podcast platforms and offers excellent compression. It is ideal for web delivery where bandwidth matters, keeping your final episode files small without sacrificing audible clarity for voice narration.

WAV for quality

WAV provides uncompressed, high-fidelity audio perfect for post-production editing. Use this format if you plan to apply effects, normalize volume, or mix the generated narration into a larger audio project without generational loss.

Other formats available

For specialized needs, you can request Opus, FLAC, or PCM. Opus offers efficient compression, while FLAC provides lossless compression. PCM gives you raw audio data for custom processing pipelines.

  • Opus: Efficient compression for streaming
  • FLAC: Lossless compression
  • PCM: Raw audio data

Speed and Efficiency

Sound wave illustration for: Speed and Efficiency

Text-to-speech synthesis typically runs at roughly real-time speed, generating approximately 25 characters of text per second of audio. While short phrases may take a few seconds to process, longer scripts scale efficiently. This allows podcast creators to convert entire episodes without significant delays, keeping production workflows smooth and predictable.

Real-time generation

Generation speed is roughly real-time (about 25 characters per second), though requests are processed sequentially and may wait in a queue under load. You can plan your publishing schedule with confidence, knowing that the time required to create audio matches the listening time almost exactly.

Queue management

Requests are processed sequentially, meaning that under heavy load, your synthesis job may wait in a queue before starting. This ensures fair resource distribution but can add slight latency during peak usage times. The system handles this transparently, so you simply wait for the audio file to be ready.

  • Requests are processed one after another
  • Latency increases under heavy load
  • Fair resource distribution ensures stability

Character limits

Each API request accepts up to 4,096 characters of input text. For longer scripts, you can split the text into smaller parts, generate each segment, and join the resulting audio files. This approach allows you to produce full-length episodes by joining the resulting audio files.

  • Max 4,096 characters per request
  • Split longer texts into segments
  • Join audio files for final output

Language Support

Sound wave illustration for: Language Support

We support 23 languages including English, Spanish, German, French, Japanese, and Arabic. Each voice can speak any of these languages, giving you flexibility for international podcast episodes or diverse narration styles without needing multiple voice actors.

23 languages available

Our API covers major global languages such as Arabic, Chinese, Danish, Dutch, Finnish, Greek, Hebrew, Hindi, Italian, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Swahili, Swedish, and Turkish. You can mix languages within your workflow, though each request processes one language at a time.

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

Automatic detection

If you do not specify a language, the system guesses it from the text script. Latin script defaults to English, which works well for most English content. This simplifies your Python code when you are generating standard English narration.

Manual language setting

For non-English text using Latin characters (like Spanish or German), you must set the language parameter. Without this, the API might default to English pronunciation, leading to awkward audio. Specify the ISO code to ensure accurate accent and grammar.

  • Set language for Latin-script text that is not English
  • Ensures correct pronunciation for non-English Latin languages

Cost Structure

Sound wave illustration for: Cost Structure

Our pricing is straightforward: $0.01 per 1,000 characters, including spaces and punctuation. You only pay for what you use, with no hidden fees or monthly commitments. Failed requests are free, ensuring you never pay for errors.

There are no subscriptions, seats, or minimum spends. Your balance never expires, so you can pause and resume whenever your podcast production schedule requires. This model fits the irregular workflow of freelance creators perfectly.

Pay per character

You are charged $10 per 1 million characters generated. Spaces and punctuation count toward this total, so plan your script length accordingly. If synthesis fails, the charge is returned in full, so you only pay for successful audio files.

  • $0.01 per 1,000 characters
  • Spaces and punctuation count
  • Failed requests are free

No subscription needed

We do not lock you into monthly plans or require you to maintain a minimum spend. You can top up as needed and use the credit whenever you are ready to produce your next episode.

  • No monthly plans
  • No seats required
  • Balance does not expire

Free trial available

Sign in with Google to receive $0.50 in credit, enough for about 50,000 characters, valid for 7 days. This lets you test the API and voices before committing. Email-signup accounts start without trial credit.

Top-ups are accepted via USDT (TRC-20) on the TRON network. There are no credit cards, PayPal, or VAT invoices. Minimum top-up is $5, credited automatically within minutes.

  • $0.50 trial credit
  • Valid for 7 days
  • Google sign-in only

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Listen for pacing, clarity, and whether the voice matches your show’s vibe before committing to full episode narration.

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. openai-node on GitHub
  3. FFmpeg documentation
  4. ISO 639 language codes
  5. Python documentation
  6. Tether (USDT)
  7. LibriTTS-R corpus (OpenSLR 141)
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. LibriVox public-domain audiobooks
  10. TRON developer hub: TRC-20
  11. OpenAI API reference: create speech
  12. MDN: Web Speech API

More on this site