Frequently asked questions
What is text to speech library python?
Our TTS API is a cloud service accessible via standard HTTP requests. You can use the official OpenAI Python SDK by changing the base_url to https://api.okwe.info/v1. Send a JSON body with your text, voice selection, and desired format to receive an audio file directly in your Python application without managing complex infrastructure.
Which TTS voices are best for educational content?
For educational content, we recommend sage for calm, instructional narration or luna for soft storytelling. Aria offers a warm, clear narrator style suitable for general course material. These eight presets are based on licensed recordings from LibriTTS-R, ensuring consistent synthetic speech.
How does the Python integration work with OpenAI SDKs?
The API follows the same request shape as the OpenAI speech endpoint. Simply update the OpenAI Python SDK's base_url to https://api.okwe.info/v1 and use your specific API key. This allows you to leverage familiar SDK methods for generating audio, making integration into existing Python workflows straightforward and efficient for product teams.
What is the cost per character for TTS in LMS platforms?
Pricing is $0.01 per 1,000 characters, or $10 per million characters. Spaces and punctuation count toward the total. Failed requests are free, with charges returned in full. This transparent model helps LMS providers predict costs accurately for course audio generation without hidden fees or minimum spend requirements, supporting cost-effective scaling.
Do you support multiple languages for global courses?
Yes, we support 23 languages including English, Spanish, German, French, Japanese, and Hindi. Any voice can speak any of these languages. If the language is not specified, the system guesses from the script, but we recommend setting the language parameter explicitly for non-English Latin-script text to ensure accurate pronunciation and clarity.
How fast is the audio generation for long lessons?
Typical speed is roughly real-time, generating about 25 characters of text per second of audio. Short phrases may take a few seconds, while longer texts are processed sequentially. Under load, requests may wait in a queue, but the output is generally available quickly enough for efficient LMS content pipeline integration.
Is there a limit on the length of text per request?
Each request supports up to 4096 characters of input text. For longer lessons, you should split the text into parts of this size and join the resulting audio files. This approach ensures consistent quality and allows your Python scripts to handle large course modules by breaking them into manageable API calls.
Do you store the generated audio files?
Generated audio is returned in the response and is not stored by our API. Input text is used only to produce the audio and is not stored for training purposes. We keep request metadata, such as time and character count, solely for billing and usage tracking, ensuring your course data remains private.
Is the input text used for training models?
No, your input text is used exclusively to generate the audio file for that specific request. It is not used for training our models. This ensures that your unique course content remains distinct and is not repurposed for improving the underlying synthesis engine, maintaining the integrity and originality of your educational materials.
What payment methods are accepted for top-ups?
We accept USDT on the TRON network (TRC-20) for top-ups. The minimum amount is $5, and credits are automatically added within minutes. We do not accept credit cards, PayPal, or offer subscriptions. This crypto-only method simplifies international payments for global LMS providers without the need for invoices or VAT handling.
How long is the free trial valid?
The free trial provides $0.50 of credit, equivalent to about 50,000 characters. It is valid for 7 days and is granted when you sign in with Google. Accounts created with an email and password start without this trial credit, allowing you to test the API's quality before committing to a top-up.
Can I use the API for commercial courses?
Yes, you can use the API for commercial courses without restriction. There are no monthly plans, seats, or minimum spend requirements. You pay only for the characters you generate, making it ideal for scaling educational content production. The synthetic speech includes an inaudible watermark that marks it as synthetic speech.
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 any issues during audio generation do not impact your LMS budget. You can retry the request or adjust parameters like speed or voice, knowing that you only pay for successful audio outputs.
Do you offer enterprise contracts for large LMS providers?
We do not offer enterprise contracts, SLAs, or uptime guarantees. There is no on-premise install option. Support is by email only. This structure keeps costs low and flexible, allowing LMS providers to scale usage directly with their character consumption.
First request
curl
curl https://api.okwe.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.mp3Why Python for LMS Audio?
Python is the standard language for modern LMS backends, making it the natural choice for integrating synthetic speech into your learning modules. By using the official OpenAI SDK with a simple base_url change, you can inject audio generation directly into your existing content pipelines.
This approach keeps your codebase clean and maintainable. Product teams can leverage familiar libraries to handle text preprocessing, character counting, and audio delivery, ensuring that audio assets are generated on-demand and ready for playback in any learning environment.
Seamless Backend Integration
The API endpoint mirrors the standard speech interface, meaning your existing Python scripts for handling course metadata can easily be extended to fetch audio files. You send a JSON payload with text and voice selection, and receive an audio file ready for embedding in your LMS player.
- Compatible with standard OpenAI Python SDKs
- Simple JSON request structure
- No custom middleware required
Cost-Effective Scaling
Educational content often requires generating thousands of distinct audio files. With a flat rate of $0.01 per 1,000 characters, you can predict costs precisely. There are no monthly fees or minimum spend requirements, so you only pay for the audio your students actually consume.
- $0.01 per 1,000 characters
- No monthly subscriptions
- Pay only for what is generated
Easy Content Updates
When course text changes, you can regenerate audio instantly without re-recording. Python scripts can automate this process, scanning for updated text and triggering synthesis only where needed. This keeps your learning modules current with minimal developer effort.
- Regenerate audio on text changes
- Automate with Python scripts
- No re-recording needed
Voices for Education
Choosing the right voice ensures your course content remains engaging without sounding robotic. Our eight presets are designed for specific educational contexts, from clear narration to friendly instruction.
Each voice is based on licensed recordings, ensuring high quality while keeping costs predictable.
Clear Narrators for Lectures
Use Aria or Luna for standard lecture content. Aria provides a warm, clear narration style ideal for dense information, while Luna offers a softer, storytelling approach that keeps learners engaged during longer explanations.
These voices handle complex sentences well, ensuring clarity without straining the listener's ear during extended study sessions.
- Aria: Warm, clear narrator for dense content
- Luna: Soft, storytelling style for engagement
Conversational Tutors
Nova and Milo bring energy and friendliness to tutorials. Use Nova for upbeat, bright introductions or quick tips. Milo’s conversational tone works well for step-by-step guides, making the learning experience feel personal.
Sage offers a calm, instructional voice perfect for instructional modules where a steady, reassuring tone helps learners focus on the material without distraction.
- Nova: Bright, upbeat for quick tips
- Milo: Friendly, conversational for tutorials
- Sage: Calm, instructional for focus
Neutral News Style for Facts
Atlas and Orion provide distinct tones for factual content. Atlas delivers a neutral, news-like delivery suitable for data-heavy modules or objective summaries. Orion offers a deep, documentary style for immersive historical or scientific topics.
These voices ensure that factual content is delivered with authority and clarity, avoiding any unintended emotional bias that might distract from the core information.
- Atlas: Neutral, news style for data
- Orion: Deep, documentary for immersion
Supported Languages
LMS platforms serve global audiences, but synthetic speech must match the learner’s language precisely. Our API supports 23 languages, covering major educational markets from English and Spanish to Hindi and Arabic. This allows you to localize course content without hiring separate voice actors for each region.
23 Languages for Global Reach
We support 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 preset can speak any of these languages, ensuring consistent audio quality across your entire curriculum regardless of the target region.
- Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
Automatic Language Detection
The API guesses the language from the script if you do not specify it. Latin-script text defaults to English, while other scripts trigger the appropriate voice model. This reduces configuration overhead for simple monolingual courses, allowing you to generate audio quickly without managing language flags for every lesson.
Explicit Language Setting
For mixed scripts or non-English Latin text, set the language parameter using an ISO code. This ensures accurate pronunciation and intonation, preventing the engine from misinterpreting foreign terms as English. Explicit settings are crucial for technical lectures where precise terminology matters more than speed.
How It Works
Generate audio by sending a JSON payload to the speech endpoint. The API processes your text and returns the audio file directly in the response, making integration into your LMS backend straightforward.
Send Text, Receive Audio
Send your course text via POST request. The service returns the synthesized audio immediately, allowing you to embed it directly into your learning modules without managing complex file transfers.
- JSON request body
- Direct audio response
Fast Generation Speed
Long texts generate at roughly real-time speed, producing about 25 characters of text per second. Short phrases may take a few seconds, while longer content is processed sequentially, so requests may queue under load.
Multiple Audio Formats
Choose from mp3, wav, opus, flac, or pcm to match your LMS player requirements. This flexibility ensures compatibility with various learning management systems and accessibility tools.
Pricing for Course Creators
Pricing is straightforward: $0.01 per 1,000 characters, including spaces and punctuation. Failed requests are free, ensuring you only pay for successful audio generation. This model scales naturally with your course volume.
There are no monthly fees, seats, or minimum spends. Your balance never expires, making it ideal for long-tail educational content creation without recurring overhead costs.
Pay Per Character
You are charged $10 per 1 million characters generated. This rate applies to both the "tts-1" and "tts-1-hd" models. Since spaces and punctuation count as characters, plan your text length accordingly to maximize your budget.
- $0.01 per 1,000 characters
- Spaces and punctuation count
- Failed requests are free
No Monthly Fees
The platform operates on a pure usage basis. There are no subscriptions, no annual commitments, and no hidden fees for additional seats or features. This structure allows product teams to align audio costs directly with course launches.
Crypto Top-Up
Top up your balance using USDT on the TRON network (TRC-20). The minimum top-up is $5, and credits are added automatically within minutes. This method avoids card processing delays and supports global creators efficiently.
- USDT (TRC-20) only
- Minimum $5 top-up
- Automatic credit within minutes

