Convert anything using TEXT-TO-SPEECH


The API for converting any file using TEXT-TO-SPEECH.

Here you can see all available conversion options which you can use within the "options" section of conversions (see the example JSON below the table).

Here you can see all available conversion options which you can use within the "options" section of conversions (see the example JSON on the right).

Option Name Description
allow_multiple_outputs
Type: boolean
Default: False
If the conversion produces more than one output file, by default all of them are compressed in just one file. Set this option to true if you want a download link for each file.
allow_multiple_outputs_threshold
Type: integer
Minimum: 2
Maximum: 400
download_password
Type: string
Pattern: ^[ -~]{0,1000}$
Example: secret_password
A password to protect the download. To download the file send the password in the x-oc-download-password header or set a cookie named x-oc-download-password. The value contains a comma separated list of passwords.
gender
Type: string
Enum: male female
The optimized model to use
language
Type: string
Enum: ar-SA bg-BG ca-ES cs-CZ da-DK de-CH de-DE el-GR en-AU en-CA en-GB en-IE en-IN en-US es-ES es-MX fi-FI fr-CA fr-CH fr-FR hi-IN hr-HR hu-HU id-ID it-IT ja-JP nb-NO nl-BE nl-NL pl-PL pt-BR pt-PT ro-RO ru-RU sv-SE ta-IN tr-TR vi-VN zh-CN zh-HK
Set the language to use. Please be aware that for some languages, just the male or the female voice is available. In such a case you will get the audio with the available voice and a specific warning.
tts_audio_format
Type: string
Enum: aac aiff flac m4a mmf mp3 ogg opus wav wma

Output Example

POST /v2/jobs HTTP/1.1
Host: https://api.api2convert.com
X-Oc-Api-Key: <your API key here>
Content-Type: application/json
{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/raster%20image/png/example_small.png"
    }],
    "conversion": [{
        "category": "operation",
        "target": "text-to-speech",
        "options": {
            <conversion options here>
        }
    }]
}