Frequently asked questions
Does the LMS need a specific plugin?
No specific plugin is required. The API uses a standard JSON request shape compatible with the OpenAI SDKs. You can integrate it by setting the base_url to https://api.m9871.info/v1 and using your API key. This allows direct HTTP integration or custom scripting without relying on proprietary WordPress plugins or mobile SDKs.
Can I use the API with Moodle?
Yes. Since the endpoint follows the standard OpenAI speech format, you can integrate it with Moodle via custom plugins or scripts. Send a POST request to /v1/audio/speech with your API key. This approach works for any LMS that supports custom code or external API calls, ensuring predictable engineering integration.
How do I handle character limits in course materials?
Each request supports up to 4096 characters. For longer course materials, split the text into parts of this limit, generate audio for each part, and join the files. Failed requests are free, so you can retry splits without incurring extra costs. This ensures consistent billing and reliable audio delivery for large datasets.
Is the audio quality suitable for professional courses?
The API offers two models: tts-1 and tts-1-hd. Both use licensed recordings from LibriTTS-R and LibriVox. The audio is synthetic speech with an inaudible watermark. The voices provide clear output suitable for educational content delivery.
Do I need to pay for each student's usage?
No. Billing is based on your account’s total character consumption, not per student. You pay $0.01 per 1,000 characters generated across your entire team. Use a single API key for your organization. This model simplifies cost prediction for large teams without tracking individual student usage metrics separately.
How long does it take to generate audio for a long chapter?
Generation is roughly real-time, processing about 25 characters per second. Longer texts take longer proportionally. Requests are processed sequentially, so under load, a request may wait in a queue. Expect a few seconds for short phrases and minutes for full chapters depending on current server load and text length.
Can I use my own voice?
No. The API provides eight preset voices: aria, nova, luna, sage, felix, milo, atlas, and orion. There is no custom voice cloning feature available. You cannot upload your own voice or design custom voices. Each voice is based on licensed recordings, ensuring consistent quality across all generated audio files.
Does the API support background audio playback?
The API returns audio files (mp3, wav, opus, flac, pcm) via the response. It does not handle playback directly. You must implement background playback in your LMS frontend or application. The API provides the raw audio data, allowing your platform to manage playback and user controls independently.
How do I ensure accessibility standards are met?
The API generates synthetic speech with an inaudible watermark. It does not provide SSML or phoneme dictionaries. You can adjust speed between 0.25 and 4.0 to aid comprehension. Ensure your LMS player supports the returned audio formats to meet standard accessibility requirements for audio content delivery.
What happens if the API goes down during a course?
There is no SLA or uptime guarantee. If the API is unavailable, requests will fail or queue. Failed requests are free, so you are not charged for errors. You can retry requests once the service is restored. Since audio is not stored by the API, you may need to regenerate files.
Can I customize the speed for different learners?
Yes. You can set the speed parameter between 0.25 and 4.0 for each request. This allows you to tailor audio playback speed for different learner needs. Pass the desired speed in the JSON body. This feature works with any of the eight available voices and supported languages.
Is there a limit on concurrent requests?
The rate limit is 60 requests per minute per API key. Requests are processed sequentially, so high concurrency may cause queuing delays. If you exceed the limit, requests may queue until capacity is available. Monitor your usage via the dashboard to ensure smooth integration with your LMS’s audio generation workflows.
Do I need to store the audio files locally?
No. The API returns the audio file in the response and does not store it. You must handle storage in your LMS or application. Request metadata like time and status is kept for billing, but the audio content itself is transient. You are responsible for persisting the generated audio files.
How do I track which students used the audio?
The API tracks request metadata (time, characters, status) for billing but does not store student-specific usage data. You must implement tracking in your LMS. Associate API calls with student IDs in your application logic. The API provides no built-in analytics for individual user engagement or completion rates.
Why Integrate TTS?
Integrating text-to-speech into your LMS allows learners to access course materials through audio, supporting diverse learning preferences and improving content retention. This feature ensures that educational resources are accessible to a wider audience, including those who prefer auditory input or have visual impairments.
Audio content can significantly enhance engagement by allowing students to consume lessons during commutes, exercises, or other activities where reading is impractical. By offering multiple modalities, your platform can cater to varied schedules and environments, keeping learners engaged and motivated.
Accessibility benefits
Text-to-speech provides an essential alternative for users with dyslexia, visual impairments, or other reading difficulties, ensuring equitable access to course content. By converting text to audio, you remove barriers that might otherwise prevent students from fully participating in your programs.
- Supports users with dyslexia or visual impairments
- Enables learning on-the-go without screen dependency
- Improves comprehension for auditory learners
Engagement improvements
Audio content allows learners to absorb information while multitasking, such as during commutes or workouts, making education more flexible and convenient. This flexibility can lead to higher completion rates and increased satisfaction with your LMS platform.
- Enables learning during commutes or exercises
- Supports multitasking for busy professionals
- Increases content consumption flexibility
Multimodal learning
Combining text and audio creates a multimodal learning experience that reinforces understanding. Students can read along while listening, which can improve retention and comprehension by engaging multiple senses simultaneously.
- Reinforces learning through combined text and audio
- Improves retention by engaging multiple senses
- Supports varied learning preferences
Technical Requirements
To use the CourseSpeak API with your LMS, you first need an API key. Sign up at /get-api-key/ using Google or email/password. The dashboard displays your key, balance, and a ready curl example.
Configure your client with the base URL https://api.m9871.info/v1. This URL works with standard OpenAI SDKs. Ensure your environment variables store the key securely for seamless integration into your course engine.
API key acquisition
Navigate to /get-api-key/ to create an account. You can sign in via Google or use a standard email and password. Upon creation, your account receives a unique key. An initial trial credit of $0.50 is given only when you sign in with Google; accounts created with email and password start without trial credit.
- Sign up via Google or email/password
- Retrieve key from the dashboard
- Trial credit: $0.50 (Google sign-in only)
Base URL setup
Set your API base URL to https://api.m9871.info/v1. This endpoint accepts standard JSON bodies identical to the OpenAI speech format. Existing OpenAI SDK configurations can be reused by simply changing the base_url parameter.
- Base URL: https://api.m9871.info/v1
- Compatible with OpenAI SDK structure
- Standard JSON request format
Authentication headers
Include your API key in the Authorization header for every request. Use the format: Authorization: Bearer tts-<your_key>. This header authenticates your account against our rate limits and billing system.
- Header: Authorization: Bearer tts-<key>
- Required for all POST requests
- One active key per account
Implementation Steps
To integrate CourseSpeak into your LMS, begin by installing the OpenAI Python SDK or your preferred language client. This provides the necessary tools to communicate with our TTS endpoint using standard libraries.
Install OpenAI SDK
Install the OpenAI SDK via your package manager (e.g., pip install openai). This client supports the request shape we use, ensuring compatibility with our endpoint structure.
- Use
pip install openaifor Python environments. - Ensure SDK version supports standard HTTP client methods.
Configure base URL
Set the base_url configuration in your SDK client to https://api.m9871.info/v1. This directs all API calls to our infrastructure instead of OpenAI’s servers, enabling direct access to our TTS models.
- Base URL:
https://api.m9871.info/v1 - Keep the
/v1path segment intact.
Send text requests
Pass your API key via the Authorization: Bearer tts-... header. Submit text up to 4096 characters using the /v1/audio/speech endpoint. The response returns the audio file directly, ready for playback in your course module.
- Max input length: 4096 characters per request.
- Response format: Audio file (mp3, wav, opus, flac, pcm).
Handling Long Content
Long-form course content often exceeds the 4096-character limit per request. Our API requires you to split text into smaller chunks before synthesis.
Each chunk is processed independently. This ensures reliable generation even for lengthy lectures or detailed module descriptions.
Chunking text
Divide your input into segments of up to 4096 characters, including spaces and punctuation. Each segment generates a separate audio file.
- Split at logical sentence boundaries to maintain natural audio flow.
- Ensure the total character count fits within the 4096 limit per request.
Managing tokens
Tokens are not explicitly managed; character count is the primary metric. Billing is based on the total characters processed across all chunks.
- Spaces and punctuation count as characters.
- Each chunk incurs its own processing time.
Reassembling audio
Concatenate the resulting audio files in the order of the original text segments. The API returns standard audio formats (mp3, wav, etc.).
- Maintain the original sequence of chunks.
- Use standard audio libraries for concatenation.
Error Handling
Error handling ensures your LMS integration remains robust when the API encounters transient issues or quota limits. Properly managing these states prevents audio generation failures from disrupting the learner experience.
Rate limit errors
The API enforces a strict limit of 60 requests per minute per key. Exceeding this threshold returns a 429 status code, pausing synthesis until the window resets.
Network timeouts
Long texts or high load may cause delays. Set your client timeout to at least 30 seconds to accommodate queuing during peak usage periods.
Retry logic
Implement exponential backoff for 429 and 5xx errors. Do not retry immediately; wait briefly to allow the queue to clear and avoid thrashing the API endpoint.
Performance Optimization
Optimizing your LMS integration requires balancing request volume with our 60 requests per minute rate limit. By parallelizing calls across multiple voice instances or timing requests during off-peak hours, you maximize throughput without triggering throttling.
Parallel requests
Requests are processed one after another, so under load a request may wait in a queue. Parallelizing requests helps utilize the 60 requests/minute limit per key. However, remember that the 60 requests/minute limit applies per API key, so coordinate parallel streams carefully to avoid exceeding the threshold.
Caching strategies
Store generated audio files in your LMS’s media library rather than re-synthesizing identical text. Since the API does not store generated audio, caching locally reduces redundant API calls and significantly lowers costs, especially for frequently accessed course modules.
- Cache audio by exact text hash to handle minor whitespace variations.
- Invalidate cache when source text content changes.
Queue management
Implement a local queue to buffer requests during peak usage. This prevents timeout errors when the service is busy and ensures steady processing. Use exponential backoff for retries to respect the 60 RPM limit without overwhelming the endpoint.
Testing the Integration
Testing your integration ensures the TTS service integrates smoothly with your LMS before scaling to full production. Start by using the free $0.50 trial credit available when signing in with Google. This allows you to generate approximately 50,000 characters over seven days to verify endpoint connectivity and response formats without incurring costs.
Use this trial period to validate audio quality and confirm that the synthesized speech meets your curriculum’s standards. You can also verify language support by testing texts in various scripts, ensuring the API correctly handles your target languages or returns appropriate behavior for unsupported ones like Vietnamese or Thai.
Using the trial credit
Sign in via Google to receive $0.50 in credit, valid for 7 days. This covers about 50,000 characters, sufficient for basic connectivity tests and format validation. Email-based accounts start with zero credit, so verify your account type first.
Use the provided curl example to send a simple text request. Check that the response returns a valid audio file in your chosen format (mp3, wav, opus, flac, or pcm) and that the character count is deducted correctly from your balance.
- Verify 200 OK response status
- Confirm audio file downloads correctly
- Check character deduction matches input length
Validating audio quality
Listen to generated clips for clarity, speed, and natural flow. Adjust the speed parameter (0.25–4.0) if the default pacing is too fast or slow for your educational content. Note that short phrases may take a few seconds to synthesize due to queue processing.
Test different voices to find the best fit for your course material. Remember that all files carry an inaudible watermark marking them as synthetic speech, which is standard for this API.
- Test voices like aria, nova, or atlas
- Adjust speed parameter for clarity
- Verify inaudible watermark presence
Checking language support
The API supports 23 languages, including English, Spanish, German, French, Japanese, Korean, and Chinese. If the language field is omitted, Latin script defaults to English. For non-English Latin text, explicitly set the language code to ensure correct synthesis.
Confirm unsupported languages like Vietnamese or Thai are not supported (the API does not guarantee an error code for them, but they will not synthesize correctly). Test these inputs to verify they produce intelligible but potentially accented or incorrect output rather than a hard failure.
- List of 23 supported languages
- Explicit language code recommendation
- Behavior for unsupported languages

