# fix transcript section headings and duplicate text
path = r"c:\Users\Bhavya sree\Downloads\livekit-master\VOICE_AGENT_BACKEND_DESIGN.md"
with open(path, "r", encoding="utf-8") as f:
    s = f.read()
# Fix duplicate in 8.2 heading and renumber to 11.2 (Unicode apostrophe)
s = s.replace("### 8.2 Where it\u2019s stored it\u2019s stored", "### 11.2 Where it's stored")
s = s.replace("### 8.2 Where it's stored it's stored", "### 11.2 Where it's stored")
# Fix duplicate in 8.3 heading and renumber to 11.3 (both quote styles)
s = s.replace("### 8.3 How you \"get\" the transcript you \u201cget\u201d the transcript", "### 11.3 How you \"get\" the transcript")
s = s.replace("### 8.3 How you \"get\" the transcript you \"get\" the transcript", "### 11.3 How you \"get\" the transcript")
with open(path, "w", encoding="utf-8") as f:
    f.write(s)
print("Done")
