Frequently asked questions
Does the API support Hindi text specifically?
Yes, Hindi is one of the 23 supported languages. You can generate high-quality audio for Hindi text using any of the eight voice presets. The API handles Hindi script natively, ensuring accurate pronunciation and natural flow for your audiobook content without requiring additional configuration.
Can I use Python to process large manuscripts?
Absolutely. Since the API follows the OpenAI request shape, you can use the official OpenAI Python SDK by changing the base URL. You can easily split large manuscripts into parts of up to 4096 characters, generate audio for each part, and join the files programmatically.
What happens if a request fails?
If synthesis fails, the charge is returned in full. You are not billed for failed requests, ensuring you only pay for successful audio generation. This makes it safe to retry requests or handle errors in your Python pipeline without worrying about unexpected costs.
Do I need to specify the language code?
Not always. If the text is in a supported language like Hindi, the API often detects it automatically. However, for Latin-script text that is not English, you should explicitly set the language parameter to ensure correct pronunciation and avoid defaulting to English.
Are the voices customizable for Indian accents?
No, you cannot customize voices or upload your own. You choose from eight presets like Aria, Nova, or Felix, which can speak Hindi among other languages. The voices are based on licensed recordings and cannot be modified for specific regional nuances.
How long does it take to generate a chapter?
Generation is roughly real-time, averaging about 25 characters of text per second of audio. For a standard chapter, this means processing takes only a few seconds longer than the audio length. Requests are processed sequentially, so under load, you might experience slight queue delays.
Can I use the audio for commercial audiobooks?
Yes, the API can be used for professional use, including self-publishing. Generated audio files are returned directly in the response and are not stored by us. You can use the synthetic speech for commercial distribution, as the voices are based on licensed recordings from LibriTTS-R and LibriVox.
Is there a limit to how many characters I can send?
Yes, each request supports up to 4096 characters in the input field. For longer manuscripts, you should split the text into chunks of this size. The API allows you to generate audio for each chunk and then join the resulting audio files for the final audiobook.
What formats are best for audiobook platforms?
You can choose from mp3, wav, opus, flac, or pcm. MP3 is widely supported and offers a good balance of quality and file size. WAV provides lossless quality, while Opus offers high efficiency. Choose based on your platform’s requirements and storage considerations.
Do I need to download an SDK?
No, you do not need a custom SDK. You can use the official OpenAI Python SDK by setting the base URL to https://api.jur012.cc/v1. Alternatively, you can use plain HTTP requests with standard libraries like requests in Python, making integration straightforward and lightweight.
Can I change my API key if it gets compromised?
Yes, you can issue a new key at any time from your account dashboard. When you generate a new key, the old one stops working immediately. This ensures that if your key is compromised, you can secure your account instantly without waiting for support.
How is the billing calculated?
Billing is $10 per 1 million characters, or $0.01 per 1,000 characters. Spaces and punctuation count as characters. You pay only for successful requests, and failed requests are free. You can top up your balance using USDT on the TRON network with a minimum of $5.
Does the API handle punctuation automatically?
Yes, punctuation is treated as characters in the input and influences the audio generation. The API does not support SSML, so you cannot add custom pauses or emphasis tags. However, standard punctuation like periods and commas naturally creates appropriate pauses in the synthesized speech.
Is there a free trial available?
Yes, signing in with Google gives you $0.50 of credit, valid for 7 days, which covers about 50,000 characters. Accounts created with email and password start without trial credit. You can top up your balance with USDT for ongoing usage after the trial expires.
First request
curl
curl https://api.jur012.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 Python for Audiobook Production?
Python’s text-processing ecosystem allows self-publishing authors to split manuscripts into 4,096-character chunks automatically, ensuring consistent audio quality without manual intervention. This approach fits seamlessly into existing publishing pipelines, reducing the time spent on tedious segmentation tasks.
By leveraging Python libraries, you can handle batch generation workflows efficiently, processing entire chapters in sequence. This automation ensures that your audiobook production scales smoothly, whether you are narrating a short story or a full-length novel.
Automate Chapter Processing
Use Python scripts to divide your manuscript into manageable segments, each under 4,096 characters. This ensures every request stays within API limits while maintaining narrative flow across segments.
Automated splitting reduces human error and allows you to process large texts quickly. You can customize chunk sizes based on sentence boundaries for smoother audio transitions.
- Automatic text segmentation based on character limits
- Customizable chunk sizes for better narrative flow
- Reduced manual effort in manuscript preparation
Batch Generation Workflows
Queue multiple chapters for synthesis using Python’s concurrent processing capabilities. This allows you to generate audio files in the background while focusing on editing or marketing.
Batch processing ensures that your entire book can be narrated efficiently, even with limited API rate limits. You can prioritize chapters based on release schedules or customer demand.
- Parallel processing for organized workflow
- Queue management for organized workflow
- Prioritization based on release schedules
Integrate with Epub Libraries
Python’s epub libraries allow you to extract text directly from EPUB files, preserving formatting and structure. This integration simplifies the transition from digital book to audiobook.
You can map specific voices to different characters or sections, enhancing the listening experience. This level of control is difficult to achieve with manual processes.
- Direct text extraction from EPUB files
- Preservation of book structure and formatting
- Easy integration with existing publishing tools
Hindi Voice Options for Narration
NarrativeCode provides eight distinct voice presets that can speak Hindi, ensuring your audiobooks sound professional without requiring voice actors. Each voice is derived from licensed LibriTTS-R recordings, offering a reliable foundation for self-publishing.
Warm Narrator Style
Aria delivers a warm, clear narration ideal for fiction. Her tone engages listeners naturally, making long chapters comfortable to hear.
- Aria: warm, clear narrator
- Ideal for general fiction
Clear Instructional Tone
Sage offers a calm, instructional voice perfect for non-fiction or educational content. The steady pacing ensures complex ideas are understood.
- Sage: calm, instructional
- Best for non-fiction
Soft Storytelling Voice
Luna provides a soft, storytelling presence that enhances emotional narratives. Her gentle delivery suits romance and drama genres effectively.
- Luna: soft, storytelling
- Suits romance and drama
Technical Specifications
NarrativeCode supports five standard audio formats to suit various distribution needs. You can choose between compressed MP3 files for efficient bandwidth usage or high-fidelity WAV, FLAC, and Opus files for archival quality. PCM raw audio is also available for direct processing in specialized audio editors.
Each API request accepts a maximum of 4,096 characters of input text. This limit ensures consistent processing times, though longer texts can be split programmatically. Failed synthesis requests incur no charge, preserving your character credit for the next attempt.
Supported Audio Formats
Select from MP3, WAV, Opus, FLAC, or PCM based on your delivery platform’s requirements. The API returns the audio file directly in the response, ready for immediate upload or further post-processing.
- MP3 for web streaming
- WAV for lossless storage
- Opus for efficient compression
- FLAC for lossless archiving
- PCM for raw data processing
Character Limits per Request
The endpoint accepts up to 4,096 characters per request, including spaces and punctuation. For novels exceeding this limit, split the text into chunks and join the resulting audio segments seamlessly.
Speed Control Options
Adjust the speaking rate between 0.25x and 4.0x to match the desired pacing. Slower speeds aid comprehension for educational content, while faster rates suit quick summaries or previews.
Note that processing time scales with speed; typical generation is roughly real-time, taking about one second per 25 characters. Under load, requests may queue, so plan batch jobs accordingly.
- Range: 0.25 to 4.0
- Real-time generation speed
- Queue handling under load
How It Works
NarrativeCode’s API integrates seamlessly into your Python workflow, allowing you to convert manuscript text into audio without leaving your code editor. By sending a simple POST request to the speech endpoint, you can trigger synthesis for individual chapters or passages, ensuring your production pipeline remains fully automated and efficient.
Send Text via Python
Use the standard requests library or OpenAI-compatible SDK to send your text. You can specify the model (tts-1 or tts-1-hd), choose from eight distinct voices like Aria or Atlas, and set the language explicitly to 'hi' for Hindi or let the system detect it from the script.
- Use standard Python libraries like
requestsoropenai. - Set
base_urltohttps://api.jur012.cc/v1. - Pass text in the
inputfield (max 4096 chars).
Receive Audio File
The API returns the audio file directly in the response body, supporting formats like MP3, WAV, Opus, FLAC, or PCM. You can adjust the playback speed between 0.25 and 4.0 to match the desired pacing.
- Response format: MP3, WAV, Opus, FLAC, or PCM.
- Speed control: 0.25 to 4.0.
- Direct binary response for easy saving.
Join Segments Together
For longer texts exceeding 4096 characters, split your manuscript into chunks, process each independently, and concatenate the resulting audio files. This batch approach ensures consistent quality across entire novels while keeping individual API calls fast and reliable, typically processing at roughly real-time speed.
- Split text into <4096 character segments.
- Process segments in parallel or sequence.
- Concatenate audio files for final book.
Pricing for Publishers
NarrativeCode charges a flat rate of $10 per 1 million characters, equating to $0.01 per 1,000 characters. Spaces and punctuation count toward this total, making cost calculation transparent and predictable for your publishing pipeline. Failed requests incur no charge, ensuring you only pay for successful audio generation.
Top-ups are processed via USDT on the TRON network (TRC-20) with a minimum deposit of $5. Your balance never expires, and there are no monthly subscriptions, seats, or hidden fees. This structure allows small presses to scale usage without committing to expensive recurring plans.
Pay Per Character
The cost is $10 per 1 million characters ($0.01 per 1,000 characters). Every character, including spaces and punctuation, is counted. This linear pricing model means your costs scale directly with your output volume, ideal for projects ranging from short stories to full-length novels.
- $10 per 1 million characters
- $0.01 per 1,000 characters
- Spaces and punctuation count
No Monthly Fees
There are no monthly plans, no seat limits, and no minimum spend requirements. You pay only for what you use. Balances do not expire, allowing you to top up when convenient. This approach eliminates the risk of paying for unused capacity during slower production weeks.
- No monthly subscriptions
- No minimum spend
- No seat limits
Free Failures
If a synthesis request fails, the charge is returned in full. You are never billed for unsuccessful audio generations. This ensures that API hiccups or temporary queue delays do not impact your budget, allowing you to retry requests without financial penalty.
- Full refund on failure
- No charge for failed requests
- Retry without cost

