Convert Traditional Chinese to Simplified Chinese
This commit is contained in:
@@ -141,13 +141,10 @@ def stream_builder(
|
|||||||
% (info.language, info.language_probability)
|
% (info.language, info.language_probability)
|
||||||
)
|
)
|
||||||
def wrap():
|
def wrap():
|
||||||
last_pos = 0
|
for segment in segments:
|
||||||
with tqdm.tqdm(total=info.duration, unit="seconds", disable=True) as pbar:
|
if info.language == "zh":
|
||||||
for segment in segments:
|
segment.text = ccc.convert(segment.text)
|
||||||
start, end, text = segment.start, segment.end, segment.text
|
yield segment
|
||||||
pbar.update(end - last_pos)
|
|
||||||
last_pos = end
|
|
||||||
yield segment
|
|
||||||
|
|
||||||
return wrap(), info
|
return wrap(), info
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user