播放音频文件同步音频文本

播放音频同步音频文本 对应单个文本高亮显示
使用audio

音频文件对应音频文本资源

请添加图片描述

音频文本内容(Json)


    [
        {
            "end": 4875,
            "index": 0,
            "speaker": 0,
            "start": 30,
            "text": "70号二啊,",
            "text_length": 5
        },
        {
            "end": 40275,
            "index": 1,
            "speaker": 0,
            "start": 5980,
            "text": "这个你能不能宝宝听不懂本身百分他们你好,",
            "text_length": 19
        },
        {
            "end": 17110,
            "index": 2,
            "speaker": 1,
            "start": 16490,
            "text": "菜办好了,",
            "text_length": 4
        },
        {
            "end": 24790,
            "index": 3,
            "speaker": 1,
            "start": 17110,
            "text": "马上回你大学的没有,",
            "text_length": 9
        },
        {
            "end": 37500,
            "index": 4,
            "speaker": 1,
            "start": 24790,
            "text": "你没有啊,",
            "text_length": 4
        },
        {
            "end": 40950,
            "index": 5,
            "speaker": 0,
            "start": 40809,
            "text": "对,",
            "text_length": 1
        },
        {
            "end": 41225,
            "index": 6,
            "speaker": 0,
            "start": 40950,
            "text": "好的,",
            "text_length": 2
        },
        {
            "end": 44555,
            "index": 7,
            "speaker": 0,
            "start": 43830,
            "text": "还有什么呢?",
            "text_length": 5
        },
        {
            "end": 51175,
            "index": 8,
            "speaker": 0,
            "start": 48820,
            "text": "但是我过来帮你找,",
            "text_length": 8
        },
        {
            "end": 52305,
            "index": 9,
            "speaker": 0,
            "start": 51590,
            "text": "欢迎大家啊,",
            "text_length": 5
        },
        {
            "end": 58815,
            "index": 10,
            "speaker": 0,
            "start": 55400,
            "text": "什么司机司机用车,",
            "text_length": 8
        },
        {
            "end": 65840,
            "index": 11,
            "speaker": 0,
            "start": 60640,
            "text": "然后太好了,",
            "text_length": 5
        },
        {
            "end": 69865,
            "index": 12,
            "speaker": 1,
            "start": 66390,
            "text": "你说我好了吗?",
            "text_length": 6
        },
        {
            "end": 71505,
            "index": 13,
            "speaker": 0,
            "start": 70909,
            "text": "我拖一下。",
            "text_length": 4
        },
        {
            "end": 127095,
            "index": 14,
            "speaker": 0,
            "start": 73180,
            "text": "那这个还有那我们啊啊开车写一个您的手机号码,",
            "text_length": 21
        },
        {
            "end": 82845,
            "index": 15,
            "speaker": 1,
            "start": 82490,
            "text": "呃,",
            "text_length": 1
        },
        {
            "end": 89745,
            "index": 16,
            "speaker": 1,
            "start": 88030,
            "text": "等一下啊,",
            "text_length": 4
        },
        {
            "end": 93375,
            "index": 17,
            "speaker": 1,
            "start": 91969,
            "text": "你什么人啊,",
            "text_length": 5
        },
        {
            "end": 136495,
            "index": 18,
            "speaker": 1,
            "start": 106060,
            "text": "那个啊嗯怎么了?",
            "text_length": 7
        },
        {
            "end": 138300,
            "index": 19,
            "speaker": 0,
            "start": 129340,
            "text": "这个好吧,",
            "text_length": 4
        },
        {
            "end": 161295,
            "index": 20,
            "speaker": 0,
            "start": 151790,
            "text": "这个什么你刚才啊你好,",
            "text_length": 10
        },
        {
            "end": 173709,
            "index": 21,
            "speaker": 0,
            "start": 161870,
            "text": "然后我一个人这个房子是邓静林一个人的名字,",
            "text_length": 20
        },
        {
            "end": 174165,
            "index": 22,
            "speaker": 0,
            "start": 173709,
            "text": "对吧?",
            "text_length": 2
        },
        {
            "end": 198590,
            "index": 23,
            "speaker": 1,
            "start": 174379,
            "text": "这个就是是呃第一段话把它抄下来嘛,",
            "text_length": 16
        },
        {
            "end": 175530,
            "index": 24,
            "speaker": 0,
            "start": 175120,
            "text": "对了,",
            "text_length": 2
        },
        {
            "end": 180830,
            "index": 25,
            "speaker": 0,
            "start": 179870,
            "text": "第一句话,",
            "text_length": 4
        },
        {
            "end": 182230,
            "index": 26,
            "speaker": 0,
            "start": 180830,
            "text": "本不动产属于姓名,",
            "text_length": 8
        },
        {
            "end": 183190,
            "index": 27,
            "speaker": 0,
            "start": 182230,
            "text": "改成你的名字,",
            "text_length": 6
        },
        {
            "end": 185970,
            "index": 28,
            "speaker": 0,
            "start": 183190,
            "text": "单独所有无其他所有人抄在这个地方,",
            "text_length": 16
        },
        {
            "end": 192260,
            "index": 29,
            "speaker": 0,
            "start": 185970,
            "text": "然后这里签名写日期高底,",
            "text_length": 11
        },
        {
            "end": 200100,
            "index": 30,
            "speaker": 0,
            "start": 194370,
            "text": "接下来在吗?",
            "text_length": 5
        },
        {
            "end": 199530,
            "index": 31,
            "speaker": 1,
            "start": 198590,
            "text": "写自己名字吧,",
            "text_length": 6
        },
        {
            "end": 203590,
            "index": 32,
            "speaker": 1,
            "start": 199530,
            "text": "由其他部门嗯在这个位置吧,",
            "text_length": 12
        },
        {
            "end": 201680,
            "index": 33,
            "speaker": 0,
            "start": 201280,
            "text": "对,",
            "text_length": 1
        },
        {
            "end": 202000,
            "index": 34,
            "speaker": 0,
            "start": 201680,
            "text": "是的,",
            "text_length": 2
        },
        {
            "end": 204210,
            "index": 35,
            "speaker": 0,
            "start": 202000,
            "text": "就把它抄这里姓名,",
            "text_length": 8
        },
        {
            "end": 203985,
            "index": 36,
            "speaker": 1,
            "start": 203590,
            "text": "是吧?",
            "text_length": 2
        },
        {
            "end": 206150,
            "index": 37,
            "speaker": 0,
            "start": 204210,
            "text": "改成你的名字啊。",
            "text_length": 7
        },
        {
            "end": 206495,
            "index": 38,
            "speaker": 0,
            "start": 206150,
            "text": "对呀,",
            "text_length": 2
        },
        {
            "end": 220555,
            "index": 39,
            "speaker": 0,
            "start": 210320,
            "text": "领导说为什么?",
            "text_length": 6
        },
        {
            "end": 235625,
            "index": 40,
            "speaker": 1,
            "start": 219380,
            "text": "因为人没有好吧,",
            "text_length": 7
        },
        {
            "end": 250970,
            "index": 41,
            "speaker": 0,
            "start": 227879,
            "text": "那么这加的话可以随时过来加,",
            "text_length": 13
        },
        {
            "end": 248390,
            "index": 42,
            "speaker": 1,
            "start": 247130,
            "text": "老公是可以的噻,",
            "text_length": 7
        },
        {
            "end": 257535,
            "index": 43,
            "speaker": 1,
            "start": 248390,
            "text": "要是以后加的话哦,",
            "text_length": 8
        },
        {
            "end": 252430,
            "index": 44,
            "speaker": 0,
            "start": 250970,
            "text": "只要房子没有贷款,",
            "text_length": 8
        },
        {
            "end": 256765,
            "index": 45,
            "speaker": 0,
            "start": 252490,
            "text": "两个人来一次把结婚证身份证和房证带上啊10块钱的费用,",
            "text_length": 26
        },
        {
            "end": 266880,
            "index": 46,
            "speaker": 0,
            "start": 262380,
            "text": "不看不对,",
            "text_length": 4
        },
        {
            "end": 266645,
            "index": 47,
            "speaker": 1,
            "start": 264890,
            "text": "年月日和新命是吧,",
            "text_length": 8
        },
        {
            "end": 294080,
            "index": 48,
            "speaker": 0,
            "start": 266880,
            "text": "签字写今天日期这个肯定是您本人的。",
            "text_length": 16
        },
        {
            "end": 273135,
            "index": 49,
            "speaker": 1,
            "start": 268790,
            "text": "26号21年12月。",
            "text_length": 9
        },
        {
            "end": 294515,
            "index": 50,
            "speaker": 1,
            "start": 294210,
            "text": "对,",
            "text_length": 1
        },
        {
            "end": 298600,
            "index": 51,
            "speaker": 0,
            "start": 297060,
            "text": "然后现在是已婚有配偶,",
            "text_length": 10
        },
        {
            "end": 299340,
            "index": 52,
            "speaker": 0,
            "start": 298600,
            "text": "对吧?",
            "text_length": 2
        },
        {
            "end": 305030,
            "index": 53,
            "speaker": 1,
            "start": 299130,
            "text": "没有哦,",
            "text_length": 3
        },
        {
            "end": 301840,
            "index": 54,
            "speaker": 0,
            "start": 299520,
            "text": "这里把配偶两个字写在这个地方,",
            "text_length": 14
        },
        {
            "end": 302620,
            "index": 55,
            "speaker": 0,
            "start": 301840,
            "text": "你爱人的名字,",
            "text_length": 6
        },
        {
            "end": 304780,
            "index": 56,
            "speaker": 0,
            "start": 302620,
            "text": "证件号写一下3个,",
            "text_length": 8
        },
        {
            "end": 306250,
            "index": 57,
            "speaker": 1,
            "start": 305030,
            "text": "身份证号码是吧,",
            "text_length": 7
        },
        {
            "end": 307875,
            "index": 58,
            "speaker": 0,
            "start": 305960,
            "text": "但是让他到我修改,",
            "text_length": 8
        },
        {
            "end": 311055,
            "index": 59,
            "speaker": 1,
            "start": 306250,
            "text": "联系人嗯,",
            "text_length": 4
        },
        {
            "end": 308780,
            "index": 60,
            "speaker": 0,
            "start": 308639,
            "text": "对,",
            "text_length": 1
        },
        {
            "end": 310720,
            "index": 61,
            "speaker": 0,
            "start": 308780,
            "text": "把他的信息要补上去,",
            "text_length": 9
        },
        {
            "end": 312199,
            "index": 62,
            "speaker": 0,
            "start": 310800,
            "text": "就是写在这里。",
            "text_length": 6
        },
        {
            "end": 313139,
            "index": 63,
            "speaker": 0,
            "start": 312220,
            "text": "这里写配偶,",
            "text_length": 5
        },
        {
            "end": 314120,
            "index": 64,
            "speaker": 0,
            "start": 313139,
            "text": "你爱人的名字,",
            "text_length": 6
        },
        {
            "end": 315725,
            "index": 65,
            "speaker": 0,
            "start": 314120,
            "text": "他的身份证号码写一下,",
            "text_length": 10
        },
        {
            "end": 319055,
            "index": 66,
            "speaker": 1,
            "start": 317180,
            "text": "这你就写配偶两个字是吧,",
            "text_length": 11
        },
        {
            "end": 319995,
            "index": 67,
            "speaker": 0,
            "start": 319060,
            "text": "这个你写呀,",
            "text_length": 5
        },
        {
            "end": 320410,
            "index": 68,
            "speaker": 1,
            "start": 319990,
            "text": "有,",
            "text_length": 1
        },
        {
            "end": 321470,
            "index": 69,
            "speaker": 1,
            "start": 320410,
            "text": "这是老公的姓名,",
            "text_length": 7
        },
        {
            "end": 325860,
            "index": 70,
            "speaker": 1,
            "start": 321470,
            "text": "身份证电话号码是吧啊,",
            "text_length": 10
        },
        {
            "end": 323750,
            "index": 71,
            "speaker": 0,
            "start": 322690,
            "text": "电话就不用写,",
            "text_length": 6
        },
        {
            "end": 326075,
            "index": 72,
            "speaker": 0,
            "start": 323750,
            "text": "你只用写我说的那几个地方就可以了。",
            "text_length": 16
        },
        {
            "end": 330865,
            "index": 73,
            "speaker": 1,
            "start": 325860,
            "text": "好的啊,",
            "text_length": 3
        },
        {
            "end": 337160,
            "index": 74,
            "speaker": 0,
            "start": 333010,
            "text": "可千的70晚上照到700000上照清楚,",
            "text_length": 19
        },
        {
            "end": 343700,
            "index": 75,
            "speaker": 0,
            "start": 337160,
            "text": "然后他帮我还来找我的那如果说喂,",
            "text_length": 15
        },
        {
            "end": 358925,
            "index": 76,
            "speaker": 0,
            "start": 343700,
            "text": "你们就看这个注意延迟啊,",
            "text_length": 11
        },
        {
            "end": 350145,
            "index": 77,
            "speaker": 1,
            "start": 348840,
            "text": "看一下有没有身份证。",
            "text_length": 9
        },
        {
            "end": 368005,
            "index": 78,
            "speaker": 1,
            "start": 356699,
            "text": "对对对啊,",
            "text_length": 4
        },
        {
            "end": 402785,
            "index": 79,
            "speaker": 0,
            "start": 360320,
            "text": "嗯不知道猪蹄子那走没有就没有你最怕这个大概他们都什么意思?",
            "text_length": 28
        },
        {
            "end": 389160,
            "index": 80,
            "speaker": 1,
            "start": 373680,
            "text": "感谢啊,",
            "text_length": 3
        },
        {
            "end": 406975,
            "index": 81,
            "speaker": 0,
            "start": 405569,
            "text": "这是你们主的权利。",
            "text_length": 8
        },
        {
            "end": 408150,
            "index": 82,
            "speaker": 0,
            "start": 407850,
            "text": "好,",
            "text_length": 1
        },
        {
            "end": 408365,
            "index": 83,
            "speaker": 0,
            "start": 408150,
            "text": "一,",
            "text_length": 1
        },
        {
            "end": 409139,
            "index": 84,
            "speaker": 0,
            "start": 408780,
            "text": "我给你,",
            "text_length": 3
        },
        {
            "end": 409580,
            "index": 85,
            "speaker": 0,
            "start": 409139,
            "text": "你发你的,",
            "text_length": 4
        },
        {
            "end": 410145,
            "index": 86,
            "speaker": 0,
            "start": 409580,
            "text": "你看到吗?",
            "text_length": 4
        },
        {
            "end": 414260,
            "index": 87,
            "speaker": 0,
            "start": 411040,
            "text": "今天啊今天努力拿完了呃,",
            "text_length": 11
        },
        {
            "end": 431675,
            "index": 88,
            "speaker": 1,
            "start": 413590,
            "text": "我想他们你的心。",
            "text_length": 7
        },
        {
            "end": 414800,
            "index": 89,
            "speaker": 0,
            "start": 414260,
            "text": "那个女生,",
            "text_length": 4
        },
        {
            "end": 415165,
            "index": 90,
            "speaker": 0,
            "start": 414800,
            "text": "对呀,",
            "text_length": 2
        },
        {
            "end": 416890,
            "index": 91,
            "speaker": 0,
            "start": 415850,
            "text": "这是什么?",
            "text_length": 4
        },
        {
            "end": 417520,
            "index": 92,
            "speaker": 0,
            "start": 416930,
            "text": "然后呢,",
            "text_length": 3
        },
        {
            "end": 420610,
            "index": 93,
            "speaker": 0,
            "start": 418820,
            "text": "我要给你们可以写的,",
            "text_length": 9
        },
        {
            "end": 421855,
            "index": 94,
            "speaker": 0,
            "start": 420610,
            "text": "你能告诉他们,",
            "text_length": 6
        },
        {
            "end": 423450,
            "index": 95,
            "speaker": 0,
            "start": 423090,
            "text": "嗯,",
            "text_length": 1
        },
        {
            "end": 425465,
            "index": 96,
            "speaker": 0,
            "start": 423450,
            "text": "因为呢不一样,",
            "text_length": 6
        },
        {
            "end": 435535,
            "index": 97,
            "speaker": 0,
            "start": 434660,
            "text": "对不对?",
            "text_length": 3
        },
        {
            "end": 437070,
            "index": 98,
            "speaker": 0,
            "start": 436410,
            "text": "哎呀,",
            "text_length": 2
        },
        {
            "end": 438425,
            "index": 99,
            "speaker": 0,
            "start": 437070,
            "text": "今天想走啊,",
            "text_length": 5
        },
        {
            "end": 444520,
            "index": 100,
            "speaker": 0,
            "start": 443919,
            "text": "找清楚,",
            "text_length": 3
        },
        {
            "end": 450280,
            "index": 101,
            "speaker": 0,
            "start": 444520,
            "text": "他清楚不好找60,",
            "text_length": 8
        },
        {
            "end": 455264,
            "index": 102,
            "speaker": 0,
            "start": 451870,
            "text": "应该呀他的续航大概在333左右,",
            "text_length": 15
        },
        {
            "end": 460224,
            "index": 103,
            "speaker": 0,
            "start": 456640,
            "text": "看到能够大概在这个333左右的样子,",
            "text_length": 17
        },
        {
            "end": 462730,
            "index": 104,
            "speaker": 0,
            "start": 461850,
            "text": "有真的吗?",
            "text_length": 4
        },
        {
            "end": 462930,
            "index": 105,
            "speaker": 0,
            "start": 462730,
            "text": "啊,",
            "text_length": 1
        },
        {
            "end": 464210,
            "index": 106,
            "speaker": 0,
            "start": 462930,
            "text": "我单挑看来,",
            "text_length": 5
        },
        {
            "end": 465975,
            "index": 107,
            "speaker": 0,
            "start": 464210,
            "text": "因为他也是乱的,",
            "text_length": 7
        },
        {
            "end": 472740,
            "index": 108,
            "speaker": 0,
            "start": 467170,
            "text": "有能333都有35栋一单元五。",
            "text_length": 14
        },
        {
            "end": 474890,
            "index": 109,
            "speaker": 0,
            "start": 474390,
            "text": "小金子,",
            "text_length": 3
        },
        {
            "end": 478890,
            "index": 110,
            "speaker": 0,
            "start": 474890,
            "text": "我找到了这个,",
            "text_length": 6
        },
        {
            "end": 479795,
            "index": 111,
            "speaker": 1,
            "start": 478640,
            "text": "然后你们呢,",
            "text_length": 5
        },
        {
            "end": 491615,
            "index": 112,
            "speaker": 0,
            "start": 478890,
            "text": "就那我我真的有一个表在表上面照起来。",
            "text_length": 17
        },
        {
            "end": 495805,
            "index": 113,
            "speaker": 0,
            "start": 494220,
            "text": "那他还有找,",
            "text_length": 5
        },
        {
            "end": 496710,
            "index": 114,
            "speaker": 1,
            "start": 495450,
            "text": "那我找身份证号码,",
            "text_length": 8
        },
        {
            "end": 500840,
            "index": 115,
            "speaker": 1,
            "start": 496710,
            "text": "我没有我老公的身打他,",
            "text_length": 10
        },
        {
            "end": 499870,
            "index": 116,
            "speaker": 0,
            "start": 497970,
            "text": "那你能不能跟你爱爱人打个电话,",
            "text_length": 14
        },
        {
            "end": 507660,
            "index": 117,
            "speaker": 0,
            "start": 499870,
            "text": "直接问他类似没啥吃,",
            "text_length": 9
        },
        {
            "end": 502365,
            "index": 118,
            "speaker": 1,
            "start": 500920,
            "text": "我打他他没接,",
            "text_length": 6
        },
        {
            "end": 512825,
            "index": 119,
            "speaker": 1,
            "start": 507950,
            "text": "不晓得有啊。",
            "text_length": 5
        },
        {
            "end": 523570,
            "index": 120,
            "speaker": 0,
            "start": 508940,
            "text": "有没有未成年的小孩孩子吧,",
            "text_length": 12
        },
        {
            "end": 516045,
            "index": 121,
            "speaker": 1,
            "start": 513840,
            "text": "我们家有两个小孩都未成年,",
            "text_length": 12
        },
        {
            "end": 517450,
            "index": 122,
            "speaker": 1,
            "start": 516830,
            "text": "这3岁,",
            "text_length": 3
        },
        {
            "end": 519785,
            "index": 123,
            "speaker": 1,
            "start": 517450,
            "text": "一个一个1023岁,",
            "text_length": 9
        },
        {
            "end": 526270,
            "index": 124,
            "speaker": 0,
            "start": 523570,
            "text": "去找一下你孩子写你小孩孩的信息,",
            "text_length": 15
        },
        {
            "end": 527790,
            "index": 125,
            "speaker": 0,
            "start": 526530,
            "text": "不用写你爱人的信息了,",
            "text_length": 10
        },
        {
            "end": 528815,
            "index": 126,
            "speaker": 0,
            "start": 527790,
            "text": "不用提出来了。",
            "text_length": 6
        },
        {
            "end": 529510,
            "index": 127,
            "speaker": 1,
            "start": 528610,
            "text": "那就学校学,",
            "text_length": 5
        },
        {
            "end": 532089,
            "index": 128,
            "speaker": 1,
            "start": 529510,
            "text": "我小孩的没有,",
            "text_length": 6
        },
        {
            "end": 532279,
            "index": 129,
            "speaker": 0,
            "start": 532050,
            "text": "嗯,",
            "text_length": 1
        },
        {
            "end": 533690,
            "index": 130,
            "speaker": 1,
            "start": 532470,
            "text": "他才10几岁了,",
            "text_length": 7
        },
        {
            "end": 534810,
            "index": 131,
            "speaker": 1,
            "start": 533690,
            "text": "有已经3岁,",
            "text_length": 5
        },
        {
            "end": 535845,
            "index": 132,
            "speaker": 0,
            "start": 534230,
            "text": "不是七,",
            "text_length": 3
        },
        {
            "end": 536345,
            "index": 133,
            "speaker": 1,
            "start": 534810,
            "text": "也就1012岁。",
            "text_length": 7
        },
        {
            "end": 537839,
            "index": 134,
            "speaker": 0,
            "start": 536480,
            "text": "那也是啊呃,",
            "text_length": 5
        },
        {
            "end": 541500,
            "index": 135,
            "speaker": 0,
            "start": 537839,
            "text": "是直接拍不写了,",
            "text_length": 7
        },
        {
            "end": 541865,
            "index": 136,
            "speaker": 0,
            "start": 541500,
            "text": "不写了,",
            "text_length": 3
        },
        {
            "end": 561225,
            "index": 137,
            "speaker": 0,
            "start": 545740,
            "text": "除了你这来重新拿一下这个手机台钱,",
            "text_length": 16
        },
        {
            "end": 585125,
            "index": 138,
            "speaker": 1,
            "start": 556550,
            "text": "稍等你说最后一个,",
            "text_length": 8
        },
        {
            "end": 569185,
            "index": 139,
            "speaker": 0,
            "start": 566090,
            "text": "没想到这个什么,",
            "text_length": 7
        },
        {
            "end": 581310,
            "index": 140,
            "speaker": 0,
            "start": 574990,
            "text": "我在4541205412哦,",
            "text_length": 13
        },
        {
            "end": 582445,
            "index": 141,
            "speaker": 0,
            "start": 581310,
            "text": "你不要几个案件吗?",
            "text_length": 8
        },
        {
            "end": 591699,
            "index": 142,
            "speaker": 0,
            "start": 585920,
            "text": "12个还有嗯,",
            "text_length": 6
        },
        {
            "end": 591310,
            "index": 143,
            "speaker": 1,
            "start": 590949,
            "text": "嗯,",
            "text_length": 1
        },
        {
            "end": 591730,
            "index": 144,
            "speaker": 1,
            "start": 591310,
            "text": "那没事,",
            "text_length": 3
        },
        {
            "end": 592399,
            "index": 145,
            "speaker": 1,
            "start": 591730,
            "text": "好吧。",
            "text_length": 2
        },
        {
            "end": 593695,
            "index": 146,
            "speaker": 0,
            "start": 593050,
            "text": "我还没写完,",
            "text_length": 5
        },
        {
            "end": 602735,
            "index": 147,
            "speaker": 0,
            "start": 602180,
            "text": "220,",
            "text_length": 3
        },
        {
            "end": 612115,
            "index": 148,
            "speaker": 0,
            "start": 603270,
            "text": "我自己的你好友进来了,",
            "text_length": 10
        },
        {
            "end": 632275,
            "index": 149,
            "speaker": 1,
            "start": 610760,
            "text": "好嗯,",
            "text_length": 2
        },
        {
            "end": 617130,
            "index": 150,
            "speaker": 0,
            "start": 614589,
            "text": "根本就没是黄色。",
            "text_length": 7
        },
        {
            "end": 632365,
            "index": 151,
            "speaker": 0,
            "start": 623630,
            "text": "我他你嗯怎么了?",
            "text_length": 7
        },
        {
            "end": 637420,
            "index": 152,
            "speaker": 1,
            "start": 636579,
            "text": "在哪里?",
            "text_length": 3
        },
        {
            "end": 638595,
            "index": 153,
            "speaker": 1,
            "start": 637420,
            "text": "我有有喝啊,",
            "text_length": 5
        },
        {
            "end": 638540,
            "index": 154,
            "speaker": 0,
            "start": 637530,
            "text": "加上啊,",
            "text_length": 3
        },
        {
            "end": 648975,
            "index": 155,
            "speaker": 0,
            "start": 638540,
            "text": "为什么没有我们嗯,",
            "text_length": 8
        },
        {
            "end": 640710,
            "index": 156,
            "speaker": 1,
            "start": 639370,
            "text": "不晓得是不二11啊,",
            "text_length": 9
        },
        {
            "end": 651550,
            "index": 157,
            "speaker": 1,
            "start": 640710,
            "text": "我跟四季永新五栋一单元有有有嗯,",
            "text_length": 15
        },
        {
            "end": 653845,
            "index": 158,
            "speaker": 0,
            "start": 650700,
            "text": "请重这个,",
            "text_length": 4
        },
        {
            "end": 651945,
            "index": 159,
            "speaker": 1,
            "start": 651550,
            "text": "嗯,",
            "text_length": 1
        },
        {
            "end": 654395,
            "index": 160,
            "speaker": 1,
            "start": 653650,
            "text": "这个没问题,",
            "text_length": 5
        },
        {
            "end": 658654,
            "index": 161,
            "speaker": 0,
            "start": 654360,
            "text": "还有你好好是你们吗?",
            "text_length": 9
        },
        {
            "end": 660995,
            "index": 162,
            "speaker": 1,
            "start": 658460,
            "text": "我那个不对,",
            "text_length": 5
        },
        {
            "end": 664530,
            "index": 163,
            "speaker": 0,
            "start": 661680,
            "text": "小朋友看看很重要,",
            "text_length": 8
        },
        {
            "end": 673699,
            "index": 164,
            "speaker": 0,
            "start": 664530,
            "text": "说什么这里是没有,",
            "text_length": 8
        },
        {
            "end": 671720,
            "index": 165,
            "speaker": 1,
            "start": 671260,
            "text": "在一样,",
            "text_length": 3
        },
        {
            "end": 673500,
            "index": 166,
            "speaker": 1,
            "start": 671720,
            "text": "没有来了。",
            "text_length": 4
        },
        {
            "end": 686830,
            "index": 167,
            "speaker": 1,
            "start": 673500,
            "text": "宝贝嗯啊嗯,",
            "text_length": 5
        },
        {
            "end": 678829,
            "index": 168,
            "speaker": 0,
            "start": 675370,
            "text": "自然是没有,",
            "text_length": 5
        },
        {
            "end": 681225,
            "index": 169,
            "speaker": 0,
            "start": 680690,
            "text": "为什么?",
            "text_length": 3
        },
        {
            "end": 685900,
            "index": 170,
            "speaker": 0,
            "start": 685520,
            "text": "对呀,",
            "text_length": 2
        },
        {
            "end": 686160,
            "index": 171,
            "speaker": 0,
            "start": 685900,
            "text": "好,",
            "text_length": 1
        },
        {
            "end": 686920,
            "index": 172,
            "speaker": 0,
            "start": 686160,
            "text": "行好,",
            "text_length": 2
        },
        {
            "end": 687145,
            "index": 173,
            "speaker": 1,
            "start": 686830,
            "text": "是吧?",
            "text_length": 2
        },
        {
            "end": 695635,
            "index": 174,
            "speaker": 0,
            "start": 686920,
            "text": "后东西拿出来看这里。",
            "text_length": 9
        },
        {
            "end": 698139,
            "index": 175,
            "speaker": 0,
            "start": 696570,
            "text": "好啊,",
            "text_length": 2
        },
        {
            "end": 700005,
            "index": 176,
            "speaker": 0,
            "start": 699090,
            "text": "看这里拍个照,",
            "text_length": 6
        },
        {
            "end": 717940,
            "index": 177,
            "speaker": 0,
            "start": 703580,
            "text": "他们在说对的呃,",
            "text_length": 7
        },
        {
            "end": 719264,
            "index": 178,
            "speaker": 0,
            "start": 717940,
            "text": "12号加班是吧?",
            "text_length": 7
        },
        {
            "end": 723259,
            "index": 179,
            "speaker": 0,
            "start": 721220,
            "text": "在这里排队等着加班,",
            "text_length": 9
        },
        {
            "end": 724660,
            "index": 180,
            "speaker": 0,
            "start": 723259,
            "text": "要去和税缴税啊,",
            "text_length": 7
        },
        {
            "end": 725720,
            "index": 181,
            "speaker": 0,
            "start": 724660,
            "text": "收到短信去核税,",
            "text_length": 7
        },
        {
            "end": 726930,
            "index": 182,
            "speaker": 0,
            "start": 725720,
            "text": "缴税8~2十分。",
            "text_length": 7
        },
        {
            "end": 728810,
            "index": 183,
            "speaker": 1,
            "start": 728110,
            "text": "小费呀,",
            "text_length": 3
        },
        {
            "end": 728855,
            "index": 184,
            "speaker": 0,
            "start": 728150,
            "text": "小王雀,",
            "text_length": 3
        },
        {
            "end": 730005,
            "index": 185,
            "speaker": 1,
            "start": 728810,
            "text": "上午不是交了吗?",
            "text_length": 7
        },
        {
            "end": 730850,
            "index": 186,
            "speaker": 0,
            "start": 729810,
            "text": "不管要不要缴钱,",
            "text_length": 7
        },
        {
            "end": 732110,
            "index": 187,
            "speaker": 0,
            "start": 730850,
            "text": "都要去那边签字确认,",
            "text_length": 9
        },
        {
            "end": 733129,
            "index": 188,
            "speaker": 0,
            "start": 732110,
            "text": "不然这里出不来啊,",
            "text_length": 8
        },
        {
            "end": 733769,
            "index": 189,
            "speaker": 0,
            "start": 733129,
            "text": "具体缴不缴,",
            "text_length": 5
        },
        {
            "end": 735490,
            "index": 190,
            "speaker": 0,
            "start": 733769,
            "text": "以税务人员跟您核的为准。",
            "text_length": 11
        },
        {
            "end": 736589,
            "index": 191,
            "speaker": 0,
            "start": 735529,
            "text": "税核完了之后,",
            "text_length": 6
        },
        {
            "end": 737709,
            "index": 192,
            "speaker": 0,
            "start": 736589,
            "text": "一个工作日出证,",
            "text_length": 7
        },
        {
            "end": 738670,
            "index": 193,
            "speaker": 0,
            "start": 737709,
            "text": "明天可以过来拿。",
            "text_length": 7
        },
        {
            "end": 739550,
            "index": 194,
            "speaker": 0,
            "start": 738670,
            "text": "您是自己过来拿,",
            "text_length": 7
        },
        {
            "end": 740819,
            "index": 195,
            "speaker": 0,
            "start": 739550,
            "text": "还是半个电费。",
            "text_length": 6
        },
        {
            "end": 741060,
            "index": 196,
            "speaker": 1,
            "start": 740790,
            "text": "啊,",
            "text_length": 1
        },
        {
            "end": 743884,
            "index": 197,
            "speaker": 0,
            "start": 741279,
            "text": "那你就这个呀把身份证带上啊,",
            "text_length": 13
        },
        {
            "end": 748240,
            "index": 198,
            "speaker": 0,
            "start": 744660,
            "text": "把这个单子也带上到五拿证拿证的时候,",
            "text_length": 17
        },
        {
            "end": 752255,
            "index": 199,
            "speaker": 1,
            "start": 746100,
            "text": "对的啊,",
            "text_length": 3
        },
        {
            "end": 750440,
            "index": 200,
            "speaker": 0,
            "start": 748240,
            "text": "再把这个80块钱办证的费用交一下就行了。",
            "text_length": 19
        },
        {
            "end": 753649,
            "index": 201,
            "speaker": 0,
            "start": 750440,
            "text": "今天先不交这个80把水喝完就可以回去了。",
            "text_length": 19
        },
        {
            "end": 754524,
            "index": 202,
            "speaker": 0,
            "start": 753649,
            "text": "在这边排队啊,",
            "text_length": 6
        },
        {
            "end": 756130,
            "index": 203,
            "speaker": 1,
            "start": 754870,
            "text": "就是把水月喝完就回去,",
            "text_length": 10
        },
        {
            "end": 757410,
            "index": 204,
            "speaker": 1,
            "start": 756130,
            "text": "明天交这个80块钱,",
            "text_length": 9
        },
        {
            "end": 758300,
            "index": 205,
            "speaker": 0,
            "start": 757300,
            "text": "先过来拿证的时候,",
            "text_length": 8
        },
        {
            "end": 758290,
            "index": 206,
            "speaker": 1,
            "start": 757410,
            "text": "把身份证带到,",
            "text_length": 6
        },
        {
            "end": 761585,
            "index": 207,
            "speaker": 1,
            "start": 758290,
            "text": "把这个单子带到啊,",
            "text_length": 8
        },
        {
            "end": 770285,
            "index": 208,
            "speaker": 0,
            "start": 758300,
            "text": "交对明天过拿证的时候过来交八,",
            "text_length": 14
        },
        {
            "end": 777825,
            "index": 209,
            "speaker": 0,
            "start": 771210,
            "text": "然后呢嗯不行啊,",
            "text_length": 7
        },
        {
            "end": 814625,
            "index": 210,
            "speaker": 0,
            "start": 791350,
            "text": "好嗯,",
            "text_length": 2
        },
        {
            "end": 827329,
            "index": 211,
            "speaker": 1,
            "start": 792500,
            "text": "你的那我那就等交费了吧啊,",
            "text_length": 12
        },
        {
            "end": 859255,
            "index": 212,
            "speaker": 0,
            "start": 820740,
            "text": "走嗯打电话还有啊喂什么。",
            "text_length": 11
        },
        {
            "end": 837035,
            "index": 213,
            "speaker": 1,
            "start": 836600,
            "text": "一样的,",
            "text_length": 3
        },
        {
            "end": 856750,
            "index": 214,
            "speaker": 1,
            "start": 851490,
            "text": "天使欢迎嗯,",
            "text_length": 5
        },
        {
            "end": 861540,
            "index": 215,
            "speaker": 1,
            "start": 857740,
            "text": "那么对了。",
            "text_length": 4
        }
    ]