Monitoring Usage
Accurate billing relies on tracking every character sent, including spaces and punctuation. Since the API charges $0.01 per 1,000 characters, precise counting ensures your LMS integration reflects actual usage without overage surprises. Failed requests do not consume your balance, so only successful synthesis events incur costs.
Tracking character counts
Implement client-side counting before sending requests to predict costs. The API processes up to 4096 characters per request, so ensure your chunking logic aligns with this limit. Metadata such as time, character count, and status are retained for billing purposes, providing an auditable trail of usage.
- Count spaces and punctuation as characters.
- Limit requests to 4096 characters each.
- Failed requests return full credit.
Monitoring costs
Usage is billed via USDT (TRC-20) with no monthly subscriptions. Monitor your balance in the /get-api-key/ dashboard to avoid service interruption. Since credits do not expire, you can top up only when necessary, maintaining predictable engineering costs for large-scale audiobook generation.
Keep track of your active API key. Issuing a new key immediately invalidates the old one, so ensure your LMS updates its configuration promptly to avoid authentication errors during billing periods.
- Balance does not expire.
- No minimum spend required.
- Top-ups credited within minutes.
Usage dashboards
The /get-api-key/ page provides real-time visibility into your balance, trial status, and characters remaining. Use this dashboard to verify that your integration is processing requests efficiently. For deeper insights, export request metadata which includes status codes and character counts for internal reporting.
Scalability
Our API processes requests sequentially, meaning concurrent volume directly impacts latency during peak usage. Since generation takes roughly real-time (25 characters per second), high-throughput LMS modules must account for queueing delays when serving large student cohorts simultaneously.
Handling peak loads
Batch processing long courses into 4096-character chunks reduces individual request overhead. Implementing a background worker that pre-generates audio assets during off-peak hours ensures immediate playback availability during peak student activity.
- Pre-generate lesson audio during low-traffic hours
Auto-scaling considerations
Because we do not provide an official SDK of our own, auto-scaling your integration layer requires managing OpenAI SDK instances via custom base_url. Scale your backend workers based on queue depth, not just CPU usage, to handle the sequential processing bottleneck.
Rate limit planning
Each API key is limited to 60 requests per minute. For large teams, distribute load across multiple keys or implement exponential backoff in your retry logic to prevent 429 errors during sudden spikes in demand.
- 60 requests/minute per key
Security Best Practices
Securing your API key is essential for protecting your LMS from unauthorized usage and unexpected billing charges. Since each account supports only one active key at a time, immediate revocation is possible without downtime for other services.
Key rotation
You can issue a new key at any time via the dashboard. The previous key stops working immediately, ensuring no overlap or accidental usage by compromised credentials.
- Issue new key instantly
- Old key invalidates immediately
- No service interruption
Environment variables
Store the API key in environment variables rather than hardcoding it in your LMS plugins or scripts. This prevents accidental exposure in version control systems or source code repositories.
- Avoid hardcoded keys
- Use .env files
- Exclude from git
Secure storage
Keep your credentials in secure storage mechanisms provided by your hosting environment. Ensure that your LMS backend securely retrieves and uses the key for each speech generation request.
Common Pitfalls
Many engineering teams hit the 60 requests/minute cap quickly when generating full course modules. Without queue management, this causes latency spikes or failed synthesis jobs. Another frequent issue is miscounting characters; spaces and punctuation count toward the 4096-character limit and billing, so naive splitting strategies often waste credits or truncate audio unexpectedly.
Developers also frequently assume streaming support similar to consumer voice assistants. Our API returns complete audio files synchronously, so large texts require chunking and reassembly logic. Expecting partial audio streams will break playback unless you implement custom buffering.
Ignoring rate limits
The limit is strict at 60 requests per minute per key. Bursting beyond this triggers 429 errors, halting bulk generation. Implement exponential backoff or a local queue to smooth traffic spikes during peak LMS usage periods.
- Monitor usage via /v1/voices or dashboard.
- Use queueing for bulk audiobook generation.
- Retry logic handles transient 429s.
Miscounting characters
Each request supports up to 4096 characters, including spaces and punctuation. Failing to account for these can exceed limits or waste credits on empty chunks. Split logic must respect these boundaries precisely.
- Count all Unicode characters.
- Include spaces in limit calculations.
- Validate chunk size before sending.
Assuming streaming support
The API does not stream audio chunks. It returns full audio files after synthesis completes. Assuming partial data availability will cause playback errors. Plan for synchronous wait times, especially for long texts.
- No WebSocket support.
- Return full audio files.
- Handle synchronous waits.
Support Resources
Our documentation provides the complete technical reference for integrating CourseSpeak’s TTS API into your LMS. You will find detailed endpoint specifications, request parameters, and ready-to-use code examples for Python and other languages.
Support is by email only. We handle all inquiries through this channel, ensuring clear and documented communication without the noise of live chat.
We do not currently offer a public community forum or dedicated phone line. All technical and billing questions are routed through our email support system for efficient tracking and resolution.
Documentation links
Access the full API reference at /docs/. This includes endpoint definitions, language codes, voice presets, and error codes. You can also generate a ready curl example directly from your dashboard at /get-api-key/ to test integration immediately.
The documentation covers all technical details, including character limits, speed parameters, and supported audio formats like MP3, WAV, OPUS, FLAC, and PCM. It is updated to reflect the current state of the API.
- Complete API reference
- Code examples
- Error code list
Email support
For technical issues or billing questions, contact us via email. Our team responds to support tickets directly, providing specific solutions tailored to your integration environment.
Since we do not offer phone support or live chat, email ensures that all your inquiries are logged and can be referenced later. This is our primary and only method of direct support.
- Primary support channel
- Logged inquiries
- No phone number
Community forums
We do not maintain a public community forum. All user interactions and support queries are handled through our direct email support channel. This keeps communication focused and secure for your team’s specific needs.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. These errors stem from assuming consumer-grade features or overlooking technical constraints defined in the specification.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- LibriTTS-R corpus (OpenSLR 141)
- LibriTTS-R paper (arXiv 2305.18802)
- MDN: Web Speech API
- FFmpeg documentation
- Node.js documentation
- openai-node on GitHub
- Python documentation
- OpenAI API reference: create speech
- Creative Commons Attribution 4.0
- TRON developer hub: TRC-20
- LibriVox public-domain audiobooks
