In this tutorial, you will learn how to use the Vox platform to synthesize text to speech both synchronously and asynchronously. By the end of this tutorial, you will be able to convert text into speech using our API.Documentation Index
Fetch the complete documentation index at: https://docs.timepay.ai/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
Before you begin, ensure you have:- Nodejs
- A Vox API Key
- Basic understanding of HTTP and JSON
API Endpoint
POST /api/v1/get_speech
Generates and streams speech audio.
Headers
Body
Response
- Streams audio/wav bytes
-
Headers include:
X-Request-ID
Sample cURL request
Below is a synchronous example using Python +requests.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
text | string | required | Text to convert |
voice_id | string | required | Select voice |
language | string | "en" | Language code |
sample_rate | number | 24000 | Audio sample rate |
speed | number (float) | 1.0 | Audio sample rate |
add_wav_header | boolean | true | Adds WAV header |