Technical Requirements
The API follows the OpenAI speech endpoint structure, allowing you to use the official OpenAI Python SDK by simply adjusting the base_url to https://api.okwe.info/v1. This compatibility means you can reuse existing integration code with minimal changes, pointing your client to our domain instead of OpenAI's while using your unique tts-... API key for authentication.
OpenAI SDK Compatibility
By setting the base_url to https://api.okwe.info/v1, the standard OpenAI Python SDK works seamlessly. You only need to update the base URL and provide your specific site key, ensuring a smooth transition for teams already familiar with the OpenAI ecosystem for audio generation tasks.
Rate Limits Explained
Your API key allows 60 requests per minute once funded. New accounts start with a limit of 10 requests per minute until the first top-up is processed. This steady throughput is sufficient for most LMS batch processing workflows without requiring complex queue management.
Character Limits per Request
Each API call accepts a maximum of 4096 characters in the input field. For longer lecture scripts, split the text into chunks of this size, generate each part, and concatenate the resulting audio files. This approach ensures consistent quality and avoids timeouts on lengthy educational content.
Data Privacy
Your course content remains yours. We use your input text solely to generate the requested audio file and do not use it to train or improve our models. Once the audio is delivered, it is not stored on our servers, ensuring your intellectual property stays private.
No Training on Your Data
Unlike some consumer-grade TTS services, we do not repurpose your educational scripts for model training. Your text is processed strictly for the immediate generation of the audio response.
No Audio Storage
Generated audio files are returned directly in the API response and are not permanently stored by us. This minimizes the risk of your course narration being accessed or retained by our infrastructure.
Minimal Metadata
We retain only the metadata necessary for billing and service operations, such as request timestamps, character counts, and status codes. This limited data ensures transparency without unnecessary surveillance of your usage patterns.
- Request time and date
- Character count processed
- Request status (success/failure)
- API key identifier
Getting Started
Start your LMS audio workflow with a risk-free trial. Sign up via Google or email to receive $0.50 in credit, valid for seven days, covering approximately 50,000 characters.
Sign Up for Trial
Create your account at /get-api-key/ using your Google credentials or a simple email and password. This grants immediate access to your trial balance without requiring a credit card or subscription.
Get Your API Key
Once registered, your dashboard displays your unique API key. This key authenticates all requests to the Python SDK. You can regenerate it instantly at any time, which invalidates the previous key immediately.
First Python Request
Install the OpenAI SDK and configure the base URL to https://api.okwe.info/v1. Send a simple POST request with your key, a voice preset like 'aria', and your course text to receive an audio file.
- Base URL: https://api.okwe.info/v1
- Auth: Authorization: Bearer <your-key>
- Model: tts-1 or tts-1-hd
Common Use Cases
Python scripts can automate the generation of audio assets for your learning modules, ensuring consistent quality across all courses. This approach allows product teams to scale audio production without hiring voice actors for every new lesson.
By integrating directly with your LMS backend, you can trigger speech synthesis on demand or in batches, keeping your content library fresh and accessible without manual intervention.
Accessibility for Visually Impaired
Convert text-based course materials into clear audio lectures instantly. Using voices like Aria or Sage, you can provide narrated versions of PDFs or slides, making your content compliant with accessibility standards without significant overhead.
The API handles the heavy lifting, allowing you to offer an audio option alongside text for any module, improving engagement for diverse learners.
- Supports 23 languages for global accessibility
- No need for custom SSML or pronunciation dictionaries
Multi-Language Course Versions
Translate your core curriculum into multiple languages using the same voice presets. With automatic language detection or explicit ISO codes, you can generate parallel audio tracks for Spanish, French, or German learners from a single source text.
This ensures tonal consistency across all language versions, maintaining your brand’s educational voice regardless of the target audience’s native tongue.
- 23 supported languages including Arabic, Hindi, and Japanese
- Consistent voice identity across all translations
Rapid Prototyping
Test new course concepts with audio before committing to full production. Generate short samples using the free trial credit to evaluate voice suitability for your specific topic, whether it’s a technical tutorial or a soft-skills guide.
Iterate quickly by adjusting speed or voice parameters in your Python script, allowing your team to refine the listening experience before scaling to full course modules.
- Quick turnaround for short phrases
- Easy integration with existing Python workflows
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. This ensures consistent acoustic properties across all eight presets, making them reliable for educational content.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- MDN: Web Speech API
- Creative Commons Attribution 4.0
- FFmpeg documentation
- LibriTTS-R paper (arXiv 2305.18802)
- Node.js documentation
- LibriTTS-R corpus (OpenSLR 141)
- openai-node on GitHub
- LibriVox public-domain audiobooks
- W3C WAI: making audio and video accessible
- TRON developer hub: TRC-20
- curl documentation
