import re

readme_path = "/opt/ai-avatar-demo/models/qwen3-tts/README.md"
patterns = [
    "Custom Voice",
    "Voice Clone",
    "Qwen3-TTS-12Hz-1.7B-Base",
    "Qwen3-TTS-12Hz-1.7B-CustomVoice",
    "generate_custom_voice",
    "generate_voice_clone"
]

try:
    with open(readme_path, "r", encoding="utf-8") as f:
        lines = f.readlines()
    
    count = 0
    for idx, line in enumerate(lines):
        match = False
        for pat in patterns:
            if pat.lower() in line.lower():
                match = True
                break
        if match:
            clean_line = ''.join([c if ord(c) < 128 else '?' for c in line])
            print(f"{idx+1}: {clean_line.strip()}")
            count += 1
            if count >= 120:
                break
except Exception as e:
    print("Error:", e)
