Integrate Human-Sounding Text to Speech for Your Call Center

By Lvl2 editorial team · Updated 2026-11-19

This guide shows startup teams how to integrate natural, human-sounding text-to-speech audio into their IVR systems. You will learn to generate speech files via a simple API, keeping callers engaged without the enterprise complexity. We cover everything from obtaining your API key to handling responses in your preferred language.

Whether you are prototyping a new voice interface or deploying a live call center solution, these docs provide concrete steps and code examples. You will discover how to select voices, manage audio formats, and handle rate limits efficiently. This resource is designed for developers who need to get from sign-up to production quickly.

Integrate Human-Sounding Text to Speech for Your Call Center

Frequently asked questions

How do I get an API key?

Sign up on /get-api-key/ using Google or email plus password. Your account page displays your active API key, balance, and usage details. Each site account is independent, so you must register separately for this storefront. The key starts with 'tts-' and is used for authentication in your API requests.

Does the API support streaming audio?

No, the API does not support streaming, WebSockets, or real-time partial audio. You send a POST request and receive the complete audio file in the response. This synchronous approach simplifies integration for IVR systems where you need the full audio asset before playing it to the caller.

Can I use the OpenAI Python SDK?

Yes, the official OpenAI SDKs work perfectly. Change the base_url to https://api.lvl2.info/v1 and use your AuricText API key. The request shape matches the OpenAI speech endpoint exactly. This allows you to use familiar Python code without writing custom HTTP clients for your text-to-speech generation tasks.

What is the maximum character limit?

Each request supports up to 4096 characters in the input field. Spaces and punctuation count toward this limit. For longer texts, you must split the content into chunks of 4096 characters or fewer, generate audio for each part, and then join the resulting audio files together.

How do I specify a language?

Include the optional 'language' field with an ISO code in your request body. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly setting the language ensures accurate synthesis and prevents mispronunciation issues.

What happens if the request fails?

If synthesis fails, the charge is returned in full. You are not billed for failed requests. This ensures you only pay for successful audio generation. You can retry the request with the same parameters, keeping in mind that the system processes requests sequentially during high load.

Is there an SDK for mobile apps?

No, there is no official mobile SDK. You can use the standard HTTP endpoints or the OpenAI SDKs in your mobile app by pointing them to https://api.lvl2.info/v1. Just ensure your mobile app securely handles the API key and manages character limits within the 4096-character constraint.

Can I generate audio in parallel?

Requests are processed one after another, so under load a request may wait in a queue. You can send multiple requests, but they will be serialized. For IVR systems, this means longer texts take roughly real-time duration, while short phrases may take a few seconds to generate.

How do I handle large text inputs?

Split your text into parts of up to 4096 characters. Generate audio for each part separately using the API. Then, join the resulting audio files together to create the final output. This approach ensures you stay within the character limit per request while delivering complete audio content.

What formats are returned?

You can choose from mp3, wav, opus, flac, or pcm via the response_format field. These formats cover most IVR and telephony needs. The generated audio is returned directly in the response body, allowing you to stream or save it immediately for playback in your call center system.

Is the API rate limited?

Yes, the limit is 60 requests per minute per key. Before your first top-up, the limit is 10 requests per minute. This rate limit applies to your single active key. Monitor your usage on the account page to ensure your IVR traffic stays within these boundaries.

Do I need to install dependencies?

If you use the OpenAI SDK, you need to install that package. Otherwise, you can use plain HTTP requests with any standard library. No specific AuricText dependencies are required. The API is standard REST, so you can integrate it using whatever tools your development team prefers.

How do I revoke a compromised key?

Issue a new API key from your account page. The new key becomes active immediately, and the old one stops working at once. This effectively revokes the compromised key without needing to contact support. You can generate a new key anytime to maintain security for your IVR system.

Can I use the same key for multiple projects?

Yes, one active key per account can be used across multiple projects. The rate limit and character usage apply to the key as a whole. If you need to isolate usage or security, you can issue a new key, which invalidates the previous one immediately.

First request

curl

curl https://api.lvl2.info/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

Python (openai)

from openai import OpenAI

