Audio that knows where its words are
Subtitles, dubbing, karaoke, and a talking face all need the same thing: the moment each word starts and stops. In Thai, producing that is a harder problem than it looks.
Thai is written without spaces#
In English, a word timestamp is close to free. The spaces already say where the words are. The work left is lining known boundaries up against the audio, which anyone can do.
Thai writes its words against each other with nothing between them. A sentence is one unbroken run of characters, and where one word ends is a judgement the reader makes from what the words are. A timing span for Thai can only exist if that judgement was already made correctly.
A word span in Thai is proof the text was understood.
It is the same problem the model was built to solve, arriving here as a feature you can hear.
One clip, timed#
ยินดีต้อนรับ
The words light as they are spoken. These are the spans the request returned, over the clip it returned them with.
Three ways to ask#
The right granularity is the one your player needs. A coarser one is simpler to work with, and every granularity costs the same.
word
For karaoke and read-along
Every word gets a start and an end. This is what highlights text in time with audio, and what a language app uses to show a learner where they are.
sentence
For subtitles and captions
One span per sentence, which is the unit a subtitle line is cut on. Most caption pipelines want this and nothing finer.
utterance
For dubbing and mixing
One span for the whole delivery. It answers where speech begins and ends inside the file, which is what an editor lays against picture.
Timing changes the response into a JSON envelope of audio and spans, and bills at 1.25 times the standard rate. The audio itself is unchanged.
Translate to fit, then speak to time#
Subtitling a foreign video into Thai is two jobs that usually belong to two vendors. Both are here, and the second one reads what the first one wrote.
- 01
Translate the line under a length
A subtitle box holds a fixed number of characters, and Thai rarely lands on the same length as its source. Translation takes a maximum length per segment and compresses the Thai to fit it, and never truncates the meaning to get there.
- 02
Speak it with timing on
The Thai line goes to speech with timestamps requested. What comes back is the audio and the spans together, in one response, already agreeing with each other.
- 03
Cut the file from the spans
Your subtitle or dub file is written from the spans. Nothing had to be aligned afterwards, because the timing came from the same pass that made the audio.
Alignment as a separate step is where subtitle pipelines usually lose their evenings. Here there is nothing to align: the timing and the audio were produced together.
Questions#
- Are the spans aligned afterwards, or produced with the audio?
- Produced with it. The spans and the audio come back in one response from one pass. There is no alignment step, and nothing that can drift between them.
- Can I get timing while streaming?
- Yes. A streamed request with timing on returns newline-delimited events, and every span travels once, on the chunk it belongs to.
- What does timing cost?
- 1.25 times the standard rate for the same characters. Granularity does not change the price; word timing and utterance timing cost the same.
- Does it work on text that mixes Thai and English?
- Yes, and this is where word spans earn their keep. An English product name inside a Thai sentence is one word among Thai words, and it is timed like one. Text runs up to 5,000 characters per request.
- Can I use this for a talking avatar?
- Yes. Word spans are what a mouth reads. Ask for word timing, drive the visemes from the span boundaries, and the face and the audio share one clock.
Free credits, and no card
Sign in and the free grant covers a subtitle reel's worth of timed speech, including the passes you throw away while you tune the line lengths.