What is the Text to Speech Machine Learning Python API?

By VoxMold editorial team · Updated 2026-11-19

This page defines the VoxMold API as a deterministic text-to-speech service designed for startups building synthetic speech datasets for machine learning. It details how to generate audio files via standard HTTP requests, ensuring consistent output formats suitable for automated data pipelines. The guide covers Python SDK compatibility, pricing structures, and technical constraints specific to ML data preparation.

Audiences include engineering teams requiring reliable, non-stochastic audio generation for model training, voice assistant development, or accessibility tooling. Readers will find concrete examples of integration workflows, character limit specifications, and language support details. This resource excludes marketing fluff, focusing strictly on the API’s capabilities, billing models, and data handling policies for technical implementation.

What is the Text to Speech Machine Learning Python API?

Frequently asked questions

What is the primary function of this API?

VoxMold is a cloud text-to-speech API that accepts text and returns an audio file. It uses a standard JSON body with fields like model, input, voice, and response_format. This deterministic output streamlines synthetic speech dataset creation for machine learning pipelines by providing consistent, machine-readable audio files via a simple HTTP POST endpoint.

Is this API suitable for generating training data?

Yes. The API generates deterministic audio files with inaudible watermarks, ideal for synthetic speech datasets. Input text is not used for training, ensuring data purity. With 8 voice presets and 23 languages, you can generate diverse, labeled audio samples efficiently. The standard formats (mp3, wav, opus, flac, pcm) integrate directly into ML data pipelines without conversion.

Can I use Python to interact with this API?

Yes. The API endpoint matches the OpenAI speech endpoint shape. You can use the official OpenAI Python SDK by changing the base_url to https://api.xxx444.cc/v1 and providing your API key. Alternatively, use any standard HTTP library to send JSON payloads with model, input, voice, and response_format parameters directly to the /v1/audio/speech endpoint.

How does the API handle non-English languages?

The API supports 23 languages, including Arabic, Chinese, French, German, Hindi, Japanese, Korean, Spanish, and others. If the language parameter is omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language parameter to ensure accurate synthesis and avoid misidentification.

What is the difference between tts-1 and tts-1-hd?

Both models use the same engine and incur the same price of $10 per 1 million characters. The distinction is purely in the model name; both use the same engine and price. Both accept identical parameters, including voice, speed, and response format, allowing you to switch models without changing your request structure or integration logic.

Does the API support real-time audio streaming?

No. The API returns complete audio files in the response body or via standard HTTP responses. It does not support WebSocket connections or partial audio streaming. You must wait for the full synthesis to complete before receiving the file. This design ensures deterministic output suitable for batch processing and dataset generation rather than live playback.

Are the voices customizable by the user?

No. The API provides eight fixed presets: aria, nova, luna, sage, felix, milo, atlas, and orion. Users cannot upload custom voices, clone existing ones, or adjust emotion tags. Each voice is based on licensed recordings from LibriTTS-R or LibriVox. You select from these eight options to match your dataset’s tonal requirements.

How is the audio quality ensured?

Quality is determined by the selected model (tts-1 or tts-1-hd) and voice preset. Each generated file includes an inaudible watermark marking it as synthetic speech. The voices are derived from licensed recordings, ensuring consistent baseline quality. Higher fidelity options are available via the tts-1-hd model, while tts-1 offers standard quality at the same price.

What happens to my input text after generation?

Input text is used solely to produce the audio and is not retained for training models. The generated audio is returned in the response and not stored on our servers. Request metadata, including time, character count, and status, is kept for billing purposes. This ensures your proprietary text data remains private and unused for other purposes.

Is the API reliable for batch processing?

Yes, but requests are processed sequentially. Under load, requests may queue, so parallel generation is limited by the 60 requests per minute rate limit. For large datasets, split texts into 4096-character chunks and join the resulting audio files. Failed requests are free, ensuring cost efficiency during high-volume batch operations without risking credit for errors.

Can I generate audio files in parallel?

