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)
