Integrate Our Cloud TTS API with JavaScript

By FlowSpeak editorial team · Updated 2026-11-19

This page shows indie developers how to integrate FlowSpeak’s cloud TTS API into web applications. You will learn to send text via fetch and receive audio files. The guide covers voice selection, language handling, and pricing to help you build accessible, license-safe speech features without client-side CPU load.

Designed for developers creating tools for accessibility and dyslexia, this example uses the OpenAI SDK structure with a simple base URL change. You get concrete code snippets, clear limits, and honest details about rate limits and formats. No hype, no missing promises—just reliable text-to-speech integration for your web apps.

Integrate Our Cloud TTS API with JavaScript

Frequently asked questions

What is the Web Speech API?

The Web Speech API is a browser standard that allows web applications to synthesize speech directly in the user’s browser. FlowSpeak provides a cloud-based API for generating audio files via HTTP requests. This approach offers greater control over voice selection, speed, and output formats like MP3 and WAV, ensuring reliable text-to-speech integration for accessible web apps.

Is this API suitable for dyslexia readers?

Yes, FlowSpeak is built for indie developers creating accessible web apps. Its clear, license-safe voices and straightforward JavaScript integration make it ideal for converting text to speech. By allowing precise control over speed and voice, it helps users with dyslexia read digital content more comfortably through auditory feedback.

Does the API support SSML?

No, the API does not support SSML. It accepts plain text input up to 4096 characters per request. You can control pronunciation and pacing using the speed parameter (0.25–4.0) and voice selection, but advanced markup for emphasis or pauses is not available in this text-to-speech endpoint.

Can I stream audio in JavaScript?

No, the API does not support streaming or WebSocket connections. You send a POST request with your text and receive the complete audio file in the response. For long texts, you must split the input into parts of up to 4096 characters and join the resulting audio files manually.

Are the voices licensed?

Yes, every generated file carries an inaudible watermark marking it as synthetic speech. The voices are based on licensed recordings from LibriTTS-R (CC BY 4.0) and public-domain audiobook readings from LibriVox. This ensures that your generated audio uses clear, license-safe voices suitable for commercial and personal web applications.

How does rate limiting work?

You are limited to 60 requests per minute per API key. Before your first top-up, the limit is 10 requests per minute. Requests are processed sequentially, so under load, a request may wait in a queue. Ensure your JavaScript implementation handles these limits to avoid delays in audio generation.

What happens if a request fails?

If synthesis fails, the charge is returned in full. Failed requests are free, so you are not billed for errors. This ensures that your usage costs accurately reflect successful audio generations. You can retry failed requests without worrying about incurring unnecessary charges for the same text input.

Is there a free trial?

Yes, signing in with Google provides $0.50 of credit, valid for 7 days, which covers about 50,000 characters. Accounts created with email and password start without trial credit. This allows you to test the API’s capabilities and integrate it into your JavaScript workflow before committing to a top-up.

Can I use USDT for payment?

Yes, top-ups are accepted via USDT on the TRON network (TRC-20) only. The minimum top-up is $5, and credits are automatically added within minutes. There are no cards, PayPal, or subscriptions. Your balance does not expire, and you can issue a new API key at any time.

Does the API support voice cloning?

No, the API does not support custom voice cloning or uploading your own voice. You choose from eight preset voices, such as Aria, Nova, or Felix. These voices are based on licensed recordings and are available for all supported languages, providing consistent and clear speech synthesis for your applications.

What is the maximum text length?

The maximum input text length is 4096 characters per request. For longer texts, you should split the content into chunks of up to 4096 characters and join the resulting audio files. This ensures efficient processing and avoids exceeding the single-request limit while maintaining audio continuity for your users.

Are voices language-specific?

No, any voice can speak any of the 23 supported languages. If the language field is not set, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, you should explicitly set the language parameter to ensure accurate pronunciation.

Is there an SLA guarantee?

No, there is no SLA, uptime guarantee, or enterprise contract. The API is designed for indie developers and accessible web apps, offering reliable performance without formal service level agreements. Requests are processed sequentially, so load may affect speed, but there are no guaranteed uptime metrics or certifications.

How do I contact support?

Support is available by email only. There is no phone number, live chat, or on-site contact form for immediate assistance. You can reach out via email for any questions regarding your API key, billing, or technical issues. Responses are provided through email, ensuring a direct line of communication for your queries.

First request

curl

curl https://api.hd44live.cc/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

Why use a cloud TTS API?

Sound wave illustration for: Why use a cloud TTS API?

Cloud TTS offloads synthesis to dedicated servers, ensuring consistent audio quality regardless of the user's device or browser. This reliability is critical for accessibility tools where predictable output prevents confusion for users with dyslexia or visual impairments.

By processing text on the server, you eliminate the CPU load on client devices. This ensures smooth performance even on low-end smartphones or older computers, keeping the main thread free for application logic.

