Disclosure: I build Wyzie Subs, the API used below. Fix Subtitles is a Pro feature; free keys get 403.
You found a subtitle for the right movie, but it drifts two seconds late by the second act, a few lines are misheard, and one scene has no lines at all. Shifting the timing alone still leaves you with the wrong words and the gaps.
POST /fix listens to the audio and compares it with the subtitle you have. It corrects wrong words, moves each line to when it is said, and adds lines that are missing. The subtitle has to be in the language spoken in the video.
Send the audio, not the video
A request is capped at about 100 MB, so for a long video send only the audio track. It is all speech recognition needs:
ffmpeg -i video.mp4 -vn -ac 1 -ar 16000 -b:a 32k audio.mp3 The call
curl -X POST "https://sub.wyzie.io/fix?key=YOUR_KEY&language=en" \ -F "media=@audio.mp3" -F "subtitle=@movie.srt" -o fixed.srt The subtitle can be SRT, WebVTT, ASS, MicroDVD or TTML. Instead of a file you can send url (a download link from /search), or id (an IMDb or TMDB id) with language, and it uses the best of the top search results.
Useful options:
-
retime=0keeps the original times and only fixes words and gaps. -
format=vtt(orsrt,ass,sub,sbv,ttml) changes the output format. -
report=1returns JSON with the subtitle and a list of changes instead of the file.
What comes back
If the job finishes within about 50 seconds, you get the fixed file straight away, with headers that say what changed:
x-wyzie-lines-corrected: 41 x-wyzie-lines-retimed: 212 x-wyzie-lines-added: 3 x-wyzie-lines-total: 1204 A longer file answers 202 Accepted with an id and a poll link. Poll GET /fix/{id} until it is ready:
curl "https://sub.wyzie.io/fix/5a29c3f6-4bfb-4f03-b429-4b4d935acdbd" \ -H "Authorization: Bearer YOUR_KEY" Cost
It costs the same as Transcribe: 85 requests per started minute of audio, at least 1 minute. It is charged when the job starts and refunded in full if something fails on our side. If you give language and the subtitle is clearly in another language, it is refused before the charge and costs nothing.
If the same audio was already recognised in the last 30 days, all but 1 request per minute comes back. That cache is keyed on a hash of the audio only, with no key, user or file name, and cache=0 turns it off. The audio itself is deleted when the job ends.
No code needed
There is also a page for it: open https://sub.wyzie.io/fix, enter your Pro key, pick the video and the subtitle, and press Fix. Only the audio is uploaded.
Full reference and errors: https://docs.wyzie.io/subs/usage/fix
If a fix comes back worse than what you sent, tell me in the comments with the title and I'll look at it.
