Frequently asked questions
What is the speech API JavaScript?
It is a cloud text-to-speech API accessible via standard HTTP requests or the OpenAI SDK. You send a JSON payload with text, voice, and model parameters to the endpoint. The service returns an audio file, allowing you to integrate synthetic speech directly into your JavaScript-based language learning applications for pronunciation drills and reading practice.
How does the TTS API work for language learning?
Send text up to 4096 characters via POST request to receive an audio file. The API supports 23 languages, allowing teachers to generate pronunciation audio for specific vocabulary. You can adjust speed between 0.25 and 4.0 to aid listening comprehension. The synthetic speech includes an inaudible watermark, ensuring clear identification of generated educational content.
Which languages are supported in the API?
The API supports 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 the language is not set, it defaults to English for Latin script.
Can I use the API with the OpenAI SDK?
Yes. The API uses the same request shape as the OpenAI speech endpoint. You can use the official OpenAI SDKs by changing the base URL to https://api.iclub88.cc/v1 and providing your API key. This allows seamless integration into existing JavaScript projects that already utilize the OpenAI client library for other services.
What is the cost per character?
The cost is $10 per 1 million characters, or $0.01 per 1,000 characters. Spaces and punctuation count toward the character limit. Failed requests are free, with the charge returned in full. There are no monthly plans or minimum spends, making it suitable for variable usage in educational platforms.
Is there a free trial available?
Yes, signing in with Google provides $0.50 of credit, valid for 7 days, which covers approximately 50,000 characters. Accounts created with email and password start without trial credit. You can top up using USDT on the TRON network, with a minimum of $5, to continue using the service after the trial.
How are voices selected for different languages?
You select from 8 presets: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, or Orion. Any voice can speak any of the 23 supported languages. You specify the voice and optional language code in the request. If no language is set, the system guesses it, defaulting to English for Latin script text.
Does the API support streaming audio?
No, the API does not support streaming, WebSocket, or real-time partial audio. It returns the complete audio file upon request completion. Requests are processed sequentially, so under load, there may be a queue. Typical speed is roughly real-time for long texts, but short phrases may take a few seconds.
Can I clone a specific voice for my course?
No, the API does not offer custom voice cloning or uploading of your own voice. The 8 available voices are based on licensed recordings from LibriTTS-R and LibriVox. Each generated file carries an inaudible watermark marking it as synthetic speech. You cannot create custom voice designs or emotion tags.
What happens if a request fails?
If synthesis fails, the charge is returned in full. You are not billed for failed requests. This ensures that you only pay for successfully generated audio files. You can retry the request with the same parameters or adjust the input text if the failure was due to content limits.
Is my input text stored after generation?
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. Request metadata, including time, characters, and status, is kept for billing purposes. This ensures privacy for your educational content while maintaining accurate usage records.
Can I use the generated audio commercially?
Yes. The voices are based on licensed recordings (LibriTTS-R CC BY 4.0) and public-domain audiobook readings. You can use the generated audio in your educational tools without additional licensing fees. Each file carries an inaudible watermark marking it as synthetic speech. Input text is not used for training, and generated audio is not stored.
What formats are supported for audio output?
The API supports mp3, wav, opus, flac, and pcm formats. You specify the desired format in the response_format field of the JSON request body. This allows flexibility in integrating audio into different JavaScript applications, whether for web playback, offline storage, or further processing in language learning software.
How do I handle long texts in JavaScript?
Split texts into parts of up to 4096 characters per request. Generate audio for each part separately, then join the audio files in your JavaScript application. This approach ensures compliance with the character limit while allowing you to create longer educational content, such as full lesson readings or story segments.
First request
curl
curl https://api.iclub88.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.mp3Why JavaScript for TTS in Education?
JavaScript enables synthesis of pronunciation drills and reading practice audio within modern educational web applications. By leveraging native browser capabilities or lightweight server-side scripts, educators can generate high-quality speech on demand without complex middleware.
Real-time pronunciation generation
Send text via JSON and receive audio files instantly. This allows students to hear pronunciation of vocabulary words or short phrases directly within the learning interface.
- Supports up to 4096 characters per request
- Generates MP3, WAV, OPUS, FLAC, or PCM
- Processes requests sequentially with queue support under load
Easy integration with LMS platforms
The API uses a standard JSON structure compatible with the OpenAI SDK. By adjusting the base URL to https://api.iclub88.cc/v1, existing JavaScript libraries work immediately, simplifying integration into Moodle, Canvas, or custom LMS dashboards.
- Standard HTTP POST requests
- Bearer token authentication
- No custom SDK required
Client-side or server-side synthesis
Synthesis can occur in the browser for interactive exercises or on the server to handle larger text blocks. Both approaches utilize the same endpoint, allowing flexible architecture based on your platform's specific network and performance requirements.
Supported Languages for Learning
The API supports 23 languages, including Spanish, French, and Japanese, enabling educators to generate audio for diverse learners. This range covers major European and Asian languages, ensuring that pronunciation drills and reading practice materials are accessible across different linguistic backgrounds.
23 languages including Spanish, French, Japanese
Supported languages include 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, allowing teachers to mix voices across different language exercises seamlessly.
Voice consistency across languages
The same voice preset can be used across all supported languages. For example, 'aria' provides a clear narration style in French, while 'atlas' delivers a neutral tone for German news texts. This consistency helps students recognize familiar vocal qualities even when the language changes.
Automatic language detection
If the language field is omitted, the API guesses the language from the script. Latin script defaults to English. For non-English Latin text, set the language parameter explicitly to avoid misidentification. This simplifies integration for lessons that switch between languages frequently.
- Latin script defaults to English if
languageis not set - Explicit
languagecode recommended for non-English Latin text - Not supported: Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali
Voice Presets for Educational Contexts
Select voices that match your pedagogical goals. Our eight presets cover narration, dialogue, and neutral delivery, ensuring consistent audio quality across your curriculum materials.
Each voice is based on licensed recordings, providing clear speech. You can mix voices within a single lesson to maintain student engagement without sacrificing clarity.
Clear narration voices for reading
Use aria for warm, clear storytelling or luna for soft, narrative passages. These voices excel in reading exercises where intelligibility is paramount.
Sage offers a calm, instructional tone suitable for step-by-step grammar explanations or vocabulary drills.
- Aria: Warm, clear narrator
- Luna: Soft, storytelling voice
- Sage: Calm, instructional
Conversational voices for dialogue
Nova provides a bright, upbeat tone for interactive exercises, while milo offers a friendly, conversational style for role-playing scenarios.
These presets help simulate natural speech patterns, aiding students in understanding rhythm and intonation in target languages.
- Nova: Bright, upbeat
- Milo: Friendly, conversational
- Felix: Energetic, promo
Neutral voices for news and facts
Atlas delivers a neutral, news-style delivery ideal for factual content or objective reading passages. Orion provides a deep, documentary tone for longer, structured texts.
Use these voices when emotional inflection might distract from the linguistic content being studied.
- Atlas: Neutral, news
- Orion: Deep, documentary
Technical Specifications
The API endpoint POST https://api.iclub88.cc/v1/audio/speech accepts standard JSON bodies identical to the OpenAI speech endpoint. You can use the official OpenAI SDKs by simply changing the base_url to https://api.iclub88.cc/v1 and providing your API key.
Requests require a model (tts-1 or tts-1-hd), input text up to 4096 characters, and a voice preset. Audio is returned directly in the response, allowing immediate playback or storage in your educational application.
JSON API compatible with OpenAI SDK
Send text via a standard POST request. The response contains the audio file in the requested format. This structure allows seamless integration with existing JavaScript libraries and educational platforms without requiring custom parsing logic.
Authentication is handled via the Authorization: Bearer header using your unique API key. One active key per account ensures consistent billing and usage tracking across your integration.
- Endpoint: POST /v1/audio/speech
- SDK: Compatible with OpenAI JavaScript SDK
- Auth: Bearer token in header
Support for MP3, WAV, OPUS, FLAC, PCM
Select the response_format parameter to match your delivery needs. MP3 and OPUS are efficient for web playback and mobile data usage. WAV and FLAC provide lossless quality for archival or high-fidelity pronunciation drills.
PCM offers uncompressed raw audio data, suitable for real-time processing pipelines. All formats are generated upon successful synthesis.
- MP3: Standard web audio
- WAV: Lossless quality
- OPUS: Efficient compression
- FLAC: Lossless archive
- PCM: Raw audio data
Rate limits: 60 requests per minute
Each API key supports up to 60 requests per minute. This limit is sufficient for most classroom and individual usage patterns. New accounts start with a lower limit of 10 requests per minute until the first top-up.
Requests are processed sequentially. Under heavy load, synthesis may queue briefly. Failed requests do not consume credits, allowing you to retry without penalty.
- Limit: 60 requests/minute
- New accounts: 10 requests/minute
- Retry failed requests free
Pricing for Educational Volume
Pricing scales directly with usage, eliminating fixed overhead for schools or independent teachers. At $0.01 per 1,000 characters, you pay only for what you generate. This model suits variable teaching loads, where pronunciation drills or reading practice audio may fluctuate week to week.
Pay per character ($0.01 per 1000 chars)
Costs are calculated based on the exact character count of your input text, including spaces and punctuation. Failed requests are refunded in full, ensuring you never pay for unused synthesis. This transparency allows precise budgeting for large-scale educational content generation.
- Rate: $10 per 1 million characters
- Spaces and punctuation count as characters
- Failed requests are free
No monthly plans or hidden fees
There are no subscriptions, seats, or minimum spend requirements. You retain your API key and balance indefinitely. Top-ups via USDT (TRC-20) are processed automatically within minutes, with no invoices or VAT complications. This structure supports flexible, on-demand audio production without recurring commitments.
Free trial credit available
Signing in with Google provides $0.50 of trial credit, sufficient for approximately 50,000 characters. This allows immediate testing of voice presets and integration workflows. Accounts created with email and password start without this initial credit, requiring a manual top-up to begin.
- Credit: $0.50 (~50,000 characters)
- Valid for 7 days
- Available for Google sign-ins only