Consistent voice quality

Consistent voice quality

Cloud processing guarantees uniform voice output across all platforms. Users receive the same clear, licensed audio whether they are on a high-end desktop or a budget mobile device, maintaining a professional standard for your web app.

No client-side CPU load

Synthesis happens remotely, so your JavaScript code remains lightweight. This prevents jank or lag during text-to-speech conversion, ensuring a seamless user experience without draining device batteries or overheating processors.

Accessibility compliance

Reliable audio output helps meet WCAG guidelines for content accessibility. By providing consistent, high-quality speech, you reduce cognitive load for users who rely on auditory feedback to navigate or consume text content.

How it works with JavaScript

Sound wave illustration for: How it works with JavaScript

Converting text to speech in JavaScript is straightforward. You send the text payload to the cloud endpoint and receive a binary audio file. This offloads processing from the client device, ensuring consistent voice quality without draining CPU resources during synthesis.

Send text via fetch

Use the standard fetch API to POST your text to https://api.hd44live.cc/v1/audio/speech. Include your API key in the Authorization header. The request body must contain the model, input text, and desired voice preset. Keep the input under 4096 characters.

  • Method: POST
  • Content-Type: application/json
  • Header: Authorization: Bearer tts-...

Receive audio file

The API returns the audio file directly in the response body. Failed requests are free and return no charge. The response format matches the OpenAI speech endpoint structure, allowing you to use existing OpenAI JavaScript SDKs by simply changing the base_url.

Play with HTML5 Audio

Create an Audio object using the response blob. The HTML5 <audio> element handles playback seamlessly. This workflow integrates easily with accessibility features, allowing users to listen to content without leaving the current page context.

Supported Languages

Sound wave illustration for: Supported Languages

FlowSpeak supports 23 languages, covering major global markets and niche requirements. Every voice can speak any of these languages, ensuring consistent quality regardless of the target audience. This flexibility allows indie developers to build accessible web apps that serve diverse user bases without managing multiple voice models.

23 languages supported

We cover Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Voices are not locked to specific languages; any preset can deliver natural-sounding speech in any supported tongue.

Auto-detection logic

The API guesses the language from the text script. Latin script text defaults to English. This works well for English content, but you should set the language explicitly for other Latin-script languages to avoid misidentification.

Explicit language codes

Pass the ISO language code in the request body to ensure accurate synthesis. This is crucial for non-English Latin text or mixed-language inputs. Without this, the API may default to English, resulting in incorrect pronunciation.

We do not support Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali and all others not in the list.

  • Set language parameter for non-English Latin text.
  • Use ISO codes for precise control.
  • Check /v1/voices for the full list.

Available Voices

Sound wave illustration for: Available Voices

FlowSpeak offers eight distinct voice presets designed for clarity and reliability in web applications. Each voice is engineered to handle specific tonal needs, from warm narration to energetic promotions, ensuring your content sounds professional without requiring complex configuration.

The voices are consistent across all 23 supported languages, allowing a single voice preset to deliver natural-sounding output regardless of the input language. This simplifies integration for developers building multilingual accessibility tools.

Female presets

Four female voices cover a range of expressive styles. Aria provides a warm, clear narrator tone suitable for long-form content. Nova offers a bright, upbeat delivery ideal for short announcements. Luna delivers a soft, storytelling cadence, while Sage maintains a calm, instructional pace for educational materials.

  • Aria: warm, clear narrator
  • Nova: bright, upbeat
  • Luna: soft, storytelling
  • Sage: calm, instructional

Male presets

Four male presets provide versatile options for different content types. Felix brings an energetic tone perfect for promotional content. Milo offers a friendly, conversational style for user interfaces. Atlas delivers a neutral, news-like delivery, and Orion provides a deep, documentary-style voice for immersive experiences.

  • Felix: energetic, promo
  • Milo: friendly, conversational
  • Atlas: neutral, news
  • Orion: deep, documentary

Licensed recordings

All voices are based on licensed recordings from LibriTTS-R (CC BY 4.0), sourced from LibriVox public-domain audiobook readings. This foundation ensures high-quality, license-safe audio generation. Each generated file includes an inaudible watermark to identify it as synthetic speech.

Pricing Overview

Sound wave illustration for: Pricing Overview

FlowSpeak charges $10 per 1 million characters, equivalent to $0.01 per 1,000 characters. Spaces and punctuation count toward this total. Failed requests are free, with charges returned in full if synthesis fails.

There are no monthly plans, seats, or minimum spends. You pay only for what you use. Balances do not expire, and you can top up at any time.

Pay per character

The cost is strictly usage-based. You are billed $10 per 1 million characters processed. This rate applies to all models, including tts-1 and tts-1-hd.

Character counts include spaces and punctuation. If a request fails during synthesis, you are not charged, and any pre-deducted amount is returned immediately.

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

