Wyzie Subs
Fix Subtitles#
Fix Subtitles listens to the video and compares it with a subtitle you have. It corrects wrong words, re-times lines to when they are said, and adds lines that are missing. Use it on a subtitle that is close but not right. The subtitle must be in the language spoken in the video.
On the Web#
Open sub.wyzie.io/fix, enter your Pro key, pick the video and the subtitle and press Fix. Only the audio is uploaded.
The API: POST /fix#
POST /fix takes the audio or video as the request body or as the multipart field media, plus the subtitle:
curl -X POST "https://sub.wyzie.io/fix?key=YOUR_KEY&language=en" \
-F "[email protected]" -F "[email protected]" -o fixed.srt| Parameter | Example | Description |
|---|---|---|
| key | YOUR_KEY | A Pro API key. Required. |
| subtitle | movie.srt | The subtitle file as a multipart field: SRT, WebVTT, ASS, MicroDVD or TTML. Or send url or id instead. |
| url | https://sub.wyzie.io/c/... | A download link from /search, instead of a file. |
| id | tt3659388 | An IMDB or TMDB id, with language (and season and episode for a series), to use the best of the top search results. |
| format | srt | srt, vtt or ass. The subtitle's own format by default. |
| language | en | The spoken language, a two-letter code. Detected if left out. Required with id. |
| retime | 0 | 1 (default) moves lines to when the words are said. 0 keeps the times. |
| report | 1 | 1 for JSON with the subtitle and a list of changes, instead of the file. |
| webhook | https://example.com/wyzie | An https URL to call when the job ends. See Webhooks. |
| cache | 0 | 0 keeps this audio out of the recognition cache: it is neither read from nor written to. See Recognition reuse below. |
Cloudflare limits a single request to about 100 MB, so for a long video send just the audio track. It is all speech recognition needs:
ffmpeg -i video.mp4 -vn -ac 1 -ar 16000 -b:a 32k audio.mp3Response#
When it finishes within about 50 seconds, the response is the fixed subtitle, with the same x-wyzie-cost, x-wyzie-duration and x-wyzie-language headers as Transcribe, and these:
| Header | Example | Description |
|---|---|---|
x-wyzie-cost | 6000 | Requests charged. |
x-wyzie-lines-corrected | 41 | Lines whose words were corrected. |
x-wyzie-lines-retimed | 212 | Lines that were moved in time. |
x-wyzie-lines-added | 3 | Lines that were missing and added. |
x-wyzie-lines-total | 1204 | Lines in the result. |
x-wyzie-cache | miss | hit if the recognised text was reused, miss if the audio was recognised now. The price is the same. |
A longer file answers 202 Accepted with an id and a poll link, like Transcribe. Poll GET /fix/{id}?key=YOUR_KEY until the file is ready.
{
"id": "5a29c3f6-4bfb-4f03-b429-4b4d935acdbd",
"status": "processing",
"poll": "https://sub.wyzie.io/fix/5a29c3f6-4bfb-4f03-b429-4b4d935acdbd",
"cost": 12000,
"duration": 2069
}The cost is charged when the job starts. If something fails on our side, all of it is refunded. A file with no speech in it is charged, because recognition ran. Input we refuse before recognition starts, such as a file with no audio track, one that is too long or a bad parameter, is free.
Errors#
| Status | Meaning |
|---|---|
| 400 | A bad format or language, no file, no subtitle, or an unreadable subtitle. |
| 401 | No key. |
| 402 | Not enough requests left for this file's length and options. |
| 403 | A free key, or an invalid one. |
| 413 | The file is too big (send the audio track only) or longer than 4 hours. |
| 422 | The subtitle can't be read, or is clearly in another language than the language you gave (free, refused before the charge). A subtitle found to be in another language or the wrong one for this video after recognition stays charged. |
| 429 | Too many transcriptions from this key this hour (20). |
| 503 | Busy, or the server restarted while your file was running. Try again; a failed job is refunded in full. |
Recognition Reuse#
We keep the recognised text of audio under a hash of the audio for 30 days. No key, user, job id or file name is attached to it. If anyone sends the same audio again, they get the same text back without a new recognition. The price does not change. Send cache=0 to opt out of both reading and writing. The subtitle itself stays for one hour after the job ends.
Privacy#
The audio is handled like Transcribe: written to a temporary folder, sent for speech recognition (Whisper on Cloudflare Workers AI) and deleted when the job ends. The recognised text is kept for 30 days under a hash of the audio, with no key, user, job id or file name, unless you send cache=0. The finished subtitle is kept for one hour. A webhook URL, if you gave one, is kept until it has been called, at most a few hours.
