(self)
| 35 | self.start_time = time_convert(start) |
| 36 | self.end_time = time_convert(end) |
| 37 | def text(self): |
| 38 | if isinstance(self.token_list, str): |
| 39 | return self.token_list.rstrip("、。,") |
| 40 | else: |
| 41 | res = "" |
| 42 | for word in self.token_list: |
| 43 | if '\u4e00' <= word <= '\u9fff': |
| 44 | res += word |
| 45 | else: |
| 46 | res += " " + word |
| 47 | return res.lstrip().rstrip("、。,") |
| 48 | def srt(self, acc_ost=0.0): |
| 49 | return "{} --> {}\n{}\n".format( |
| 50 | time_convert(self.start_sec+acc_ost*1000), |
no outgoing calls
no test coverage detected