You can use a tool like aeneas to align the original text with your TTS-generated audio, generating accurate timestamps. Then, compare the Whisper subtitles with the original text using string similarity algorithms like difflib or Levenshtein distance to detect and correct errors. You can automate the process to replace misrecognized words while keeping the timestamps intact. This should improve subtitle accuracy based on your original text.