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:
makaveli10
2025-07-22 08:54:10 +00:00
parent 1ec437e71f
commit 2b8b245fa8
9 changed files with 743 additions and 30 deletions
+3 -2
View File
@@ -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)