Re:Show HN: Automatically synchronize subtitles with video
by MagnumOpus on Tuesday February 26, 2019 @11:45AM
(#19255867)
Dubbing is a major industry in many non-English-speaking countries (Germany, France, Spain, Italy etc), employing more than half of voice actors -- so it's generally not some DIY cottage industry, but professional audio engineers and voice actors. They don't just use subtitles, they use the original video/audio to lip-sync as well as possible.
Wikipedia has some more detail: https://en.wikipedia.org/wiki/Dubbing_(filmmaking)#Methods