同步音频文本高亮

播放音频同步音频文本 对应单个文本高亮显示
使用audio

请添加图片描述

<template>
  <div class="dialog-container">
    <div> 
    <!-- 音频播放控件 -->
    <audio ref="audioPlayer" @loadedmetadata="onLoadedMetadata" @timeupdate="onTimeUpdate" controls></audio></div>
    <!-- 文本列表 -->
    <ul class="sentence-list" style="overflow-y: auto;">
      <li v-for="(sentence, index) in sentences" :key="index"
          :class="['sentence', { 'highlight': isActiveSentence(index) }, sentence.speaker === 0 ? 'customer' : 'employee']"
          @click="seekToSentence(sentence)">
        <div class="sentence-wrapper">
          <span class="speaker-label">{{ sentence.speaker === 0 ? '客户' : '员工' }}</span>
          <span class="timestamp">[{{ formatTime(sentence.start) }} - {{ formatTime(sentence.end) }}]</span>
          <span>时间差{{formatTime(sentence.end-sentence.start) }}</span>
          <p>{{ sentence.text }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      currentSentenceIndex: -1,
      sentences:[]
    };
  },
  mounted() {
    const audioElement = this.$refs.audioPlayer;
    audioElement.src = '../20250109.wav'; // 确保路径正确
    audioElement.preload = 'auto'; // 提前加载音频资源
    audioElement.load(); // 手动触发加载
  },
  methods: {
    seekToSentence(sentence) {
      const audioElement = this.$refs.audioPlayer;
      if (!audioElement.paused) {
        audioElement.pause();
      }
      audioElement.currentTime = sentence.start / 1000; // 将毫秒转换为秒
      this.currentSentenceIndex = this.sentences.findIndex(s => s.start === sentence.start && s.end === sentence.end);
      audioElement.play().catch(error => {
        console.error('无法播放音频:', error);
      });
    },
    onLoadedMetadata(event) {
      console.log('音频元数据已加载');
    },
    onTimeUpdate(event) {
      const currentTime = event.target.currentTime * 1000; // 将秒转换为毫秒
      let activeIndex = -1;

      for (let i = 0; i < this.sentences.length; i++) {
        if (currentTime >= this.sentences[i].start && currentTime < this.sentences[i].end) {
          activeIndex = i;
          break;
        }
      }

      if (activeIndex !== this.currentSentenceIndex) {
        this.currentSentenceIndex = activeIndex;
      }
    },
    isActiveSentence(index) {
      return this.currentSentenceIndex === index;
    },
    formatTime(ms) {
      const totalSeconds = Math.floor(ms / 1000);
      const minutes = Math.floor(totalSeconds / 60).toString().padStart(2, '0');
      const seconds = (totalSeconds % 60).toString().padStart(2, '0');
      return `${minutes}:${seconds}`;
    }
  }
};
</script>
<style scoped>
.dialog-container {
  border:1px solid red;
  padding:20px;
  display: flex;
  flex-direction: column;
  height: 400px; /* 固定高度 */
}