Integration Example
Integrating the TTS API into your language learning platform requires minimal code. Use the standard fetch API to send text to the synthesis endpoint. This approach works for both client-side and server-side implementations, ensuring seamless compatibility with your existing LMS or web application.
The request body follows the OpenAI-compatible JSON structure. Specify the model, input text, voice preset, and desired audio format. The API returns the audio file directly, allowing you to play it immediately or store it for later use in your educational content.
Simple fetch request in JavaScript
Send a POST request to the speech endpoint with your API key and text parameters.
```javascript fetch('https://api.iclub88.cc/v1/audio/speech', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer tts-<your-api-key>' }, body: JSON.stringify({ model: 'tts-1', input: 'Hello, welcome to our language lesson.', voice: 'aria', response_format: 'mp3' }) }); ```
- Include your unique API key in the Authorization header.
- Set the model to 'tts-1' or 'tts-1-hd'.
- Pass the text string in the 'input' field.
- Select a voice preset that matches the educational context.
Handling audio response
The API returns the audio file as binary data. Convert the response to a Blob and create a URL for playback. This allows immediate audio generation without additional processing steps.
```javascript fetch('https://api.iclub88.cc/v1/audio/speech', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer tts-<your-api-key>' }, body: JSON.stringify({ model: 'tts-1', input: 'Practice pronunciation with this sentence.', voice: 'nova', response_format: 'mp3' }) }) .then(response => response.blob()) .then(blob => { const audioUrl = URL.createObjectURL(blob); const audio = new Audio(audioUrl); audio.play(); }); ```
- Convert the response to a Blob object.
- Create a URL for the Blob using URL.createObjectURL.
- Initialize an Audio object with the generated URL.
- Call the play method to start audio playback.
Error handling for failed synthesis
Handle errors gracefully to ensure a smooth user experience. If the synthesis fails, the API returns an error status. Check the response status and display an appropriate message to the user.
```javascript fetch('https://api.iclub88.cc/v1/audio/speech', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer tts-<your-api-key>' }, body: JSON.stringify({ model: 'tts-1', input: 'Invalid input text.', voice: 'aria', response_format: 'mp3' }) }) .then(response => { if (!response.ok) { throw new Error('Synthesis failed'); } return response.blob(); }) .then(blob => { const audioUrl = URL.createObjectURL(blob); const audio = new Audio(audioUrl); audio.play(); }) .catch(error => { console.error('Error:', error); }); ```
- Check if the response status is OK.
- Throw an error if the synthesis fails.
- Log the error message for debugging.
- Display a user-friendly message if playback fails.
Data Privacy and Usage
The input text you send to the API is used exclusively to generate the target audio file. It is not retained for model training or to improve future voice synthesis, ensuring your educational content remains private.
Generated audio is returned directly in the API response and is not stored on our servers after delivery. This minimizes data exposure, making the workflow suitable for sensitive classroom materials or proprietary language exercises.
Text not used for training
Your input text is processed solely to create the audio output for that specific request. It is not added to any training dataset or used to refine the underlying engine models, keeping your curriculum content distinct from our development data.
Audio returned in response, not stored
The synthesized audio file is transmitted to your client or server immediately upon completion. We do not persist the audio files themselves, reducing storage dependencies and ensuring that your generated pronunciation guides or reading exercises remain under your control.
Metadata kept for billing only
We retain minimal request metadata, including timestamp, character count, and status, strictly to calculate usage and process charges. This data supports accurate billing for your $0.01 per 1000 characters plan and does not include the content of your text or audio.
Common Use Cases
Text-to-speech integration allows educators to convert reading lists into audio, enabling students to practice listening skills alongside reading. By sending text via JavaScript, teachers can provide consistent pronunciation models that align with course materials without manual recording.
This approach ensures that every student hears the same clear narration, supporting standardized learning outcomes across different devices and browsers.
Generating audio for reading lists
Convert static texts into audible formats for students to review on the go. The API handles character limits by splitting longer passages into parts of up to 4096 characters.
Educators can generate audio files in formats like MP3 or WAV, which are universally supported by learning management systems and mobile apps.
- Supports 23 languages for diverse student bodies
- Automatic language detection simplifies content preparation
- Audio files are returned directly in the response
Creating pronunciation guides
Use specific voices like Aria or Nova to generate clear, slow-paced audio for difficult words or phrases. Teachers can adjust the speed parameter to help learners focus on individual syllables and intonation patterns.
This is particularly useful for languages with complex phonetic rules, providing a reliable reference for students practicing aloud.
- Adjustable speed from 0.25x to 4.0x
- Clear, neutral voices reduce ambiguity
- Ideal for drill exercises and self-study
Supporting accessibility in apps
Integrate TTS into educational tools to provide auditory access for students with visual impairments or dyslexia. By converting text to speech, apps can offer an inclusive experience without requiring specialized hardware.
The API’s data handling ensures that student content remains private.
- Compatible with standard web technologies
- No custom SDK required
- Supports screen readers and audio players
Getting Started
Start with a free trial credit to test the API. Sign up via Google or email on /get-api-key/ to receive $0.50 valid for 7 days. This allows approximately 50,000 characters of synthesis without payment.
Generate your unique API key directly from the dashboard. Keys are single-tenant; issuing a new one immediately invalidates the previous one. Store this key securely for client-side or server-side requests.
Sign up for a free trial
Register on /get-api-key/ using Google or email. Google sign-ins receive $0.50 trial credit automatically. Email accounts start with zero balance.
- Google sign-up: $0.50 credit, 7-day validity
- Email sign-up: no initial credit
- Instant account creation
Generate your API key
Retrieve your key from the dashboard after registration. The key authenticates all requests to https://api.iclub88.cc/v1. You can generate a new key at any time, which instantly deactivates the old one.
- Single active key per account
- Instant invalidation of old keys
- Found in user dashboard
Start sending text requests
Use the key in the Authorization header. Send POST requests to /v1/audio/speech with text input. Failed requests are free; charges apply only for successful synthesis.
- Use Authorization: Bearer tts-... header
- POST to /v1/audio/speech endpoint
- Failed requests incur no cost
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Each voice is independent and does not require custom configuration.
23 languages
Any voice speaks any of these languages.
