main.py 501 B

123456789101112131415161718
  1. from autosub import DEFAULT_CONCURRENCY
  2. from autosub import DEFAULT_SUBTITLE_FORMAT
  3. from pytranscriber.control.ctr_main import Ctr_Main
  4. from pytranscriber.control.ctr_autosub import Ctr_Autosub
  5. import multiprocessing
  6. def listener_progress(string, percent):
  7. True
  8. if __name__ == '__main__':
  9. Ctr_Autosub.init()
  10. Ctr_Autosub.generate_subtitles('in.mp4','zh',
  11. listener_progress,
  12. output='out.txt',
  13. concurrency=DEFAULT_CONCURRENCY,
  14. subtitle_file_format=DEFAULT_SUBTITLE_FORMAT)