.sentence-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.sentence {
  cursor: pointer;
  margin: 5px 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.customer {
  justify-content: flex-start;
}

.employee {
  justify-content: flex-end;
}

.sentence-wrapper {
  display: inline-block;
  max-width: 45%;
  padding: 10px;
  border-radius: 8px;
  background-color: #f0f0f0;
}

.sentence.highlight .sentence-wrapper {
  background-color: #ffeb3b; /* 或者您喜欢的其他颜色 */
}

.speaker-label {
  font-weight: bold;
}

.timestamp {
  color: #777;
}

.sentence-wrapper p {
  margin: 0;
}
</style>

文本高亮点击可播放可暂停

音频文件播放同步对应音频文本 点击对应文本可播放可暂停 进行同步音频文件播放时间点
音频同步文本 对应音频文本高亮显示

请添加图片描述

<template>
  <div class="dialog-container">
    <div>
      <!-- 音频播放控件 -->
    <audio ref="audioPlayer" @loadedmetadata="onLoadedMetadata" @timeupdate="onTimeUpdate" controls></audio>
    </div>
    <!-- 文本列表 -->
    <ul class="sentence-list" style="overflow-y: auto;">
      <li v-for="(sentence, index) in sentences" :key="index"
          :class="['sentence', { 'highlight': isActiveSentence(index), 'loading': isLoadingSentence(index) }, sentence.speaker === 0 ? 'customer' : 'employee']"
          @click="handleSentenceClick(sentence)">
        <div class="sentence-wrapper">
          <span class="speaker-label">{{ sentence.speaker === 0 ? '客户' : '员工' }}</span>
          <span class="timestamp">[{{ formatTime(sentence.start) }} - {{ formatTime(sentence.end) }}]</span>
          <p>{{ sentence.text }}</p>
          <!-- 以进度条形式展示 -->
          <!-- <div class="progress-indicator" :style="{ width: getProgressWidth(sentence) }"></div> -->
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      currentSentenceIndex: -1,
      loadingSentenceIndex: null,
      sentences:     [],
      audioLoaded: false // 新增状态,用于跟踪音频是否已加载
    };
  },
  mounted() {
    const audioElement = this.$refs.audioPlayer;
    if (audioElement) {
      audioElement.src = '../20250109.wav'; // 确保路径正确
      audioElement.preload = 'auto';
      audioElement.load();
      
      // 监听 loadedmetadata 事件以设置 audioLoaded 为 true
      audioElement.addEventListener('loadedmetadata', () => {
        this.audioLoaded = true;
      });
    }
  },
  methods: {
    handleSentenceClick(sentence) {
      const audioElement = this.$refs.audioPlayer;
      if (!audioElement) return;

      const index = this.sentences.findIndex(s => s.start === sentence.start && s.end === sentence.end);

      if (this.currentSentenceIndex === index && !audioElement.paused) {
        audioElement.pause();
        this.loadingSentenceIndex = null;
      } else {
        this.scrollToSentence(index);
        this.loadingSentenceIndex = index;
        this.seekToSentence(sentence);
      }
    },
    seekToSentence(sentence) {
      const audioElement = this.$refs.audioPlayer;
      if (!audioElement) return;

      audioElement.currentTime = sentence.start / 1000; // 将毫秒转换为秒
      this.currentSentenceIndex = this.sentences.indexOf(sentence);
      audioElement.play().then(() => {
        this.loadingSentenceIndex = null;
      }).catch(error => {
        console.error('无法播放音频:', error);
        this.loadingSentenceIndex = null;
      });
    },
    onLoadedMetadata(event) {
      console.log('音频元数据已加载');
      this.audioLoaded = true; // 当元数据加载完成后设置为 true
    },
    onTimeUpdate(event) {
      const audioElement = this.$refs.audioPlayer;
      if (!audioElement) return;

      const currentTime = event.target.currentTime * 1000; // 将秒转换为毫秒
      let activeIndex = -1;

      for (let i = 0; i < this.sentences.length; i++) {
        if (currentTime >= this.sentences[i].start && currentTime < this.sentences[i].end) {
          activeIndex = i;
          break;
        }
      }

      if (activeIndex !== this.currentSentenceIndex) {
        this.currentSentenceIndex = activeIndex;
        this.scrollToSentence(activeIndex);
      }
    },
    isActiveSentence(index) {
      return this.currentSentenceIndex === index;
    },
    isLoadingSentence(index) {
      return this.loadingSentenceIndex === index;
    },
    formatTime(ms) {
      const totalSeconds = Math.floor(ms / 1000);
      const minutes = Math.floor(totalSeconds / 60).toString().padStart(2, '0');
      const seconds = (totalSeconds % 60).toString().padStart(2, '0');
      return `${minutes}:${seconds}`;
    },
    getProgressWidth(sentence) {
      const audioElement = this.$refs.audioPlayer;
      if (!audioElement || !this.audioLoaded) return '0%';

      const currentTime = audioElement.currentTime * 1000;
      if (currentTime >= sentence.start && currentTime < sentence.end) {
        const progress = ((currentTime - sentence.start) / (sentence.end - sentence.start)) * 100;
        return `${progress}%`;
      } else {
        return '0%';
      }
    },
    scrollToSentence(index) {
      const container = this.$el.querySelector('.sentence-list');
      const sentenceEl = this.$el.querySelectorAll('.sentence')[index];
      if (container && sentenceEl) {
        container.scrollTop = sentenceEl.offsetTop - container.offsetTop;
      }
    }
  }
};
</script>
<style scoped>
.dialog-container {
  border:1px solid red;
  padding:20px;
  display: flex;
  flex-direction: column;
  height: 400px; /* 固定高度 */
}

