Make SubFox production-ready with parallel translation and UI controls
This commit is contained in:
parent
c40b8bed2b
commit
2b1d05f02c
6046 changed files with 798327 additions and 0 deletions
10
app/services/srt_builder.py
Normal file
10
app/services/srt_builder.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
def build_srt(blocks):
|
||||
output = []
|
||||
|
||||
for block in blocks:
|
||||
output.append(str(block["index"]))
|
||||
output.append(f'{block["start"]} --> {block["end"]}')
|
||||
output.append(block.get("translated_text", block["text"]))
|
||||
output.append("")
|
||||
|
||||
return "\n".join(output)
|
||||
Loading…
Add table
Add a link
Reference in a new issue