Text to Speech: bulk MP3 and WAV with subtitles avatar

Text to Speech: bulk MP3 and WAV with subtitles

Pricing

from $60.00 / 1,000 1,000 characters synthesizeds

Go to Apify Store
Text to Speech: bulk MP3 and WAV with subtitles

Text to Speech: bulk MP3 and WAV with subtitles

Turns lists of text or plain text files into natural sounding MP3 or WAV files in 41 voices and 7 languages, with optional SRT and VTT subtitles. The Kokoro voice model runs inside the actor; no outside service is called.

Pricing

from $60.00 / 1,000 1,000 characters synthesizeds

Rating

0.0

(0)

Developer

Ed Rayyis

Ed Rayyis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

18 days ago

Last modified

Categories

Features

Limited permissions

Share

Give it a list of texts, or links to plain text files, and it returns one audio file per text, with SRT and VTT subtitles timed to the speech.

The voice model is Kokoro-82M, released under the Apache 2.0 license [1]. It runs inside the actor on the CPU. No outside speech service is called and no API key is needed.

Voices and languages

41 voices in 7 languages: American English (20 voices), British English (8), Spanish (3), French (1), Hindi (4), Italian (2) and Brazilian Portuguese (3). The voice you pick sets the language the text is read in, so write the text in that language. A French text read by an English voice comes out with English pronunciation. Japanese and Mandarin voices are left out, since they misread written Japanese and Chinese characters.

Input

  • Texts: one audio file per text, up to 100,000 characters each
  • Plain text file URLs: .txt links up to 5 MB, one audio file per link
  • Voice (default af_heart, American English)
  • Speed from 0.5 to 2.0 (default 1.0)
  • Audio format: MP3 (default) or WAV (16 bit, 24 kHz)
  • SRT and VTT subtitles (default on): one cue per sentence, or per group of short sentences
  • Pause between sentences in milliseconds (default 250)
  • Also join all texts into one file (default off)

Long texts are split into sentences, short sentences are grouped, and each group is voiced on its own.

Output

Dataset: one item per text with index, source (input or the file link), ok, voice, speed, format, characters, textPreview, durationSeconds, fileSizeBytes, audioUrl, and with subtitles on, subtitles (each cue with start, end and text), srtUrl and vttUrl. The files are saved in the run's key-value store as speech-0001.mp3, speech-0001.srt and so on. With joining on, one more item with source: combined links to combined.mp3 and its subtitles. A text that cannot be voiced gets ok: false and an error, and the run carries on with the next one.

Speed

Apify gives a run one CPU core for every 4 GB of memory [2], so speed follows the memory you choose. With 2 GB, a run that voiced 3,348 characters (3 minutes 23 seconds of audio) took 8 minutes 21 seconds.

Pricing

Pay per event: one event per started 1,000 characters of each text. A 1,200 character text is two events. A text that fails is not charged. A text is left unprocessed, with an error saying so, when the maximum charge you set does not cover it.

Scope and conduct

The actor reads only the texts and links you supply. Use text you have the right to turn into audio.

Support

Questions and problems: the Issues tab on this page.

References

  1. hexgrad/Kokoro-82M · Hugging Face | Kokoro-82M | huggingface.co. https://huggingface.co/hexgrad/Kokoro-82M
  2. Actor usage and resources | Apify documentation | docs.apify.com. https://docs.apify.com/platform/actors/running/usage-and-resources