.sentence-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.sentence {
  cursor: pointer;
  margin: 5px 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.customer {
  justify-content: flex-start;
}

.employee {
  justify-content: flex-end;
}

.sentence-wrapper {
  display: inline-block;
  max-width: 45%;
  padding: 10px;
  border-radius: 8px;
  background-color: #f0f0f0;
}

.sentence.highlight .sentence-wrapper {
  background-color: #ffeb3b; /* 或者您喜欢的其他颜色 */
}

.speaker-label {
  font-weight: bold;
}

.timestamp {
  color: #777;
}

.sentence-wrapper p {
  margin: 0;
}
.sentence-wrapper {
  position: relative;
}

.progress-indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background-color: #4CAF50;
  transition: width 0.3s ease-in-out;
  z-index: 1;
}

.sentence.loading .sentence-wrapper {
  background-color: #d4edda; /* 加载中的背景颜色 */
}

.sentence.highlight .sentence-wrapper {
  background-color: #ffeb3b; /* 或者您喜欢的其他颜色 */
}

.sentence.loading .sentence-wrapper::before {
  content: "加载中...";
  font-size: 0.8em;
  color: #777;
  display: block;
  margin-bottom: 5px;
}
</style>

同步音频文本模拟动画播放

使用 CSS 动画和 JavaScript 来模拟一个渐变填充的效果。
这个效果将从左到右逐渐填充句子背景,以模仿音频播放的过程。
实现步骤:
1 添加 CSS 动画:创建一个 CSS 动画,用于模拟背景颜色的渐进变化。
2 动态设置动画持续时间:根据每个句子的长度(即结束时间减去开始时间),计算出动画应该持续的时间。
3 触发动画:当用户点击某个句子并开始播放时,
4 为对应的 <li> 元素添加特定的类来启动动画;在播放结束或暂停时移除该类。
效果:
音频文件播放同步对应音频文本 点击对应文本可播放可暂停 进行同步音频文件播放时间点
音频同步文本 对应音频文件不仅高亮显示 并且动画模仿音频播放过程

