Text to Speech - Best Practices
Text to Speech - Best Practices
Text to Speech - Best Practices
This comprehensive guide outlines the recommended practices for formatting text to ensure optimal processing, accuracy, and consistent output across different use cases. Following these guidelines will help improve the quality of generated audio and reduce potential errors.
When working with mixed language content, particularly English and Hindi, proper script selection is crucial for accurate processing:
Examples:
For Indian proper nouns, maintain cultural and linguistic accuracy by following these rules:
City Names:
Personal Names:
Examples:
To optimize real-time processing and reduce latency, implement these chunking practices:
Size Constraints:
Breaking Points Priority:
Use the following Python code for implementing text chunking:
lightning-large model, set max_chunk_size=140.lightning model, set max_chunk_size=250.When handling order IDs or large numbers:
Example:
For specific reading patterns:
Example:
You may use any of the following formats when writing dates:
12/02/2025 → “twelve, two, twenty twenty-five”12-02-2025 → “twelve, two, twenty twenty-five”12 February 2025 → “twelve February twenty twenty five”February 12th 2025 → “February, twelfth, twenty twenty-five”12-02-25 → “twelve, two, twenty-five”12/02/25 → “twelve, two, twenty-five”Note: Ordinal suffixes (st, nd, rd, th) could be used in dates.
You may use the following formats when specifying time:
14:30:15 → “fourteen thirty fifteen”14:30 → “fourteen thirty”Express mathematical operations in words for clarity. For complex mathematical expressions, break down into simpler components:
When expressing approximate values:
Examples:
When expressing measurements, write out the units in full words to ensure clear understanding:
Spell out special characters and symbols in all contexts:
1. URLs:
2. Email Addresses:
3. Social Media:
Always write out ranges and relationships explicitly to avoid ambiguity:
Note: