mirror of
https://github.com/HiMeditator/auto-caption.git
synced 2026-02-04 04:14:42 +08:00
feat(log): 添加字幕记录复制功能 (#3)
- 提高记录时间精度,精确到毫秒 - 在字幕记录组件中添加复制到剪贴板的功能 - 提供多种复制选项,包括是否添加序号、是否复制时间、选择复制内容等
This commit is contained in:
@@ -39,12 +39,12 @@ class Callback(TranslationRecognizerCallback):
|
||||
caption['text'] = transcription_result.text
|
||||
if caption['index'] != self.cur_id:
|
||||
self.cur_id = caption['index']
|
||||
cur_time = datetime.now().strftime('%H:%M:%S')
|
||||
cur_time = datetime.now().strftime('%H:%M:%S.%f')[:-3]
|
||||
caption['time_s'] = cur_time
|
||||
self.time_str = cur_time
|
||||
else:
|
||||
caption['time_s'] = self.time_str
|
||||
caption['time_t'] = datetime.now().strftime('%H:%M:%S')
|
||||
caption['time_t'] = datetime.now().strftime('%H:%M:%S.%f')[:-3]
|
||||
caption['translation'] = ""
|
||||
|
||||
if translation_result is not None:
|
||||
|
||||
Reference in New Issue
Block a user