请添加图片描述

<template>
  <div class="dialog-container">
   <div>
     <!-- 音频播放控件 -->
    <audio ref="audioPlayer" @loadedmetadata="onLoadedMetadata" @timeupdate="onTimeUpdate" @play="onPlay" @pause="onPause" @ended="onEnded" controls></audio>
   </div>
    <!-- 文本列表 -->
    <ul class="sentence-list" style="overflow-y: auto;">
      <li v-for="(sentence, index) in sentences" :key="index"
          :class="['sentence', { 'highlight': isActiveSentence(index), 'loading': isLoadingSentence(index), 'playing': isPlayingSentence(index) }, sentence.speaker === 0 ? 'customer' : 'employee']"
          @click="handleSentenceClick(sentence)">
        <div class="sentence-wrapper" :style="getAnimationDuration(sentence)">
          <div class="background-fill"></div> <!-- 新增的 div 用于背景填充 -->
          <span class="speaker-label">{{ sentence.speaker === 0 ? '客户' : '员工' }}</span>
          <span class="timestamp">[{{ formatTime(sentence.start) }} - {{ formatTime(sentence.end) }}]</span>
          <p>{{ sentence.text }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      currentSentenceIndex: -1,
      loadingSentenceIndex: null,
      playingSentenceIndex: null,
      sentences:[],//对应音频文本数据
      audioLoaded: false // 新增状态,用于跟踪音频是否已加载
    };
  },
  mounted() {
    const audioElement = this.$refs.audioPlayer;
    if (audioElement) {
      audioElement.src = '../20250109.wav'; // 确保路径正确
      audioElement.preload = 'auto';
      audioElement.load();
      
      // 监听 loadedmetadata 事件以设置 audioLoaded 为 true
      audioElement.addEventListener('loadedmetadata', () => {
        this.audioLoaded = true;
      });
    }
  },
  methods: {
    handleSentenceClick(sentence) {
      const audioElement = this.$refs.audioPlayer;
      if (!audioElement) return;

      const index = this.sentences.findIndex(s => s.start === sentence.start && s.end === sentence.end);

      if (this.currentSentenceIndex === index && !audioElement.paused) {
        audioElement.pause();
      } else {
        this.scrollToSentence(index);
        this.loadingSentenceIndex = index;
        this.seekToSentence(sentence);
      }
    },
    seekToSentence(sentence) {
      const audioElement = this.$refs.audioPlayer;
      if (!audioElement) return;

      audioElement.currentTime = sentence.start / 1000; // 将毫秒转换为秒
      this.currentSentenceIndex = this.sentences.indexOf(sentence);
      this.playingSentenceIndex = this.currentSentenceIndex;
      audioElement.play().then(() => {
        this.loadingSentenceIndex = null;
      }).catch(error => {
        console.error('无法播放音频:', error);
        this.loadingSentenceIndex = null;
        this.playingSentenceIndex = null;
      });
    },
    onLoadedMetadata(event) {
      console.log('音频元数据已加载');
      this.audioLoaded = true; // 当元数据加载完成后设置为 true
    },
    onTimeUpdate(event) {
      const currentTime = event.target.currentTime * 1000; // 将秒转换为毫秒
      let activeIndex = -1;

      for (let i = 0; i < this.sentences.length; i++) {
        if (currentTime >= this.sentences[i].start && currentTime < this.sentences[i].end) {
          activeIndex = i;
          break;
        }
      }

      if (activeIndex !== this.currentSentenceIndex) {
        this.currentSentenceIndex = activeIndex;
        this.playingSentenceIndex = activeIndex;
        this.scrollToSentence(activeIndex);
      }
    },
    onPlay(event) {
      this.playingSentenceIndex = this.currentSentenceIndex;
    },
    onPause(event) {
      this.playingSentenceIndex = null;
    },
    onEnded(event) {
      this.playingSentenceIndex = null;
    },
    isActiveSentence(index) {
      return this.currentSentenceIndex === index;
    },
    isLoadingSentence(index) {
      return this.loadingSentenceIndex === index;
    },
    isPlayingSentence(index) {
      return this.playingSentenceIndex === index;
    },
    formatTime(ms) {
      const totalSeconds = Math.floor(ms / 1000);
      const minutes = Math.floor(totalSeconds / 60).toString().padStart(2, '0');
      const seconds = (totalSeconds % 60).toString().padStart(2, '0');
      return `${minutes}:${seconds}`;
    },
    getAnimationDuration(sentence) {
      if (!this.isPlayingSentence(this.sentences.indexOf(sentence))) return {};
      const duration = (sentence.end - sentence.start) / 1000; // 转换为秒
      return {
        '--animation-duration': `${duration}s`
      };
    },
    scrollToSentence(index) {
      const container = this.$el.querySelector('.sentence-list');
      const sentenceEl = this.$el.querySelectorAll('.sentence')[index];
      if (container && sentenceEl) {
        container.scrollTop = sentenceEl.offsetTop - container.offsetTop;
      }
    }
  }
};
</script>
<style scoped>
/*-- */
.dialog-container {
  border:1px solid red;
  padding:20px;
  display: flex;
  flex-direction: column;
  height: 400px; /* 固定高度 */
}