Language Support
NarrativeCode supports Hindi script (Devanagari) for high-quality audiobook generation. The API processes Hindi text accurately, ensuring proper pronunciation and flow for self-published authors. We also support 22 other languages, including English, Spanish, French, and German, allowing publishers to expand their catalog globally with a single API key.
All eight voice presets can speak any of the 23 supported languages. This flexibility means you can maintain consistent narration styles across different language editions of your books without switching engines or voice models.
Hindi Script Support
The API natively handles Devanagari script, processing Hindi characters directly without complex preprocessing. This ensures accurate phonetic conversion and natural-sounding narration for Hindi audiobooks, preserving the linguistic nuances essential for storytelling.
- Direct input of Hindi text
- Accurate phonetic conversion
- No preprocessing required
Multi-Language Capability
Beyond Hindi, we support 22 other languages including English, Spanish, French, and German. Each voice preset is capable of speaking any of these languages, allowing you to produce multilingual editions of your books with consistent voice quality.
Auto-Language Detection
If the language field is not set, the API guesses the language from the script. Latin text defaults to English, so for non-English Latin-script text, you should set the language parameter explicitly to ensure accurate pronunciation.
- Automatic script detection
- Latin defaults to English
- Set language for non-English Latin
Quality and Accuracy
NarrativeCode’s voice models are built from licensed recordings, ensuring a high-quality foundation for your audiobooks. By leveraging these established audio sources, we deliver clear and professional narration suitable for both self-published novels and educational materials.
Licensed Voice Recordings
Our voices are derived from LibriTTS-R (CC BY 4.0) and public-domain audiobook readings. This ensures that every narration is grounded in licensed, high-fidelity source material.
Synthetic Watermarking
Every generated audio file contains an inaudible watermark marking it as synthetic speech. This provides a clear distinction between human and AI narration for your listeners.
Consistent Output
The API maintains uniform tone and pacing across all segments. Whether you are processing a short chapter or a full novel, the output remains stable and professional.
Getting Started
NarrativeCode streamlines audiobook production for self-publishing authors by integrating directly into your Python workflow. Instead of manual narration, you can programmatically convert your manuscripts into professional Hindi audio files using a reliable API that fits your existing text-processing pipeline.
Create Account
Sign up on our /get-api-key/ page using your Google account or email. This creates an independent account specific to jur012.cc, giving you immediate access to the dashboard where you can monitor your usage and balance.
Generate API Key
Once registered, your dashboard displays your unique API key and current balance. You receive a free trial credit of $0.50 (about 50,000 characters) valid for 7 days if you sign in with Google. This key authenticates your requests to the API endpoint.
Run First Test
Use the provided curl example or Python SDK to send a POST request to https://api.jur012.cc/v1/audio/speech. Specify your model (tts-1 or tts-1-hd), a Hindi voice like 'aria' or 'nova', and your input text. The API returns an audio file you can save or process further.
- Set base_url to https://api.jur012.cc/v1
- Use 'tts-1' or 'tts-1-hd' models
- Include Authorization: Bearer <your-key>
Common Use Cases
NarrativeCode’s API allows self-publishing authors to convert large manuscript files into audio chapters programmatically. By splitting text into 4,096-character segments, you can generate consistent Hindi narration for novels without manual recording sessions. This workflow fits directly into your existing epub processing pipeline, ensuring every chapter is produced with uniform tone and speed.
Self-Published Novels
Authors can automate the conversion of entire books into audio format. The API handles the heavy lifting of segmenting text, allowing you to focus on editing and marketing. With voices like Aria or Luna, you can maintain a warm, clear narrative style suitable for fiction.
- Automate chapter-by-chapter generation
- Consistent voice across entire book
- Integrate with epub libraries
Educational Materials
Educational publishers can quickly produce audio versions of textbooks and guides. The Sage voice offers a calm, instructional tone ideal for learning content. You can adjust the speed between 0.25 and 4.0 to match the complexity of the material, ensuring clarity for students.
- Adjustable speed for clarity
- Calm instructional tone
- Fast production turnaround
Audiobook Samples
Generate high-quality samples to showcase your books to potential readers or investors. Since failed requests are free, you can experiment with different voices like Felix or Milo to find the perfect fit for your genre. Each sample is generated in seconds, allowing for rapid iteration.
- Quick voice experimentation
- Free failed requests
- Instant sample generation
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. For longer novels, split the text into parts and join the resulting audio files seamlessly.
23 languages
Any voice speaks any of these languages.
