视频字幕合成API

使用方法:

    POST /api/merge
    {
        "video_url": "视频链接",
        "subtitle_url": "字幕链接",
        "title1": "顶部第一标题",
        "title2": "顶部第二标题",
        "speaker_name": "演讲者姓名",
        "speaker_title_line1": "演讲者职业",
        "speaker_title_line2": "演讲者行业经验",
        "template": "模板名称,默认为"default",可选"template2""
    }
    

示例:

    curl -X POST http://localhost:5000/api/merge     -H "Content-Type: application/json"     -d '{
        "video_url": "https://example.com/video.mp4",
        "subtitle_url": "https://example.com/subtitle.srt",
        "title1": "家长们注意了",
        "title2": "孩子写作业磨蹭怎么办",
        "speaker_name": "伍老师",
        "speaker_title_line1": "教育专家",
        "speaker_title_line2": "教育行业十年经验",
        "template": "template2"
    }'
    

模板3示例(现代风格):

    curl -X POST http://localhost:5000/api/merge     -H "Content-Type: application/json"     -d '{
        "video_url": "https://example.com/video.mp4",
        "subtitle_url": "https://example.com/subtitle.srt",
        "title1": "科技前沿",
        "title2": "人工智能的未来",
        "speaker_name": "李博士",
        "speaker_title_line1": "AI研究科学家",
        "speaker_title_line2": "斯坦福大学博士后",
        "template": "template3"
    }'
    

测试接口(使用本地字幕文件):

    curl -X POST http://localhost:5000/api/test_merge     -H "Content-Type: application/json"     -d '{
        "template": "template2"
    }'