You can send multiple requests concurrently, but they are processed one after another. The rate limit is 60 requests per minute per key. If you exceed this, requests queue. To maximize throughput, use multiple API keys or distribute requests across keys. Each request returns a complete audio file, which you can then concatenate for final datasets.

What is the character limit for a single request?

Each request supports up to 4096 characters of input text. Spaces and punctuation count toward this limit. For longer texts, split the content into multiple requests, generate each audio segment, and join the files. This approach ensures compatibility with the API’s processing constraints while allowing generation of arbitrarily long audio content for your datasets.

How do I know which voice to use for a specific language?

Any of the eight voices can speak any of the 23 supported languages. You select the voice based on tonal preference (e.g., aria for narration, atlas for news) rather than language constraints. Ensure the language parameter matches the text’s language to avoid default English misidentification, especially for non-English Latin-script text, ensuring accurate synthesis.

Is the API free to start with?

Yes. Signing in with Google provides a $0.50 free trial credit, valid for 7 days, covering approximately 50,000 characters. Email-based accounts start without trial credit. The standard rate is $10 per 1 million characters. Failed requests are free, and you can top up with USDT on the TRON network for ongoing usage.

Definition

Sound wave illustration for: Definition

VoxMold is a cloud-based text-to-speech API designed for generating synthetic speech datasets for machine learning. It provides a deterministic audio generation pipeline, allowing startups to integrate TTS directly into their data ingestion workflows without managing infrastructure.

API Functionality

The service exposes a standard REST endpoint accepting JSON payloads. Users send text and receive audio files, enabling automated scaling of voice data production for model training and evaluation.

Cloud-Based Service

Hosting is managed entirely on our servers. Startups can scale usage from prototype to production without provisioning hardware, paying only for the characters processed.

Input Output Model

Input is plain text up to 4096 characters. Output is a binary audio file in formats like MP3, WAV, or FLAC, ready for immediate ingestion into ML pipelines.

Python Integration

Sound wave illustration for: Python Integration

The API endpoint accepts standard JSON payloads, allowing seamless integration into Python-based data pipelines. By adjusting the base URL to https://api.xxx444.cc/v1, developers can leverage existing OpenAI SDKs without rewriting core logic. This compatibility ensures that synthetic speech generation fits directly into model training workflows.

SDK Compatibility

The endpoint mirrors the OpenAI speech request shape, enabling immediate adoption of the official OpenAI Python SDK. Developers only need to modify the base_url parameter to point to https://api.xxx444.cc/v1. This approach maintains standard authentication headers and request structures, reducing boilerplate code in ML data preparation scripts.

  • Compatible with official OpenAI Python SDK
  • Standard JSON request body structure
  • Adjustable base_url configuration

HTTP Requests

For environments where the SDK is unnecessary, direct HTTP POST requests to https://api.xxx444.cc/v1/audio/speech provide full control. The JSON body includes the model, input text, voice preset, and response format. Authentication is handled via the Authorization: Bearer header using the unique API key issued to the account.

  • Direct POST requests to /v1/audio/speech
  • JSON body with model and input fields
  • Bearer token authentication

Library Support

Standard Python libraries such as requests or aiohttp handle the transport layer effectively. Since the API returns audio files directly in the response body, data can be streamed or saved to disk immediately. This simplicity supports both synchronous data generation and asynchronous batch processing for large-scale dataset creation.

  • Works with requests and aiohttp
  • Direct audio file response
  • Supports synchronous and asynchronous workflows

Machine Learning Context

Sound wave illustration for: Machine Learning Context

VoxMold enables the systematic generation of synthetic speech datasets by converting large text corpora into standardized audio files. This deterministic approach allows startups to scale data pipelines without the logistical overhead of human recording sessions, ensuring consistent audio quality across thousands of hours of training material.

The API’s ability to handle up to 4096 characters per request and output standard formats like MP3 or WAV integrates directly into machine learning workflows. Teams can programmatically generate diverse voice samples to augment existing datasets, improving model robustness against variations in speech patterns and acoustic environments.