client = OpenAI(base_url="https://api.lvl2.info/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.lvl2.info/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
ariafemale
novafemale
lunafemale
sagefemale
felixmale
milomale
atlasmale
orionmale
language
arالعربية
zh中文
daDansk
nlNederlands
enEnglish
fiSuomi
frFrançais
deDeutsch
elΕλληνικά
heעברית
hiहिन्दी
itItaliano
ja日本語
ko한국어
msBahasa Melayu
noNorsk
plPolski
ptPortuguês
ruРусский
esEspañol
swKiswahili
svSvenska
trTürkçe

Get your API key

Sound wave illustration for: Get your API key

To start using AuricText for your IVR system, sign up directly on the /get-api-key/ page. You can authenticate using your Google account or create a standard email and password account. Each account is tied to this specific site.

Once registered, your API key appears in the dashboard alongside your balance and usage stats. You can revoke and generate new keys instantly; the old key stops working immediately upon regeneration, ensuring tight control over your integration credentials.

Sign up with Google or email

Sign up with Google or email

Choose Google for quick access or email/password for traditional accounts. Note that Google sign-ups include a $0.50 free trial valid for 7 days, while email accounts start with zero credit.

Find key in dashboard

Find key in dashboard

The dashboard displays your active Bearer token, current balance, and character usage. You can copy the key directly to paste into your IVR configuration or code base immediately.

Revoke and generate new keys

Generate a new key at any time. The previous key becomes invalid instantly, allowing you to rotate credentials without downtime if you suspect a leak or need to reset access.

First request with curl

Sound wave illustration for: First request with curl

Start testing your call center integration immediately with a simple curl command. This approach lets you verify voice synthesis works before building your application logic.

You only need to provide the model, input text, and voice ID to generate audio. The API returns the audio file directly in the response body.

Basic POST request structure

Send a JSON payload to the speech endpoint using the standard POST method. The request targets the specific API base URL for your account.

  • Endpoint: https://api.lvl2.info/v1/audio/speech
  • Method: POST
  • Content-Type: application/json

Required JSON fields

Include the model parameter, choosing either tts-1 or tts-1-hd. Provide your text in the input field, ensuring it stays under 4096 characters.

Specify the voice ID from the available presets. Optionally, set the response_format and speed to match your IVR system requirements.

  • model: "tts-1" or "tts-1-hd"
  • input: Your text string
  • voice: e.g., "aria", "milo"
  • response_format: "mp3", "wav", "opus", "flac", or "pcm"

Expected audio response

The API returns the audio file directly in the response body. You can immediately fetch this URL or save it for later use in your call flow.

Failed requests return zero charge, allowing you to debug format issues without cost. Use this to validate voice selection before full deployment.

Using the OpenAI SDK

Sound wave illustration for: Using the OpenAI SDK

AuricText uses the same request shape as the OpenAI speech endpoint, allowing you to reuse existing client code by simply changing the base URL to https://api.lvl2.info/v1. This means you can integrate our TTS API into your call center workflows with minimal code changes, leveraging familiar SDK structures for rapid prototyping.

Change base URL configuration

Update your OpenAI SDK client configuration to point to our API base URL. This ensures all requests are routed to our TTS engine while maintaining compatibility with standard library methods.

  • Base URL: https://api.lvl2.info/v1
  • SDK: Official OpenAI SDKs work out of the box

Reuse existing client code

Your existing Python or Node.js code for audio generation can be adapted with minimal adjustments. Just ensure you use the correct model parameter (tts-1 or tts-1-hd) and your AuricText API key.

  • Compatible with standard OpenAI SDKs
  • Minimal code refactoring required

Handle response streams

The API returns audio files directly in the response body. Unlike some streaming endpoints, you receive the complete audio file upon successful synthesis. This simplifies error handling and storage in your IVR system.

Supported audio formats

Sound wave illustration for: Supported audio formats

AuricText supports five audio formats to match your infrastructure needs. You can choose MP3, WAV, FLAC, PCM, or opus for every synthesis request, ensuring compatibility with both modern web players and legacy telephony systems.

MP3 for web delivery

MP3 is the standard for web-based voice interfaces. It offers a good balance between file size and quality, making it ideal for customer portals or mobile apps where bandwidth matters.

WAV for IVR systems

WAV files are widely supported by most IVR platforms. Use this format when your call center software requires raw audio streams for immediate playback without decoding delays.

FLAC and OPUS options

FLAC provides lossless compression, while OPUS offers efficient compression for low-bandwidth environments. Choose these formats if you need higher fidelity or better data efficiency than MP3 provides.

Voice selection parameters

Sound wave illustration for: Voice selection parameters

AuricText offers eight distinct voice presets tailored for call center environments, ranging from the warm, clear narration of Aria to the neutral, news-style delivery of Atlas. Each voice is built from licensed recordings, ensuring high-quality synthetic speech that keeps callers engaged without the complexity of enterprise systems.

Selecting the right voice is straightforward: pass the specific voice ID in your request and adjust the speed between 0.25 and 4.0 to match your IVR pacing. For non-English Latin script text, explicitly set the language code to ensure accurate pronunciation, as the system defaults to English otherwise.

List available voices

The API provides eight presets, including female voices like Aria (warm narrator) and Nova (upbeat), and male options such as Felix (energetic promo) and Atlas (neutral news). All voices support 23 languages, allowing you to maintain a consistent brand tone across international call centers.

  • 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

Set voice ID in request

Include the voice field in your JSON body with the desired preset name (e.g., "voice": "atlas"). This parameter works alongside model and input to define the synthesis behavior. The system supports tts-1 and tts-1-hd models, which share the same engine and pricing.

Adjust speed settings

Control the playback speed using the speed parameter, accepting values from 0.25 to 4.0. Faster speeds can reduce processing time for long IVR menus, while slower rates may improve clarity for complex instructions. Requests are processed sequentially, so under load, generation may queue.

Voice selection parameters

Handling errors and limits

Sound wave illustration for: Handling errors and limits

When integrating AuricText into your IVR workflows, understanding your API limits is crucial for maintaining consistent call quality. Your account starts with a modest allowance, but scaling up is straightforward once you top up your balance.

The core constraint you need to manage is the request rate. Knowing how to handle bursts of calls and what errors mean will help you keep your voice interface running smoothly without unexpected interruptions.

Rate limit of 60 requests per minute

Each API key is limited to 60 requests per minute once your account is active. Before your first top-up, this limit is stricter at 10 requests per minute. This ensures fair usage while you test your integration.

If you exceed the limit, your IVR system will receive a 429 status code. Since requests are processed sequentially, heavy loads may also cause temporary delays beyond the rate limit itself.

  • 60 requests/minute for active accounts
  • 10 requests/minute before first top-up
  • Sequential processing may add queue time

Common error codes

A 400 Bad Request usually means your JSON body is malformed or exceeds the 4096 character limit per request. Ensure you split longer texts into manageable chunks before sending.

A 401 Unauthorized indicates an invalid or revoked API key. Check that your Authorization header uses the correct Bearer token format.

A 429 Too Many Requests confirms you have hit the per-minute rate limit. See the retry logic below for handling this gracefully.

Retry logic recommendations

Implement exponential backoff for 429 errors. Start with a short delay and increase it progressively to avoid overwhelming the API during peak usage.

For 500-level server errors, retry once after a brief pause. These are often transient and do not incur charges if the synthesis fails.

Avoid retrying 400 errors without modifying the request, as they will likely fail again immediately. Check your input text length and voice parameters.

Language detection and settings

Sound wave illustration for: Language detection and settings

AuricText automatically detects the language of your input text based on the character script used. For example, text written in Latin script defaults to English unless you specify otherwise. This works for all 23 supported languages, including Arabic, Chinese, and Japanese.

If the auto-detection is incorrect or you need to enforce a specific language, you can explicitly set the language parameter. This ensures consistent voice output regardless of the input script, which is critical for multilingual IVR systems.

Automatic language guessing

The API analyzes the input text's script to determine the language. Latin script defaults to English. Non-Latin scripts like Cyrillic or Hanzi trigger their respective languages automatically.

  • Supported by 23 languages
  • No extra configuration needed
  • Default fallback to English for Latin

Explicit language code setting

You can override the default detection by providing a valid ISO 639-1 language code in the request body. This is useful when the input text contains mixed scripts or when you want to force a specific language.

Setting the language explicitly ensures that the voice model pronounces words correctly, even if the input text uses a different script.

  • Use ISO 639-1 codes
  • Overrides default detection
  • Ensures correct pronunciation

Handling non-English Latin text

For non-English languages using Latin script (e.g., German, Spanish, French), you must explicitly set the language code. Without this, the API defaults to English, which may result in incorrect pronunciation or accent.

This is a common pitfall for call centers serving multiple European markets. Always verify the language parameter for Latin-script inputs that are not English.

  • Set language for German, Spanish, etc.
  • Prevents English default
  • Ensures correct accent

Authentication requirements

Sound wave illustration for: Authentication requirements

Your API key authenticates every request to the AuricText endpoint. Include it in the HTTP header as a Bearer token. This simple mechanism ensures only your account’s credits are used for generation.

Keys are tied to your specific account and grant access to the speech synthesis engine. Proper management prevents unauthorized usage and keeps your billing accurate.

Bearer token format

Include the header Authorization: Bearer tts-... with every POST request. The token starts with tts- and is unique to your account.

Key validity rules

Only one key is active per account at any time. Generating a new key immediately invalidates the old one, so ensure your systems are updated before rotation.

Security best practices

Store keys securely in your environment variables or secret manager. Since a new key instantly revokes the old one, coordinate key rotations to avoid service interruptions during updates.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Its predictable pacing ensures that complex instructions are delivered clearly, reducing the chance of customer confusion.

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. LibriVox public-domain audiobooks
  3. MDN: Web Speech API
  4. openai-node on GitHub
  5. TRON developer hub: TRC-20
  6. Tether (USDT)
  7. curl documentation
  8. Python documentation
  9. LibriTTS-R corpus (OpenSLR 141)
  10. OpenAI API reference: create speech
  11. W3C WAI: making audio and video accessible
  12. FFmpeg documentation

More on this site