SpeechT5 TTS

SPEECHT5_TTS

Fast English text-to-speech in the voice of a short reference clip, or in a voice you train it on.

Audio Generationtext-to-speechvoice-cloningenglishmitFine-tunable
SpeechT5 TTS: Audio Generation model on Kainguru

About SpeechT5 TTS

Capabilities

  • Voice from a clip — a few seconds of someone speaking set the voice
  • Train a voice — fine-tune on recordings of one speaker; the result speaks in that voice with no clip needed
  • Numbers read out — whole numbers, percentages and amounts such as $20 are spoken as words

Good to know

  • English only; text with letters English does not use (for example ə, ğ or ı) is refused.
  • Needs speaker_audio unless the model is fine-tuned.
  • The voice comes from a voice print of the clip, so it follows the speaker's overall sound rather than every detail.
  • Output is 16 kHz mono WAV, up to about 57 seconds per request, billed per second of audio produced.
  • Write dates, decimals, ordinals (1st) and numbers joined to letters (4B) in words; they are refused or misread otherwise.
  • Fine-tuning works best with 5 to 30 minutes of clean recordings of one speaker; a fine-tune trains the whole model.
  • Do not use it to imitate a real person without their consent, or to deceive.

Attribution

SpeechT5 by Microsoft, MIT License. Vocoder: microsoft/speecht5_hifigan, MIT License. Speaker encoder: speechbrain/spkrec-xvect-voxceleb by SpeechBrain, Apache License 2.0.

SpeechT5 TTS inputs and output

NameTypeRequiredDefaultDetails
texttextYes—What to say, in English. Whole numbers, percentages and amounts such as $20 are read out; write dates, decimals, ordinals (1st) and numbers joined to letters (4B) in words. Letters English does not use (for example ə or ğ) are refused.
1–500 characters
speaker_audiofileNo—A clip of the voice to speak in: WAV, MP3, FLAC, OGG, M4A, AAC or WebM, 1 to 15 seconds, at most 20 MB. Needed unless the model is fine-tuned, which speaks in its trained voice.
Max 2048 characters · audio/wav, mpeg, flac, ogg, mp4, aac, webm
seedintegerNo—The same seed and inputs give the same audio. Leave empty for a random seed (returned in the result).
0–2147483647

Output. Returns WAV audio: The speech as a 16 kHz mono 16-bit WAV file.

Run SpeechT5 TTS with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=SPEECHT5_TTS" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "text": "example"
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "SPEECHT5_TTS",
        {
          "text": "example"
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune SpeechT5 TTS

You can fine-tune SpeechT5 TTS on your own data and run the tuned model through the same API. Dataset: Recordings of one voice, each with exactly what is said in it ({"file": ..., "text": ...} items): 4 to 2000 clips of 0.5 to 20 seconds and at most 50 MB each, 10 GB in all.

The steps are in the docs.

SpeechT5 TTS pricing

Price per second: 0.007 credits ($0.00007). The price is shown again before every run; all prices are on the pricing page.

Licence and source

Dia 1.6B: Audio Generation model on Kainguru
Audio Generation

Dia 1.6B

English dialogue text-to-speech: two speakers in one pass with laughter, coughs and sighs, and voice cloning from a…

Fine-tunable
CosyVoice3 0.5B: Audio Generation model on Kainguru
Audio Generation

CosyVoice3 0.5B

Text-to-speech in nine languages and Chinese dialects: clone a voice from a short clip, steer emotion, speed or…

Fine-tunable
MOSS-TTS Realtime: Audio Generation model on Kainguru
Audio Generation

MOSS-TTS Realtime

Natural speech for voice agents in 20 languages, in a voice cloned from a short clip. Built for streaming, served here…

Fine-tunable
MOSS-TTS v1.5: Audio Generation model on Kainguru
Audio Generation

MOSS-TTS v1.5

Speech in 31 languages from text, in a voice cloned from a short clip, with the language, the length and pauses under…

Fine-tunable
MOSS-TTSD: Audio Generation model on Kainguru
Audio Generation

MOSS-TTSD

Two-speaker dialogue from a script of [S1] and [S2] turns, up to 90 seconds, each voice cloned from its own short…

Fine-tunable
MOSS Voice Generator: Audio Generation model on Kainguru
Audio Generation

MOSS Voice Generator

Speech in a voice you describe in words (age, gender, pace, mood, accent), with no reference clip. Fine-tune it to…

Fine-tunable