There is some offline software to generate closed captions from the audio/video. They may have some dependencies like the technologies and Operating System installed etc., But still, they create a good quality audio/video which supports multiple formats.
Moviepy, Aigesub, Arctime are some of the software's used to generate closed captions from an audio/video.