imporved segment timesteps readability
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import json
|
||||
|
||||
from sympy import Segment
|
||||
import time
|
||||
|
||||
ALPHABET = [*"abcdefghijklmnopqrstuvwxyz"]
|
||||
|
||||
@@ -84,8 +83,10 @@ class Transcript:
|
||||
speaker = seq["speaker"]
|
||||
|
||||
segm = seq["segment"]
|
||||
sseg = time.strftime("%H:%M:%S",time.gmtime(segm[0]))
|
||||
eseg = time.strftime("%H:%M:%S",time.gmtime(segm[1]))
|
||||
|
||||
fstring += f"{speaker} {segm}: {seq['text']}\n"
|
||||
fstring += f"{speaker} ({sseg} ; {eseg}): {seq['text']}\n"
|
||||
return fstring
|
||||
|
||||
def __repr__(self) -> str:
|
||||
@@ -125,7 +126,6 @@ class Transcript:
|
||||
|
||||
return html
|
||||
|
||||
|
||||
def get_md(self) -> str:
|
||||
return self.get_html()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user