Add translation backend
Translate from any language to any language with alirezamsh/small100 running in a thread and reading from a queue shared with transcription thread. Signed-off-by: makaveli10 <vineet.suryan@collabora.com>
This commit is contained in:
@@ -11,10 +11,11 @@ def clear_screen():
|
||||
os.system("cls" if os.name == "nt" else "clear")
|
||||
|
||||
|
||||
def print_transcript(text):
|
||||
def print_transcript(text, translated=False):
|
||||
"""Prints formatted transcript text."""
|
||||
wrapper = textwrap.TextWrapper(width=60)
|
||||
for line in wrapper.wrap(text="".join(text)):
|
||||
text=" ".join(text) if translated else "".join(text)
|
||||
for line in wrapper.wrap(text=text):
|
||||
print(line)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user