The caption player is an application that can help someone to study language. It supports *.srt or *.ass subtitle file. If mp3 file that is the same name with subtitle file, the caption player will find the start and end time of each sentence and play.
It has to install the following module:
- pyinstaller
- pysrt
- asstosrt
- (charset)
- pygame
- gTTS
source code of asstosrt has to remove '\r'
-
L.74
return u'{} --> {}\r\n{}\r\n'.format(self.time_from,
=>
return u'{} --> {}\n{}\n'.format(self.time_from, -
L.132
text = text.replace(r'\N', '\r\n').replace(r'\n', '\r\n')
=>
text = text.replace(r'\N', '\n').replace(r'\n', '\n') -
L.144
srt += u'{}\r\n{}\r\n'.format(i, unicode(dialogue))
=>
srt += u'{}\n{}\n'.format(i, unicode(dialogue))