.sentence-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.sentence {
  cursor: pointer;
  margin: 5px 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.customer {
  justify-content: flex-start;
}

.employee {
  justify-content: flex-end;
}

.sentence-wrapper {
  display: inline-block;
  max-width: 45%;
  padding: 10px;
  border-radius: 8px;
  background-color: #f0f0f0;
}

.sentence.highlight .sentence-wrapper {
  background-color: #ffeb3b; /* 或者您喜欢的其他颜色 */
}

.speaker-label {
  font-weight: bold;
}

.timestamp {
  color: #777;
}

.sentence-wrapper p {
  margin: 0;
}
/*-- */

.sentence-wrapper {
  position: relative;
  overflow: hidden;
}

.background-fill {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 0;
  background-color: #4CAF50;
  z-index: 1; /* 提高 z-index */
  animation: loadBackground var(--animation-duration) linear forwards;
}

@keyframes loadBackground {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.sentence.loading .sentence-wrapper {
  background-color: #d4edda; /* 加载中的背景颜色 */
}

.sentence.highlight .sentence-wrapper {
  background-color: #ffeb3b; /* 或者您喜欢的其他颜色 */
}

.sentence.loading .sentence-wrapper::before {
  content: "加载中...";
  font-size: 0.8em;
  color: #777;
  display: block;
  margin-bottom: 5px;
}

.sentence.playing .sentence-wrapper > *:not(.background-fill) {
  position: relative;
  z-index: 2; /* 确保文本内容在背景之上 */
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/953831.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【React】新建React项目

目录 create-react-app基础运用React核心依赖React 核心思想&#xff1a;数据驱动React 采用 MVC体系package.jsonindex.html好书推荐 官方提供了快速构建React 项目的脚手架&#xff1a; create-react-app &#xff0c;目前使用它安装默认是19版本&#xff0c;我们这里降为18…

mac homebrew配置使用

本文介绍mac上homebrew工具的安装、配置过程。homebrew功能类似于centos的yum&#xff0c;用于软件包的管理&#xff0c;使用上有命令的差异。 本次配置过程使用mac&#xff0c;看官方文档&#xff0c;在linux上也可以用&#xff0c;但我没试过&#xff0c;有兴趣的同学可以试试…

第一次作业三种方式安装mysql(Windows和linux下)作业

在Windows11上安装sever&#xff08;服务&#xff09;端和客户端 server端安装 打开官网MySQL 进入到主页 点击DOWMLOAD 进入下载界面 点击下方MySQL Community (GPL) Downloads 进入社区版mysql下载界面 点击 MySQL Community Server 进入server端下载 选择8.4.3LTS&…

基于Media+Unity的手部位姿三维位姿估计

使用mediapipe Unity 手部位姿三维位姿估计 参考文章 基于Mediapipe的姿势识别并同步到Unity人体模型中 MediapipeUnity3d实现虚拟手_unity mediapipe-CSDN博客 需求 我的需求就是快速、准确的跟踪手部位姿并实现一个三维显示。 主要思路 搭建mdeiapipe系统&#xff0c…

【C++】IO 流

文章目录 &#x1f449;C 语言的输入与输出&#x1f448;&#x1f449;流是什么&#x1f448;&#x1f449;C IO 流&#x1f448;C 标准 IO 流C 和 C 语言的输入格式问题C 的多次输入内置类型和自定义类型的转换日期的多次输入C 文件 IO 流文本文件和二进制文件的读写 &#x1…

成功案例分享 — 芯科科技助力涂鸦智能打造Matter over Thread模块,简化Matter设备开发

芯科科技&#xff08;Silicon Labs&#xff09;的愿景之一是让开发者每天都能够更轻松地开发无线物联网&#xff08;IoT&#xff09;。特别是在拥有相同愿景的合作伙伴的帮助下&#xff0c;我们每天都在取得进步。但是要想弥合知识水平和物联网开发之间的差距仍会面临一定的挑战…

MySQL主从部署(保姆版)

一、mysql 同步复制有关概述 一般数据库都是读取压力大于写数据压力&#xff0c;主从复制即为了实现数据库的负载均衡和读写分离。通过将Mysql的某一台主机的数据复制到其它主机&#xff08;slaves&#xff09;上&#xff0c;主服务器只负责写&#xff0c;而从服务器只负责读。…

浅谈计算机网络02 | SDN控制平面

计算机网络控制平面 一、现代计算机网络控制平面概述1.1 与数据平面、管理平面的关系1.2 控制平面的发展历程 二、控制平面的关键技术剖析2.1 网络层协议2.1.1 OSPF协议2.1.2 BGP协议 2.2 SDN控制平面技术2.2.1 SDN架构与原理2.2.2 OpenFlow协议2.2.3 SDN控制器 一、现代计算机…

基于网络爬虫技术的网络新闻分析【源码+文档+部署讲解】

目 录 1 绪论 1.1 论文研究背景与意义 1.2 论文研究内容 2 系统需求分析 2.1 系统需求概述 2.2 系统需求分析 2.2.1 系统功能要求 2.2.2 系统IPO图 2.2 系统非功能性需求分析 3系统概要设计 3.1 设计约束 3.1.1需求约束 3.1.2设计策略 3.1.3 技术实现 3.3 模块…

WeakAuras NES Script(lua)

WeakAuras NES Script 修星脚本字符串 脚本1&#xff1a;NES !WA:2!TMZFWXX1zDxVAs4siiRKiBN4eV(sTRKZ5Z6opYbhQQSoPtsxr(K8ENSJtS50(J3D7wV3UBF7E6hgmKOXdjKsgAvZFaPTtte0mD60XdCmmecDMKruyykDcplAZiGPfWtSsag6myGuOuq89EVDV9wPvKeGBM7U99EFVVVV33VFFB8Z2TJ8azYMlZj7Ur3QDR(…

网络安全学习81天(记录)

前言&#xff1a; 小迪安全&#xff0c;81天&#xff0c;开始了php代码审计 思路&#xff1a; 内容&#xff1a; #知识点&#xff1a; 1、审计漏洞-SQL 数据库注入挖掘 1、审计思路-正则搜索&功能追踪&辅助工具 3、审计类型-常规架构&MVC 架构&三方框架 #章…

1.14 互斥与同步

1.思维导图 2.有一个隧道&#xff0c;长1000m&#xff0c;有一辆高铁&#xff0c;每秒100米&#xff1b;有一辆快车&#xff0c;每秒50米&#xff1b;要求模拟这两列火车通过隧道的场景。 1>程序代码&#xff1a; #include <stdio.h> #include <string.h> #i…

研华 PCI-1751 驱动更新导LabVIEW致程序异常

问题描述&#xff1a; 某 LabVIEW 程序长期运行正常&#xff0c;但在使用研华 PCI-1751 数据采集卡运行一段时间后&#xff0c;程序开始出现不正常的行为。具体过程如下&#xff1a; 初始问题&#xff1a; 更换新的 PCI-1751 板卡后&#xff0c;驱动程序被更新&#xff0c;但程…

基于微信小程序的游泳馆管理系统设计与实现(LW+源码+讲解)

专注于大学生项目实战开发,讲解,毕业答疑辅导&#xff0c;欢迎高校老师/同行前辈交流合作✌。 技术范围&#xff1a;SpringBoot、Vue、SSM、HLMT、小程序、Jsp、PHP、Nodejs、Python、爬虫、数据可视化、安卓app、大数据、物联网、机器学习等设计与开发。 主要内容&#xff1a;…

LabVIEW智能水肥一体灌溉控制系统

本文详细介绍了一种基于LabVIEW的智能水肥一体灌溉控制系统的设计与实现。该系统采用模糊控制策略&#xff0c;能够自动调节土壤湿度和肥液浓度&#xff0c;满足不同作物在不同生长阶段的需求&#xff0c;有效提高水肥利用效率&#xff0c;对现代精准农业具有重要的实践和推广价…

ChordCraft荣获重要认可:推动全球音乐教育的数字化革新

2024年12月21日,洛杉矶尔湾市——在今年的文化艺术交流会上,聚集了来自各地的艺术家及社区领袖,共同探讨艺术如何促进全球文化的多样性和教育的普及。 张庭玮(Ting-Wei Chang)女士,University of North Texas音乐艺术博士,是一位享誉国际的单簧管演奏家和音乐教育者。她不仅在…

Public Key Retrieval is not allowed 解决方法

如图&#xff1a;我的报错是Public Key Retrieval is not allowed&#xff0c;我的前后端都能正常加载&#xff0c;但是在请求数据库时就会报错如下&#xff1a; 解决办法&#xff1a; 在 application.yaml 中的数据库设置地方加上allowPublicKeyRetrievaltrue&#xff0c;然后…

unity学习17:unity里的旋转学习,欧拉角,四元数等

目录 1 三维空间里的旋转与欧拉角&#xff0c;四元数 1.1 欧拉角比较符合直观 1.2 四元数 1.3 下面是欧拉角和四元数的一些参考文章 2 关于旋转的这些知识点 2.1 使用euler欧拉角旋转 2.2 使用quaternion四元数,w,x,y,z 2.3 使用quaternion四元数,类 Vector3.zero 这种…

从 Conda 到 Pip-tools:Python 依赖管理全景探索20250113

从 Conda 到 Pip-tools&#xff1a;Python 依赖管理全景探索 引言 在 Python 开发中&#xff0c;依赖管理是一个"常见但复杂"的问题&#xff1a;一次简单的版本冲突可能让团队调试数小时&#xff1b;一次不受控的依赖升级可能让生产环境瘫痪。随着项目规模的增加和…

【容器逃逸实践】挂载/dev方法

0、前置知识 怎么在容器里面执行命令&#xff0c; 有几种方法 # 不进入容器&#xff0c;创建并启动一个新的容器 $ docker run -itd --name ubuntu-test ubuntu /bin/bash # 进入容器&#xff0c;创建并启动一个新的容器 $ docker run -itd --name ubuntu-test ubuntu /bin…