Reference
Text-to-Speech Engine
Overview
Heavstal TTS converts text into natural-sounding speech audio using Google's engine.
Instead of streaming binary data, this API generates the audio, hosts it securely, and returns a direct MP3 link. This makes it perfect for WhatsApp bots, HTML5 players, and mobile apps.
Endpoint
POST /tts
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Required | The text to convert (Max ~200 chars recommended). |
| lang | string | Optional | Language code (default: 'en'). Examples: 'fr', 'es', 'ja', 'id'. |
Example Usage
javascript
Successful Response
json