Dataset Creation

Generate thousands of hours of labeled synthetic speech by feeding structured text data into the API. The deterministic nature of the eight preset voices ensures reproducibility, which is critical for controlled experiments and baseline comparisons in ML research.

Audio files are returned immediately in the response, allowing for seamless storage in cloud buckets or direct ingestion into training pipelines. This eliminates the latency associated with coordinating human voice actors for large-scale dataset construction.

  • Automated text-to-audio conversion at scale
  • Consistent acoustic properties across generated samples
  • Immediate file delivery for pipeline integration

Data Augmentation

Increase dataset diversity by applying different voices and speeds to existing text inputs. Varying the speed between 0.25x and 4.0x helps models generalize better to different speaking rates and prosody, reducing overfitting to specific vocal characteristics.

Use the six supported audio formats to test model sensitivity to codec artifacts. Generating parallel datasets in MP3, FLAC, and PCM allows for robustness testing against compression noise and bit-depth variations commonly found in real-world deployment environments.

  • Speed variation for prosody generalization
  • Multi-format testing for codec robustness
  • Expanding sample diversity without new recordings

Model Training

Train voice conversion or TTS models using high-quality synthetic data as a pre-training foundation. The licensed recordings from LibriTTS and LibriVox provide a solid acoustic base, while the synthetic watermark helps identify generated data during evaluation phases.

Leverage the deterministic output to create paired datasets for zero-shot or few-shot learning tasks. By controlling variables like voice preset and language, researchers can isolate specific acoustic features and measure model performance with precision.

  • Pre-training with licensed voice baselines
  • Controlled variable isolation for research
  • Synthetic watermark for dataset identification

Technical Specifications

Sound wave illustration for: Technical Specifications

VoxMold API enforces a strict 4096-character limit per request, requiring text splitting for longer inputs. Audio is delivered in standard formats including MP3, WAV, OPUS, FLAC, and PCM, ensuring compatibility with existing ML data pipelines without proprietary dependencies.

Character Limits

Each API call accepts a maximum of 4096 characters, including spaces and punctuation. For datasets exceeding this length, input must be segmented into chunks and audio files joined post-generation.

Audio Formats

The service returns audio in MP3, WAV, OPUS, FLAC, or PCM formats. These standard codecs facilitate direct ingestion into training scripts, eliminating the need for intermediate conversion steps.

Speed Control

Generation speed is adjustable between 0.25x and 4.0x. This allows for precise control over audio duration, which is useful for balancing dataset variance or matching specific timing constraints in synthetic speech models.

Voice Technologies

Sound wave illustration for: Voice Technologies

VoxMold utilizes eight distinct voice presets rather than offering custom cloning services. These voices are derived from licensed recordings, ensuring consistent quality for synthetic speech dataset generation without the variability of user-uploaded audio.

This approach streamlines data pipelines by providing deterministic outputs. Startups can rely on fixed voice characteristics for model training, avoiding the complexity and cost associated with training custom voice models for each dataset.

The synthetic nature of the audio is marked by an inaudible watermark, allowing for easy identification of generated content in large-scale ML datasets without requiring external metadata tracking.

Presets vs Cloning

We offer eight presets: aria, nova, luna, sage, felix, milo, atlas, and orion. Custom voice cloning is not available; users cannot upload their own audio to create a unique voice model.

This limitation is intentional. By using fixed presets, we ensure that every generated file has identical acoustic properties, which is critical for reproducible machine learning experiments and consistent dataset labeling.

  • No custom voice cloning
  • Eight fixed presets
  • Deterministic output

Licensed Recordings

All voices are based on licensed recordings from LibriTTS-R (CC BY 4.0) and public-domain audiobook readings from LibriVox. This ensures legal clarity for commercial datasets.

The audio is synthesized from these base recordings, maintaining high fidelity while avoiding the need to distribute original source files. This reduces licensing overhead for startups building proprietary models.

  • LibriTTS-R (CC BY 4.0)
  • LibriVox public-domain source
  • Commercially clear

Synthetic Watermark

Every generated audio file contains an inaudible watermark that marks it as synthetic speech. This allows for automated filtering of training data to separate synthetic from real human audio.

This feature is essential for training robust speech recognition models that must distinguish between human and synthetic input, or for datasets where synthetic content must be explicitly labeled.

  • Inaudible watermark
  • Synthetic identification
  • Automated filtering support

Language Support

Sound wave illustration for: Language Support

VoxMold supports 23 languages for synthetic speech generation, including Arabic, Chinese, English, German, Japanese, Spanish, and Swahili. Any voice preset can render any of these languages, providing flexibility for diverse dataset requirements.

23 Languages Available

The API covers major global markets with Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Unsupported languages include Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, and Bengali.

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

Script Detection

The system attempts to detect the language from the text script. Latin script text defaults to English if no language is specified. Non-English Latin-script text requires explicit language configuration to ensure accurate synthesis.

ISO Codes

Set the language field with an ISO code for non-English Latin scripts. This ensures deterministic output for machine learning datasets, avoiding ambiguity in language identification during training.

Language Support

Pricing Structure

Sound wave illustration for: Pricing Structure

VoxMold charges $10 per 1 million characters, equating to $0.01 per 1,000 characters. Spaces and punctuation count toward the total. Failed requests receive a full refund, ensuring you only pay for successful synthesis. This structure supports high-volume dataset generation without complex tiered pricing.

Accounts begin with a $0.50 free trial (approx. 50,000 characters) valid for 7 days when signing in via Google. Email-based accounts start with zero credit. Balances do not expire, allowing flexible usage scheduling for long-term ML pipeline projects.

Per Character Billing

The cost is strictly proportional to input length. You are billed only for characters processed in successful requests. This predictable model allows precise budgeting for large-scale data augmentation tasks.

Trial Credits

Google sign-ups receive $0.50 in trial credit, expiring after 7 days. This allows immediate validation of audio quality and integration workflows before committing to larger purchases. Email accounts do not receive this bonus.

USDT Payments

Top-ups are processed via USDT on the TRON network (TRC-20). The minimum deposit is $5. Funds are credited automatically within minutes of transfer confirmation. No credit cards, PayPal, or VAT invoices are supported.

This crypto-only model eliminates traditional payment processing fees and subscription locks, aligning with the decentralized nature of many modern ML startups.

  • Minimum top-up: $5
  • Network: TRON (TRC-20)
  • Processing time: ~minutes

Use Cases

Sound wave illustration for: Use Cases

Synthetic speech APIs streamline the creation of labeled audio datasets by converting large text corpora into consistent audio files. This deterministic generation ensures uniform quality across training data, reducing the variability inherent in human-recorded samples and accelerating model convergence for natural language processing tasks.

E-learning Data

Automated conversion of educational texts into speech allows for the rapid production of multilingual audio courses. By leveraging 23 supported languages and standard formats like MP3 or WAV, developers can scale content libraries without the logistical overhead of recording studios.

  • Convert textbooks to audio for offline study
  • Generate pronunciation guides for language learners
  • Scale content localization across 23 languages

Voice Assistant Training

Training voice recognition models requires diverse acoustic samples. Using presets like Aria or Felix provides consistent baseline voices for dialogue systems. The deterministic nature of the API ensures that variations in the dataset come from text content rather than speaker inconsistency, improving model robustness.

  • Generate diverse dialogue samples for intent recognition
  • Create balanced datasets for wake-word detection
  • Standardize acoustic features across training sets

Accessibility Tools

Applications serving visually impaired users rely on reliable text-to-speech engines. By integrating this API, startups can offer high-quality audio output for e-books and news feeds. The inaudible synthetic watermark helps identify AI-generated content, ensuring transparency in accessibility services.

  • Serve audio versions of articles to blind users
  • Provide consistent reading speeds for cognitive disabilities
  • Ensure content transparency with synthetic watermarks

