Frequently asked questions
Which voice is best for dyslexia?
The API does not designate a single voice as best for dyslexia. Luna offers a soft, storytelling tone, while Sage provides calm, instructional clarity. Since any voice can speak any of the 23 supported languages, teams should test Aria, Luna, and Sage with their specific content to determine which preset delivers the clearest audio for their users.
How do I handle long texts in Python?
The API limits input to 4096 characters per request. You must split longer texts into parts of this size and join the resulting audio files. Typical generation speed is roughly real-time, so long texts will take time to process. Requests are processed sequentially, so under load, your requests may wait in a queue before synthesis begins.
What is the best audio format for web?
MP3 is the standard format for web delivery due to its broad compatibility. The API also supports WAV, OPUS, FLAC, and PCM. MP3 provides efficient compression for playback, while OPUS offers high quality at lower bitrates. Choose the format that best fits your player’s capabilities, keeping in mind that all formats are generated via the same endpoint.
How do I cache generated audio?
The API does not store generated audio files; they are returned in the response and not persisted. You must implement your own caching logic. Since input text is used only for production and not training, you can cache the resulting audio file locally or on your CDN based on the input text hash to avoid redundant API calls.
Can I use multiple API keys simultaneously?
Yes, you can issue a new API key at any time, which immediately invalidates the old one. While you can use multiple keys, each key is limited to 60 requests per minute. To scale beyond this, distribute requests across different keys, keeping in mind that each key operates independently with its own rate limit and balance.
How do I monitor API usage costs?
The /get-api-key/ page displays your balance, trial status, characters left, and usage history. Pricing is $0.01 per 1,000 characters. Failed requests are free. You can track your consumption directly through the dashboard, which provides real-time data on characters processed and remaining credit, allowing you to manage costs effectively without needing external billing tools.
What is the recommended speed setting?
The default speed is 1.0, adjustable between 0.25 and 4.0. For accessibility and dyslexia support, slower speeds like 0.75 or 0.8 may improve comprehension. However, the API processes requests sequentially, so increasing speed beyond 1.0 does not reduce generation time per request. Test different speeds with your specific content to find the optimal balance for clarity.
How do I handle network errors?
Implement standard HTTP error handling in your Python client. If synthesis fails, the charge is returned in full. Requests are processed sequentially, so under heavy load, you may encounter queue delays. Use exponential backoff for retries, and ensure your client handles timeouts gracefully, as generation can take several seconds for short phrases and longer for complex texts.
Is SSML supported for better control?
No, SSML is not supported. The API accepts plain text input up to 4096 characters. You cannot use phoneme dictionaries or custom pronunciation lexicons. Control is limited to voice selection, speed, and language. If precise pronunciation is required, you must manually adjust the input text or pre-process it before sending it to the TTS endpoint.
Can I generate audio in multiple languages?
Yes, the API supports 23 languages including English, Spanish, French, German, Chinese, Japanese, and Arabic. Any voice can speak any of these languages. If the language is not set, it is guessed from the script, but for non-English Latin text, you should explicitly set the language parameter to ensure accurate synthesis and avoid incorrect default assumptions.
How do I secure my API key?
Store your key in environment variables or a secure vault within your Python application. The key is sent via the Authorization header. Since a new key invalidates the old one immediately, you can rotate keys securely by issuing a new one from the dashboard. Ensure your key is not exposed in client-side code if accessed from browsers.
What is the maximum concurrent requests?
The API processes requests one after another, so there is no true concurrency limit per se, but throughput is limited by the 60 requests per minute rate limit per key. Under load, requests may wait in a queue. To maximize throughput, distribute requests across multiple API keys, as each key has its own independent rate limit.
How do I test voice clarity?
Generate short audio samples using different voices like Aria, Luna, and Sage. Use the /v1/voices endpoint to review available options. Test with your specific content, as clarity can vary by language and voice preset. Since generation takes a few seconds for short phrases, automate your testing script to iterate through voices efficiently and record results.
Can I archive audio in FLAC?
Yes, the API supports FLAC as a response format. FLAC provides lossless compression, which is ideal for archival purposes where audio quality must be preserved exactly. Select 'flac' in your request parameters. Note that FLAC files are larger than MP3 or OPUS, so consider your storage capacity when archiving large volumes of generated audio content.
Selecting the Right Voice
Choosing the correct voice profile is critical for accessibility, particularly for dyslexic readers who require clear, consistent auditory patterns. AccessTalk provides eight distinct presets, each engineered for specific listening contexts. Selecting a voice with a neutral or clear tone reduces cognitive load, ensuring that text-to-speech output remains understandable during prolonged consumption of corporate communications or technical documentation.
The API allows precise control over speech rate, ranging from 0.25x to 4.0x speed. This flexibility enables teams to standardize audio output across various content types, from slow-paced instructional materials to faster news updates, ensuring consistency for large distributed teams relying on audio for accessibility compliance.
Clarity for Dyslexic Readers
For dyslexic users, clarity is paramount. Aria offers a warm, clear narrator style suitable for general reading, while Sage provides a calm, instructional tone ideal for educational content. These voices minimize extraneous inflection, helping listeners focus on the text structure without distraction from complex emotional cues.
Avoid highly expressive voices for dense technical text. Consistent pacing and neutral articulation reduce the effort required to process auditory information, making long documents more manageable for readers with dyslexia or attention difficulties.
- Use Aria for general narrative content to ensure clear enunciation.
- Select Sage for instructional or educational materials requiring a calm, steady pace.
Neutral Tone Selection
Neutral voices like Atlas (neutral, news) and Milo (friendly, conversational) provide reliable baseline outputs for corporate communications. Atlas delivers a consistent, professional tone suitable for formal announcements, while Milo offers a natural conversational flow for internal updates or training modules.
Using a neutral tone standardizes the user experience across different departments. It prevents the emotional bias of more expressive voices from interfering with the informational content, ensuring that the message remains the primary focus for all listeners.
- Atlas provides a neutral, news-style tone for formal corporate announcements.
- Milo offers a friendly, conversational style for internal team communications.
Pacing and Speed Adjustment
Adjusting the speed parameter allows teams to tailor audio consumption to individual needs. A speed of 1.0x represents natural speech, while increasing to 1.5x or 2.0x can help proficient readers process content faster. Conversely, lowering the speed to 0.75x aids comprehension for complex or unfamiliar material.
This feature ensures that the TTS API can serve diverse accessibility requirements within a single platform. By standardizing the base voice and allowing user-controlled speed adjustments, AccessTalk supports both standardized corporate rollouts and personalized reading experiences.
- Set speed between 0.25 and 4.0 to match user preference.
- Use lower speeds (0.75x) for complex technical documentation.
- Use higher speeds (1.5x+) for routine informational updates.
Optimizing Text Input
Proper input formatting ensures consistent synthesis quality and prevents request failures. Since the API enforces a strict 4096-character limit per request, text exceeding this threshold must be segmented before submission. This constraint applies to all characters, including spaces and punctuation, requiring precise calculation during preprocessing to avoid silent truncation or billing errors for partial inputs.
Character Limit Management
Each API call accepts a maximum of 4096 characters. Input strings must be validated against this limit before dispatch. If a document exceeds this length, it should be split into manageable chunks. The client application must then handle the concatenation of the resulting audio files to reconstruct the complete narrative.
- Limit: 4096 characters per request
- Includes spaces and punctuation
- Requires client-side chunking logic
Punctuation Handling
Punctuation marks directly influence the pacing and intonation of the synthesized speech. Ensure that commas, periods, and ellipses are correctly placed within the input string. The engine uses these cues to determine natural pauses. Incorrect formatting, such as missing periods after abbreviations, may result in unnatural reading rhythms that disrupt the listener’s experience.
Text Preprocessing Steps
Before sending text to the API, standardize the input by removing unnecessary whitespace and normalizing line breaks. This reduces character count without altering meaning. Validate that the text contains only supported characters. For multi-language documents, ensure that special symbols do not interfere with the language detection logic, which defaults to English for Latin script if not explicitly tagged.
Managing Large Volumes
High-volume accessibility deployments require efficient text segmentation. Send texts up to 4096 characters per request, then split longer documents into parts. Join the resulting audio files to create a continuous file for the end user.
Proper batching ensures consistent delivery without overwhelming the API. This approach maintains audio coherence while respecting the character limits defined in the API specification.
Batch Processing Strategies
Divide long texts into segments of 4096 characters. Process each segment independently to generate audio files. Concatenate these files sequentially to reconstruct the full document.
This method aligns with the API's input constraints and ensures that no single request exceeds the character limit. It allows for parallel processing of different document sections.
- Split text at natural boundaries (sentences or paragraphs) within the 4096-character limit.
- Generate audio for each segment independently.
- Concatenate output files to preserve narrative flow.
Queue Management
Requests are processed sequentially, so under load, a request may wait in a queue. Plan your submission timing to avoid unnecessary delays during peak usage.
Implement a simple queue in your Python application to manage pending requests. This prevents race conditions and ensures orderly processing of audio generation tasks.
- Monitor queue depth to predict latency.
- Submit batches during off-peak hours if possible.
- Use asynchronous workers to keep the queue moving.
Concurrent Request Limits
Each API key is limited to 60 requests per minute. This limit applies to all requests sent from your key. Exceeding this rate will result in errors.
For large teams, distribute requests across multiple keys or implement a rate limiter in your code. This ensures consistent throughput without hitting the per-key cap.
- Limit: 60 requests per minute per key.
- Implement exponential backoff for retries.
- Monitor usage to stay within limits.
Error Handling and Retry Logic
Reliable integration requires handling transient failures gracefully. Since requests are processed sequentially, under load a request may wait in a queue, causing timeouts. Proper error handling ensures your Python workflows do not break during these periods of high demand.
Implementing robust retry logic minimizes data loss and ensures consistent audio delivery. This section details how to manage rate limits, handle network timeouts, and configure automatic retries for a stable deployment.
Rate Limit Exceedance
Each API key is limited to 60 requests per minute (10 before the first top-up). Exceeding this limit results in a 429 status code. Monitor your usage dashboard to stay within these bounds.
- Monitor the
Retry-Afterheader in 429 responses. - Implement exponential backoff for rapid retries.
- Track usage via the
GET /v1/voicesendpoint.
Network Timeout Handling
Network issues can interrupt synthesis. Set explicit timeout values in your Python HTTP client. Short phrases may take a few seconds to generate, so avoid overly aggressive timeout settings.
- Set connect timeout to 5 seconds.
- Set read timeout to 30 seconds.
- Handle socket errors gracefully.
Automatic Retry Mechanisms
Configure your Python library to retry failed requests automatically. This ensures that transient network errors or temporary server load do not cause permanent failure. Failed requests are free, so retries do not incur extra charges.
- Retry on 429 and 5xx errors.
- Use libraries like
requestswithurllib3.util.Retry. - Limit max retries to prevent infinite loops.
Audio Format Selection
Selecting the correct audio format ensures optimal compatibility and storage efficiency for your accessibility workflows. The API supports MP3, WAV, OPUS, FLAC, and PCM, allowing you to balance file size against quality requirements for different distribution channels.
MP3 for Web Playback
MP3 provides efficient compression for playback, making it ideal for web-based audio players and mobile applications. Its small file size reduces bandwidth usage while maintaining acceptable audio fidelity for end-users accessing accessible content.
WAV for Editing
WAV files offer uncompressed, lossless audio, preserving the full fidelity of the generated speech. This format is suitable for post-production workflows where editors need to adjust volume or insert markers without generation artifacts.
FLAC for Archiving
FLAC provides lossless compression, significantly reducing storage size compared to WAV while retaining exact audio data. It is the optimal choice for long-term archival of corporate communications where future re-processing may be required.
Language Configuration
Accurate speech synthesis requires precise language identification, especially for accessibility workflows serving diverse user bases. While the API attempts automatic detection, explicit configuration ensures consistent output for dyslexic readers who rely on predictable phonetic patterns. This section outlines how to configure language parameters to prevent mispronunciation errors in multi-lingual corporate content.
Our API supports 23 languages, but relies on script analysis when no language is specified. Latin script defaults to English, which can cause errors for other Latin-based languages like German or Spanish if not explicitly tagged. Correct configuration prevents these subtle errors that disrupt reading comprehension.
Explicit Language Tagging
Always include the language field in your API request, using ISO 639-1 codes (e.g., de, fr, es). This overrides automatic detection and ensures the selected voice uses the correct phonetic rules. For dyslexic users, consistent pronunciation is critical, making explicit tagging preferable to reliance on heuristic guessing.
This is particularly important for languages that share Latin script but have different phonetic rules. Without explicit tagging, the API defaults to English, resulting in unnatural intonation and potential mispronunciation of common words.
- Supported languages: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish.
- Any voice can speak any of these 23 languages.
- Default fallback is English for Latin script if language is omitted.
Script Detection Limits
The API guesses the language based on the character set. If the language field is omitted, non-Latin scripts are detected automatically, but Latin text defaults to English. This limit means that mixed-language documents or texts with ambiguous scripts may require manual intervention.
Note that Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali, and all other languages not in the list are not supported. Attempting to synthesize text in these languages will result in incorrect pronunciation or errors, even if the script appears familiar.
Multi-Language Documents
For documents containing multiple supported languages, you must split the text into segments, each with the appropriate language tag. The API does not support automatic language switching within a single request. This segmentation ensures that each part is synthesized with the correct phonetic rules, maintaining clarity for the listener.
While the API supports 23 languages, it does not handle code-switching or mixed-script text within a single utterance. Preprocessing your text to isolate language-specific segments is a necessary step for high-quality multi-lingual audio generation.
Cost Optimization Techniques
Optimizing character consumption directly reduces costs, as billing is calculated at $0.01 per 1,000 characters. By caching generated audio for identical input strings, teams avoid redundant API calls for repeated accessibility content. This is particularly effective for static corporate communications or recurring training modules.
Reducing redundant requests involves preprocessing text to ensure consistent formatting before submission. Monitoring usage patterns through the dashboard allows teams to identify inefficiencies and adjust voice selection or speed settings to maintain clarity without unnecessary character overhead.
Caching Generated Audio
Store generated audio files locally or in object storage keyed by input text hash. This eliminates repeated synthesis for identical strings, such as standard accessibility disclaimers or repeated menu options.
Ensure cache keys account for voice, speed, and format to prevent serving incorrect audio versions.
- Hash input text with voice and speed parameters
- Store results in a shared object storage bucket
- Invalidate cache only when source text changes
Reducing Redundant Requests
Preprocess text to normalize whitespace and punctuation before sending to the API. Consistent input reduces the likelihood of generating slightly different audio for the same content.
Use the 4096-character limit efficiently by splitting long documents into logical segments without unnecessary breaks.
- Normalize whitespace and punctuation
- Standardize input formatting
- Split texts at logical boundaries
Monitoring Usage Patterns
Track character consumption and request frequency via the dashboard. Identify high-volume voices or formats that may be optimized.
Review billing logs to detect failed requests, which are free but may indicate upstream issues.
Adjust speed settings between 0.25 and 4.0 to balance clarity and processing time without increasing character counts.
- Monitor character usage in the dashboard
- Analyze failed request logs
- Adjust speed settings for efficiency
Authentication Security
AccessTalk uses a single active API key per account, issued upon registration. This key authenticates all requests to the TTS endpoint and is displayed on your dashboard alongside your current balance and usage metrics. Secure storage of this credential is critical, as possession of the key grants full access to your account’s billing and generation capabilities.
API Key Storage
Store your key in environment variables or a secure configuration file rather than hardcoding it in source control. Since each account holds only one active key, ensure your deployment pipelines do not expose it in logs or error messages. The key format begins with 'tts-' and is sent via the Authorization header.
- Use environment variables for CI/CD pipelines
- Exclude keys from .gitignore files
- Mask keys in application logs
Key Regeneration Protocol
You may issue a new API key at any time from the dashboard. Upon regeneration, the previous key becomes invalid immediately. This allows you to revoke access instantly if a key is compromised without waiting for a manual review process, ensuring rapid incident response for your team's audio generation workflows.
- Generate new key instantly
- Old key stops at once
- No downtime during rotation
Access Control Lists
AccessTalk does not support multiple keys or granular permission sets per user. Each account is associated with a single key shared across all users and services. For larger teams, manage access by controlling who knows the key or by storing it in a centralized secrets manager that restricts read access to authorized personnel.
- Single key per account
- No granular permissions
- Use external secrets managers
Testing and Validation
Validation ensures your TTS integration meets accessibility standards for dyslexic readers before production. Use unit tests to verify that text preprocessing correctly handles character limits and that retry logic respects the 60 requests per minute rate limit. This prevents wasted credits on failed synthesis attempts.
Audio quality checks confirm that generated speech remains clear and intelligible across different voice presets. Latency measurement helps you understand typical generation times, noting that short phrases may take a few seconds while longer texts process at roughly real-time speeds.
Unit Test Integration
Integrate TTS calls into your existing test suite to validate input sanitization and response parsing. Ensure that text exceeding 4096 characters is correctly split and rejoined. Verify that the API key authentication header is properly formatted and that error responses are handled gracefully without crashing the application.
Use mock objects to simulate API responses during continuous integration. This allows you to test your retry logic and rate limit handling without consuming actual API credits. Confirm that failed requests return zero charge, ensuring billing accuracy in your validation pipeline.
- Test input text length against the 4096-character limit.
- Verify rate limit handling (60 requests/minute).
- Mock API responses for CI/CD pipelines.
- Check error response parsing and retry logic.
Audio Quality Checks
Listen to samples from each of the eight voices to ensure clarity for dyslexic users. Verify that the selected voice, such as Sage for instructional content or Aria for narration, maintains consistent tone and pacing. Check that the audio format matches your playback requirements without introducing excessive compression artifacts.
Ensure that the inaudible watermark does not interfere with playback quality. Validate that language detection works correctly for non-English Latin script texts, as the default is English. Confirm that speed adjustments between 0.25 and 4.0 do not distort intelligibility.
- Verify voice clarity for dyslexic readers.
- Test speed adjustments (0.25–4.0).
- Check language detection accuracy.
- Validate watermark impact on playback.
Latency Measurement
Measure the time between request submission and audio receipt. Short phrases typically take a few seconds, while longer texts process at roughly real-time speed (25 characters per second). Account for queue delays under load, as requests are processed sequentially.
Record latency metrics for different voice models and formats. Use these data points to set appropriate timeout values in your Python clients. Ensure that your application handles slow responses gracefully without timing out prematurely.
- Track request-to-response time.
- Account for queue delays under load.
- Set appropriate client timeout values.
- Measure performance across different voices.
Deployment Considerations
Proper deployment of the AccessTalk Python client requires isolating credentials and configuration settings from application logic. This separation ensures that sensitive API keys are not hardcoded into source files, reducing the risk of accidental exposure during version control or team collaboration.
Environment Variables
Store the API key and base URL in environment variables rather than hardcoding them. This allows different deployment environments (e.g., staging, production) to use distinct credentials without code changes. The official OpenAI SDK supports this natively when configuring the base URL to https://api.kayabet88.cc/v1.
- Use
os.environor libraries likepython-dotenvto manage variables. - Never commit
.envfiles if they contain active keys. - Prefix variables with
ACCESS_TALK_for clarity.
Configuration Files
Maintain a centralized configuration file for non-sensitive settings such as default voice selection, speed limits, and preferred audio formats. This ensures consistency across large teams delivering accessible audio content. Changes to these settings can be applied globally without modifying individual script logic.
- Use YAML or JSON for structured configuration.
- Include defaults for
voice,response_format, andspeed.
Version Control Practices
Track configuration file versions in your repository while excluding environment-specific secrets. Document the API version used (v1) to prevent breaking changes if the endpoint structure evolves. Regularly review dependencies to ensure compatibility with the latest Python TTS API updates.
- Add
.gitignorerules for secret files. - Pin library versions to avoid unexpected breakage.
Monitoring and Logging
Effective monitoring ensures reliable TTS delivery for accessibility workflows. AccessTrack logs request metadata including timestamps, character counts, and status codes for accurate billing and audit trails. This data supports operational transparency without storing generated audio files.
By tracking usage patterns, teams can identify bottlenecks in Python integration pipelines. The API returns standard HTTP status codes, enabling straightforward integration with existing logging frameworks for automated alerting and resource planning.
Request Tracking
The API records metadata for each successful and failed request. This includes the timestamp, input character count, and response status. These logs facilitate precise cost attribution and usage auditing for large teams.
Track requests by monitoring the response headers and status codes. Integrate these logs into your existing Python logging infrastructure to maintain a clear audit trail of all synthesis operations.
- Log timestamp, character count, and status code
- Store metadata for billing verification
- Exclude audio file content from logs
Error Log Analysis
Monitor HTTP error codes to diagnose issues. Rate limit errors (429) indicate queue saturation, while input errors (400) suggest text exceeding 4096 characters or invalid voice parameters.
Analyze error patterns to optimize preprocessing. Frequent timeouts may require adjusting concurrency levels or implementing exponential backoff in retry logic to align with the sequential processing model.
Performance Metrics
Track latency to ensure real-time generation standards. Typical processing is roughly real-time (25 characters per second) for long texts, though short phrases may take a few seconds.
Measure request queue depth during peak loads. High concurrency can increase latency due to sequential processing. Adjust parallel request limits based on observed queue wait times to maintain throughput.
Future Scalability
As your team expands, the 60 requests per minute limit per key may require strategic key distribution. Monitoring usage patterns ensures you do not exceed concurrent request limits during peak production hours.
Understanding API endpoint stability helps maintain consistent workflows. While the current structure remains stable, planning for potential changes prevents sudden integration breaks in your Python pipelines.
Load Balancing Needs
With a limit of 60 requests per minute, large teams should implement key rotation or distribute load across multiple accounts to avoid throttling.
Queue management becomes critical as volume grows, ensuring that synthesis jobs do not stall the production pipeline.
- Distribute keys across teams to maximize throughput
- Monitor the 60 RPM limit per key closely
- Use background workers to handle queueing efficiently
API Endpoint Changes
The base URL is fixed at https://api.kayabet88.cc/v1. While unlikely to change frequently, versioning allows for safe updates without breaking existing integrations.
Always pin your SDK or HTTP client to specific endpoint versions if major structural changes occur in the future.
Version Upgrade Paths
The API currently supports tts-1 and tts-1-hd models. Future model updates will likely maintain backward compatibility with the existing request shape.
Upgrade your client libraries regularly to ensure compatibility with any new features or optimizations added to the synthesis engine.
- Keep Python libraries updated for best performance
- Test new model versions in staging before production
- Maintain documentation of current endpoint configurations
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Reliable integration requires handling transient failures gracefully.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- W3C WAI: making audio and video accessible
- OpenAI API reference: create speech
- Node.js documentation
- openai-python on GitHub
- curl documentation
- TRON developer hub: TRC-20
- IETF RFC 7845: Ogg Opus
- LibriTTS-R corpus (OpenSLR 141)
- LibriTTS-R paper (arXiv 2305.18802)
- Creative Commons Attribution 4.0
- FFmpeg documentation