No monthly fees

FlowSpeak operates on a pure pay-as-you-go model. There are no recurring subscription costs, no seat limits, and no minimum spend requirements. This structure allows indie developers to scale costs directly with usage without worrying about unused capacity.

Top-ups are processed via USDT on the TRON network (TRC-20) only. Minimum top-up is $5, with automatic crediting within minutes. No cards, no PayPal, no subscriptions, no invoices with VAT.

Free trial credit

New accounts created via Google sign-in receive $0.50 in trial credit, valid for 7 days. This covers approximately 50,000 characters, allowing you to test the API thoroughly before committing funds.

Accounts created with email and password do not receive this trial credit. You can start using the API immediately after topping up your balance.

Pricing Overview

Technical Limits

Sound wave illustration for: Technical Limits

Understanding the technical boundaries ensures your application remains stable under load. FlowSpeak enforces strict request limits and character constraints to maintain consistent synthesis quality for all users.

Rate limits

Each API key is limited to 60 requests per minute. New accounts start with a lower threshold of 10 requests per minute until the first top-up is processed.

Character limits

Each API request accepts a maximum of 4,096 characters. For longer texts, split your input into chunks of this size and join the resulting audio files client-side.

Queue processing

Requests are processed sequentially. Under high load, a request may wait in a queue before synthesis begins. Short phrases typically take a few seconds to generate.

Audio Formats

Sound wave illustration for: Audio Formats

The API supports multiple output formats to suit different playback environments. You can choose between compressed MP3 for efficient bandwidth usage or uncompressed WAV for maximum fidelity in professional audio pipelines.

MP3 support

MP3 is the default and most widely compatible format for web delivery. It offers a good balance between file size and audio quality, making it ideal for embedding audio players in accessibility-focused web applications without excessive bandwidth consumption.

WAV clarity

WAV provides uncompressed audio.

FLAC lossless

FLAC offers lossless compression.

  • Smaller than WAV
  • Perfect for archiving
  • No encoding artifacts

Data Privacy

Sound wave illustration for: Data Privacy

Your input text is processed strictly to generate the requested audio file and is not used for model training. The generated audio is returned in the API response and is not stored on our servers, ensuring that your content remains ephemeral and private.

We retain only request metadata—such as timestamp, character count, and status—necessary for accurate billing and usage tracking. This minimal data collection supports transparent usage without compromising the confidentiality of your source texts.

No training on input

Unlike some consumer services, we do not use your submitted text to improve our voice models or train future iterations. The text you send is used solely for the immediate synthesis of the audio file you request.

No audio storage

Generated audio files are delivered directly in the response and are not persisted on our infrastructure. Once the transmission is complete, the audio content is gone, ensuring that your spoken content does not linger in our storage systems.

Metadata billing only

We keep only the metadata required for billing and debugging: request time, character count, and status. This limited dataset allows you to verify charges and monitor usage without exposing the actual content of your TTS requests.

Getting Started

Sound wave illustration for: Getting Started

Access the /get-api-key/ page to generate your unique API key. You can sign in with Google for an instant $0.50 trial credit (valid 7 days) or use email and password. The dashboard displays your key, current balance, and usage statistics immediately.

Get your API key

Navigate to the account setup page to create your credentials. Choose Google authentication for immediate trial credit or standard email registration. Your active key appears on the dashboard, ready for copy-paste into your application headers.

  • Sign up via /get-api-key/ with Google or email
  • Google sign-ins receive $0.50 trial credit (7 days)
  • Email accounts start with zero balance
  • Keys are issued instantly; revoke old ones anytime

Install OpenAI SDK

Use the official OpenAI JavaScript SDK, as our API mirrors its request shape. Install the package via npm or yarn. Configure the client by setting the base URL to https://api.hd44live.cc/v1 and injecting your Bearer token.

  • npm install openai
  • Set base_url to https://api.hd44live.cc/v1
  • Pass key via Authorization: Bearer header
  • Use standard tts-1 or tts-1-hd models

First request example

Send a POST request to /v1/audio/speech with your text, voice selection, and desired format. The API returns an audio file directly. Handle the response to play the audio using standard HTML5 audio elements or save it locally.

Remember that requests are processed sequentially. Ensure your implementation handles the 60 requests per minute limit gracefully to avoid queuing delays during high usage.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Failed requests are free, ensuring you only pay for successful synthesis.

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. FFmpeg documentation
  3. ISO 639 language codes
  4. Creative Commons Attribution 4.0
  5. Python documentation
  6. IETF RFC 7845: Ogg Opus
  7. OpenAI API reference: create speech
  8. openai-python on GitHub
  9. curl documentation
  10. W3C WAI: making audio and video accessible
  11. LibriTTS-R paper (arXiv 2305.18802)
  12. TRON developer hub: TRC-20

More on this site