Limitations

Sound wave illustration for: Limitations

VoxMold operates as a standard request-response API, delivering complete audio files upon synthesis completion. It does not support streaming or WebSocket connections for real-time partial audio delivery. This architecture is designed for batch processing and dataset generation rather than live conversational applications where immediate audio playback is required.

No Streaming

Requests are processed sequentially, meaning long texts or high load may introduce queue latency. The API returns the final audio file only after the entire synthesis job finishes, ensuring deterministic output but preventing progressive audio streaming.

No SSML

The endpoint accepts plain text input without support for Speech Synthesis Markup Language (SSML). Users cannot control prosody, pauses, or pronunciation via XML tags. Custom pronunciation must be handled by modifying the input text string directly before submission.

Fixed Voices

The service provides eight preset voices derived from licensed LibriTTS-R and LibriVox recordings. It does not offer custom voice cloning, emotion tagging, or the ability to upload and train proprietary voice models. Each generated file includes an inaudible synthetic watermark.

  • Eight fixed presets (e.g., aria, felix, atlas)

Integration Steps

Sound wave illustration for: Integration Steps

Integration begins by obtaining an API key via the /get-api-key/ endpoint. Keys are single-active; issuing a new one instantly invalidates the previous one, requiring immediate code updates to prevent authentication errors.

Send a POST request to https://api.xxx444.cc/v1/audio/speech with the model, voice, and input text. The API returns the audio file directly, allowing seamless ingestion into ML pipelines without intermediate storage steps.

Key Generation

Sign up on the /get-api-key/ page using Google or email. The dashboard displays your active key and balance. Note that generating a new key immediately stops the old one, so update your configuration files atomically.

  • One active key per account
  • Instant invalidation of previous keys
  • Available via Google or email signup

First Request

Construct a JSON body with the required fields: model (tts-1 or tts-1-hd), voice preset, and input text. The response contains the audio file, ready for immediate dataset integration. Ensure the input text does not exceed 4096 characters.

  • Endpoint: POST /v1/audio/speech
  • Standard JSON body format
  • Direct audio file response

Error Handling

Handle HTTP errors for rate limits (60 requests/minute) or invalid inputs. Failed synthesis requests are free, so retry logic should distinguish between network errors and billing failures. Use the /v1/voices endpoint to verify available presets before generation.

  • Rate limit: 60 requests per minute
  • Free retries on synthesis failure
  • Verify voices via /v1/voices

Data Privacy

Sound wave illustration for: Data Privacy

VoxMold ensures that input text is utilized exclusively for the immediate production of audio files and is not repurposed for training our underlying models. Once the synthesis process completes, the generated audio is returned directly in the response and is not retained on our servers, ensuring that your proprietary dataset content remains ephemeral during processing.

Input Usage

The text submitted in your API requests serves solely to generate the corresponding audio output. We do not ingest this text into our training datasets, preserving the integrity of your unique synthetic speech corpora for your specific machine learning applications.

Audio Storage

Generated audio files are streamed back to your client and are not stored persistently by our infrastructure. This ensures that your synthesized assets remain under your control without accumulation on our side, reducing storage overhead and maintaining data isolation.

Metadata Retention

We retain request metadata, including timestamps, character counts, and status codes, strictly for billing verification and usage tracking. This minimal data set allows us to process your USDT payments accurately and monitor the 60 requests per minute rate limit without retaining the actual audio or text content.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. The response headers may contain metadata about the character count processed.

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. Tether (USDT)
  3. curl documentation
  4. Creative Commons Attribution 4.0
  5. Python documentation
  6. FFmpeg documentation
  7. LibriTTS-R corpus (OpenSLR 141)
  8. TRON developer hub: TRC-20
  9. openai-node on GitHub
  10. MDN: Web Speech API
  11. LibriVox public-domain audiobooks
  12. IETF RFC 7845: Ogg Opus

More on this site