Python 学习整理2

PHPer 2025-08-23 6 0 0

这里做下记录 20250823 06:50...

立即注册

更新于:2025-08-26 09:19:35
    您需要登录后才可以评论。 立即注册

    fastapi-speaker-extractor whisperx 项目报错 ValueError: The chosen align_model

    pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu126

    确保您的torch版本至少为2.6。

    ValueError: The chosen align_model "jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn" could not be found in huggingface (https://huggingface.co/models Models - Hugging Face Models - Hugging Face ) or torchaudio

    参考网站https://pytorch.org/get-started/locally/

    Traceback (most recent call last):
      File "D:\python\fastapi-speaker-extractor\app\api\endpoints.py", line 15, in extract_speaker
        result = await process_audio(audio_file.file, config_value)
      File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 32, in process_audio
        model_a, metadata = whisperx.load_align_model(language_code=result["language"], device=device)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\whisperx\__init__.py", line 11, in load_align_model
        return alignment.load_align_model(*args, **kwargs)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\whisperx\alignment.py", line 102, in load_align_model
        raise ValueError(f'The chosen align_model "{model_name}" could not be found in huggingface (https://huggingface.co/models  ) or torchaudio (https://pytorch.org/audio/stable/pipelines.html#id14  )')
    ValueError: The chosen align_model "jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn" could not be found in huggingface (https://huggingface.co/models  ) or torchaudio (https://pytorch.org/audio/stable/pipelines.html#id14  )
    INFO:     127.0.0.1:2832 - "POST /api/speaker/extract/?config_value=default HTTP/1.1" 500 Internal Server Error
    WARNING:  StatReload detected changes in 'app\services\audio_processor.py'. Reloading... 报错

    从错误信息来看,您遇到了两个主要问题:

    1. torch版本问题:由于torch.load存在一个严重的漏洞,您需要将torch升级到至少v2.6版本才能正常使用该函数。这个问题可以通过升级torch来解决。
    2. 模型加载问题:您尝试加载的模型jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn在Hugging Face模型库或torchaudio中找不到。这可能是因为模型名称错误,或者该模型确实不存在于这些库中。

    解决步骤:

    1. 升级torch版本

    您可以通过以下命令升级torch:...

    立即注册
    更新于:2025-08-23 07:03:19

    python报错 UnicodeEncodeError: 'gbk' codec can't encode character '\u2705'...

    --- Logging error ---
    Traceback (most recent call last):
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\logging\__init__.py", line 1086, in emit
        stream.write(msg + self.terminator)
    UnicodeEncodeError: 'gbk' codec can't encode character '\u2705' in position 42: illegal multibyte sequence
    Call stack:
      File "<string>", line 1, in <module>
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\multiprocessing\spawn.py", line 116, in spawn_main
        exitcode = _main(fd, parent_sentinel)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\multiprocessing\spawn.py", line 129, in _main
        return self._bootstrap(parent_sentinel)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\multiprocessing\process.py", line 315, in _bootstrap
        self.run()
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\multiprocessing\process.py", line 108, in run
        self._target(*self._args, **self._kwargs)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\uvicorn\_subprocess.py", line 76, in subprocess_started
        target(sockets=sockets)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\uvicorn\server.py", line 61, in run
        return asyncio.run(self.serve(sockets=sockets))
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\asyncio\runners.py", line 44, in run
        return loop.run_until_complete(main)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\asyncio\base_events.py", line 634, in run_until_complete
        self.run_forever()
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\asyncio\base_events.py", line 601, in run_forever
        self._run_once()
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\asyncio\base_events.py", line 1905, in _run_once
        handle._run()
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\asyncio\events.py", line 80, in _run
        self._context.run(self._callback, *self._args)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\uvicorn\server.py", line 68, in serve
        config.load()
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\uvicorn\config.py", line 467, in load
        self.loaded_app = import_from_string(self.app)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\uvicorn\importer.py", line 21, in import_from_string
        module = importlib.import_module(module_str)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "D:\python\fastapi-speaker-extractor\app\main.py", line 39, in <module>
        logger.info("✅ WhisperX 模型加载成功!")
    Message: '✅ WhisperX 模型加载成功!'
    Arguments: ()    --- Logging error --- 后面这些是什么,是那里错误了吗
    

    从报错信息来看,主要是日志输出时碰到了编码问题(UnicodeEncodeError: 'gbk' codec can't encode character '\u2705'...),再加上后面还有一些版本不兼容的提示。下面分点解释原因和解决办法:

    1. 最直接的错误:日志编码不兼容(GBK → UTF-8)

    Python 的logging模块默认会用系统的编码(Windows 下常是'gbk')往控制台写日志。而你的代码里用了 Unicode 字符(比如✅这个 emoji 或特殊符号),gbk编码不认识这种字符,就会抛出UnicodeEncodeError。

    解决思路:

    让 Python 日志用 UTF-8 编码输出,而不是系统默认的 GBK。

    做法有很多种,比较常见的是在程序开头(或配置日志的地方)加上下面这样的代码,强制让标准输出的编码变成 UTF-8:

    我的logging是自定义的:在项目根目录下的logger.py  内容是 import logging
    import os
    class CustomLogger:
        def __init__(self, name, log_file, level=logging.INFO):
            self.logger = logging.getLogger(name)
            self.logger.setLevel(level)
            # 创建一个文件处理器,写入日志文件
            file_handler = logging.FileHandler(log_file)
            file_handler.setLevel(level)
            # 创建一个控制台处理器,输出到控制台
            console_handler = logging.StreamHandler()
            console_handler.setLevel(level)
            # 定义日志格式
            formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
            file_handler.setFormatter(formatter)
            console_handler.setFormatter(formatter)
            # 将处理器添加到 Logger 对象
            self.logger.addHandler(file_handler)
            self.logger.addHandler(console_handler)
        def get_logger(self):
            return self.logger  。要怎么改 “让 Python 日志用 UTF-8 编码输出,而不是系统默认的 GBK。”

    你的CustomLogger类是自定义的日志封装,它内部使用了 Python 标准库的logging模块,并分别添加了一个文件处理器(FileHandler)和一个控制台处理器(StreamHandler)。...

    立即注册
    更新于:2025-08-23 08:00:06

    python whisperx 报错 in load_align_model raise ValueError(f'The chosen align_model "{model_name}"

    raise ValueError(f'The chosen align_model "{model_name}" could not be found in huggingface (https://huggingface.co/models) or torchaudio (https://pytorch.org/audio/stable/pipelines.html#id14)')

    ValueError: The chosen align_model "jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn" could not be found in huggingface (https://huggingface.co/models) or torchaudio (https://pytorch.org/audio/stable/pipelines.html#id14)

    requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn/tree/main/additional_chat_templates?recursive=False&expand=False (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))"), '(Request ID: ee57b154-cd73-4a1a-911a-a89c496c8b20)')
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "D:\python\fastapi-speaker-extractor\app\api\endpoints.py", line 25, in extract_speaker
        result = await process_audio(audio_file.file, config_value, whisper_model, device)
      File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 25, in process_audio
        model_a, metadata = whisperx.load_align_model(language_code="zh", device=device)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\whisperx\__init__.py", line 11, in load_align_model
        return alignment.load_align_model(*args, **kwargs)
      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\whisperx\alignment.py", line 102, in load_align_model
        raise ValueError(f'The chosen align_model "{model_name}" could not be found in huggingface (https://huggingface.co/models) or torchaudio (https://pytorch.org/audio/stable/pipelines.html#id14)')
    ValueError: The chosen align_model "jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn" could not be found in huggingface (https://huggingface.co/models) or torchaudio (https://pytorch.org/audio/stable/pipelines.html#id14)
    INFO:     127.0.0.1:1141 - "POST /api/speaker/extract/?config_value=default HTTP/1.1" 500 Internal Server Error
    
    

    由于网络原因,会访问hugging face官网,但是网络无法访问,所有报错。...

    立即注册
    更新于:2025-08-23 08:12:41

    pyannote/embedding 模型是真难引入模型

    pyannote/embedding 模型是真难引入模型,花了4小时,最后用替代方案deepghs/pyannote-embedding-onnx 20250823 1903...

    立即注册
    更新于:2025-08-23 19:03:48

    Trae 或者是我自己 莫名奇妙创建了个文件,影响了项目代码的运行。

    莫名奇妙创建了个文件,影响了项目代码的运行。

    D:\python\fastapi-speaker-extractor\absolute\path\to\your

    还有这种事情

    # 确保正确设置了环境变量
    import os
    os.environ["HF_ENDPOINT"] = "https://huggingface.co"  # 使用官方端点
    os.environ["HUGGINGFACE_TOKEN"] = "your_token_here"
    
    # 然后加载模型(如项目中已实现的)
    from pyannote.audio import Model
    model = Model.from_pretrained("pyannote/embedding", use_auth_token=os.getenv("HUGGINGFACE_TOKEN"))
    
    # 1. 确保您的token有该模型的访问权限
    # 2. 尝试直接从Hugging Face加载模型
    from speechbrain.pretrained import SpeakerRecognition
    
    # 初始化模型
    verification = SpeakerRecognition.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb")
    
    # 使用模型进行声纹识别
    score, prediction = verification.verify_files("/path/to/speaker1.wav", "/path/to/speaker2.wav")

    20250823...

    立即注册
    更新于:2025-08-23 21:29:07

    WhisperX 无法加载模型

    WhisperX 无法加载模型

      File "G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\huggingface_hub\_snapshot_download.py", line 230, in snapshot_download
        raise LocalEntryNotFoundError(
    huggingface_hub.errors.LocalEntryNotFoundError: Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "D:\python\fastapi-speaker-extractor\app\main.py", line 82, in <module>
        raise RuntimeError(f"WhisperX 无法加载模型,请检查安装和环境。{e}")
    RuntimeError: WhisperX 无法加载模型,请检查安装和环境。Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups 
    and downloads online, pass 'local_files_only=False' as input.
    (speaker-extractor) PS D:\python\fastapi-speaker-extractor> 

    20250823 23:44...

    立即注册
    更新于:2025-08-23 23:45:06

    HUGGINGFACE_HUB_CACHE 设置错误导致的问题

    真的吐了,Trae和腾讯元宝都找不出原因。报错只是只是显示401没有权限访问hf-mirror.com等等

    或者是Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.

    代码加载模型一直报错

    import whisperx
    device = "cuda"  # 或者 "cpu"
    model_whisper = whisperx.load_model("base", device=device, compute_type="float32")
    
    RuntimeError: 无法加载 WhisperX 模型,请检查安装和环境。Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.
    

    返回的错误一直就是下面这类的。

    不能直连HF官网后,本地加载模型一直失败,直接花了我6个小时以上,最后无意中发现项目的根目录多出来两个文件夹,一个是$HUGGINGFACE_HOME,另一个是.cache。删除后,正常了。 ...

    立即注册
    更新于:2025-08-24 03:35:26

    Trae的bug太多了,怪不得免费

    Trae修改文件后,你点应用,有时会到错误的路径,就像这样。

    c330c7fdb3-qq20250824-051125_normal.png

    be30bc56be-qq20250824-051401_normal.png ...

    立即注册
    更新于:2025-08-24 05:25:13

    通义之旅

    大概对话了4个小时,之后我休息了几小时,然后再对话2小时左右。提示“看起来我们今天已经有了很多的对话,我很感谢你的热情,但我现在需要稍微休息一下。抱歉要中断我们的对话了,期待明天和你继续聊天。” 20250824 16:29

    Nice,体验很好


    主要修改:

    移除了对 process_audio 和 speech_to_text 的导入:因为这些是异步函数,不适合在模块初始化时导入

    修复了导入语句:使用正确的函数名 get_embedding_middleware 而不是 get_embedding_model_middleware

    这些修改应该能解决您遇到的 AttributeError: 'EmbeddingModelMiddleware' object has no attribute 'register_model' 错误。


    nice ,厉害!你的python编程在什么水平上


    谢谢您的夸奖!关于我的Python编程水平,我可以说我具备以下能力:

    ## 我的Python编程能力

    ### 1. **基础知识**

    - 熟练掌握Python语法、数据结构、面向对象编程

    - 理解Python的高级特性如装饰器、生成器、上下文管理器等

    - 熟悉Python标准库的常用模块

    ### 2. **框架和库**

    - 熟悉主流框架如FastAPI、Django、Flask

    - 熟悉数据科学库如NumPy、Pandas、Matplotlib

    - 熟悉机器学习库如Scikit-learn、TensorFlow、PyTorch

    - 熟悉异步编程如asyncio、aiohttp等

    ### 3. **项目架构**

    - 能够设计和分析项目结构

    - 理解模块化和包管理

    - 熟悉配置管理、日志记录、错误处理等最佳实践

    ### 4. **问题解决能力**

    - 能够快速定位和修复语法错误、逻辑错误

    - 熟悉常见的异常处理模式

    - 能够优化代码性能和可读性

    ### 5. **调试和测试**

    - 理解单元测试和集成测试

    - 能够分析错误日志和堆栈跟踪

    - 熟悉调试技巧和工具

    ## 关于您的项目

    对于您这个说话人提取项目,我能帮助:

    - 修复代码中的语法和逻辑错误

    - 优化项目结构和模块组织

    - 改进错误处理和日志记录

    - 协助配置管理和环境设置

    不过我也需要说明,虽然我可以帮助解决具体的编程问题,但实际的项目开发还需要您结合具体需求和业务场景来完成。

    您对我的帮助还满意吗?有什么其他问题我可以帮您解决的吗?


    20250824 07:29


    {
      "message": "音频处理完成",
      "config": "default",
      "speakers_detected": 5,
      "segments": [
        {
          "speaker": "SPEAKER_01",
          "start": 0.03096875,
          "end": 0.45284375,
          "duration": 0.421875
        },
        {
          "speaker": "SPEAKER_01",
          "start": 0.52034375,
          "end": 0.57096875,
          "duration": 0.05062500000000003
        },
        {
          "speaker": "SPEAKER_01",
          "start": 0.8915937500000001,
          "end": 1.3303437500000002,
          "duration": 0.4387500000000001
        },
        {
          "speaker": "SPEAKER_01",
          "start": 2.07284375,
          "end": 2.34284375,
          "duration": 0.27
        },
        {
          "speaker": "SPEAKER_01",
          "start": 2.3934687500000003,
          "end": 3.96284375,
          "duration": 1.569375
        },
        {
          "speaker": "SPEAKER_01",
          "start": 4.3678437500000005,
          "end": 4.48596875,
          "duration": 0.11812499999999915
        },
        {
          "speaker": "SPEAKER_01",
          "start": 4.705343750000001,
          "end": 5.498468750000001,
          "duration": 0.7931249999999999
        },
        {
          "speaker": "SPEAKER_01",
          "start": 7.995968750000001,
          "end": 8.83971875,
          "duration": 0.8437499999999982
        },
        {
          "speaker": "SPEAKER_00",
          "start": 0.45284375,
          "end": 0.52034375,
          "duration": 0.0675
        },
        {
          "speaker": "SPEAKER_00",
          "start": 2.34284375,
          "end": 4.3678437500000005,
          "duration": 2.0250000000000004
        },
        {
          "speaker": "SPEAKER_00",
          "start": 4.48596875,
          "end": 15.977843750000002,
          "duration": 11.491875000000002
        },
        {
          "speaker": "SPEAKER_03",
          "start": 11.084093750000001,
          "end": 11.10096875,
          "duration": 0.016874999999998863
        },
        {
          "speaker": "SPEAKER_02",
          "start": 11.10096875,
          "end": 11.539718750000002,
          "duration": 0.4387500000000024
        },
        {
          "speaker": "SPEAKER_04",
          "start": 13.699718750000002,
          "end": 15.89346875,
          "duration": 2.193749999999998
        }
      ],
      "transcription": null,
      "speaker_embeddings": {
        "SPEAKER_01": {
          "embedding": [
            0.777779651038922,
            0.5709335537169954,
            0.6502486116435126,
            0.3957192536483889,
            0.33682669277721655,
            0.23532944585103743,
            0.6691889760189264,
            0.9155553454428661,
            0.7187591570003378,
            0.041015835486950425,
            0.9263556706063688,
            0.9842760376769557,
            0.22299650694226747,
            0.6596784585051534,
            0.011977841110457521,
            0.08662964921239547,
            0.8590584076965014,
            0.9432451225732621,
            0.6991147433624788,
            0.7139162862961621,
            0.5138930476423023,
            0.6855240422600192,
            0.502549022830554,
            0.6600743053925334,
            0.5426503430063094,
            0.1239807100111322,
            0.08679667407081859,
            0.5376124635974292,
            0.9392836496761979,
            0.9551275237630077,
            0.7924282298155979,
            0.08996393174594652,
            0.13782183209168775,
            0.1213631348250721,
            0.09105054102061871,
            0.04406703577941673,
            0.13633818037587264,
            0.6560012705736046,
            0.43154468999459694,
            0.1341306576815524,
            0.2522093817108825,
            0.5981025696288607,
            0.5439023738973278,
            0.0977244414354057,
            0.34079172313515116,
            0.4727704874300571,
            0.6755335931752694,
            0.9874570053685833,
            0.3958535812694416,
            0.4601717554277547,
            0.1345165091859647,
            0.04229278163025396,
            0.6884999125928399,
            0.18031702315116427,
            0.06721756638106124,
            0.2992986843307661,
            0.48966930193253344,
            0.45181238374732224,
            0.3412122446670175,
            0.3019318545039603,
            0.8479683187557411,
            0.5799770354299979,
            0.982828328529503,
            0.6442376677026354,
            0.5601013798227293,
            0.750478519504632,
            0.17841533788109543,
            0.30053144445211577,
            0.8193975097229126,
            0.5421159710358453,
            0.5038376919731312,
            0.448200897331156,
            0.19442355362060382,
            0.9184214418016234,
            0.1931506270614728,
            0.8939789482907609,
            0.8564062205365838,
            0.679789489707233,
            0.5485430485093375,
            0.20997726100126068,
            0.3848678632520711,
            0.05873836099031804,
            0.5710507319693923,
            0.9590513638949537,
            0.4587789272727131,
            0.3907441464588006,
            0.08933674274777814,
            0.26818073432223255,
            0.07033311464354441,
            0.5981984091965694,
            0.4411024100088601,
            0.2507536523567112,
            0.4854477517062644,
            0.11291549603316209,
            0.5034760271495292,
            0.525427385288952,
            0.4375848908556259,
            0.6352308210957383,
            0.086378647421404,
            0.41688748885997484,
            0.4361651220775614,
            0.360855330072557,
            0.7962444602135459,
            0.7569351541726294,
            0.09351747713015912,
            0.5045546070146725,
            0.03802194558837091,
            0.07972175132601611,
            0.06961428456480312,
            0.8885234138753977,
            0.6277925558689985,
            0.4478902222257837,
            0.35478262120641935,
            0.7824658951263368,
            0.03667066946561326,
            0.19560241700590209,
            0.6320662642979136,
            0.6843799221692117,
            0.9157849958266908,
            0.9080372348987775,
            0.5015866191928954,
            0.497578160097209,
            0.21593198358044985,
            0.7358895009828056,
            0.9944958274195973,
            0.20137074383436615,
            0.9525882282332135,
            0.42935231147833275,
            0.29521609708890595,
            0.7353420772627942,
            0.2897450435983565,
            0.9647720662650869,
            0.6158085982358013,
            0.6853005591865147,
            0.9475438494128763,
            0.6706676659186701,
            0.15317343641167358,
            0.7768962391286001,
            0.23683744107645055,
            0.2040563278386175,
            0.7185875308920915,
            0.45122103654481505,
            0.8264415684866033,
            0.12668257128335925,
            0.7079187730961614,
            0.2751943143766197,
            0.3827429286606362,
            0.24135190061120404,
            0.5458346270734151,
            0.37474468625853496,
            0.8650457977854594,
            0.6449463915423657,
            0.1496680631297117,
            0.45153452134754535,
            0.41615633582025746,
            0.6013534399540869,
            0.38310675965457297,
            0.5889717498473717,
            0.021062402840886008,
            0.5827578904425793,
            0.15088172295511693,
            0.8072489399458777,
            0.5653289480542877,
            0.7025307377760507,
            0.17133616585432465,
            0.5664669670428305,
            0.5783610156962078,
            0.14688967983057766,
            0.7907302737520348,
            0.8975083698023189,
            0.45439470000537807,
            0.14996576304563924,
            0.12069464713830103,
            0.6804418847145536,
            0.10649558471372034,
            0.05877312048437955,
            0.31718022507406596,
            0.9212596491669748,
            0.9748746935692556,
            0.021913051098540692,
            0.4609712420877251,
            0.7218266279246887,
            0.8730827582253732,
            0.04339323222700853,
            0.22044783977528237,
            0.3141430187771046,
            0.5465760096537191,
            0.38851072840805345,
            0.17191115256433787,
            0.21458061726624833,
            0.2305270881770144,
            0.27390081618086626,
            0.8142751615622157,
            0.3326352058815675,
            0.30007370828904256,
            0.08016803223310331,
            0.4476978923164573,
            0.15493657244069237,
            0.7798055205640959,
            0.5110697919281231,
            0.8209299319897684,
            0.7423800722960445,
            0.06489799300698129,
            0.7910078289766419,
            0.7918904577195852,
            0.8256784154169723,
            0.4524101976617454,
            0.988459807336977,
            0.7447523375049755,
            0.812442749553774,
            0.6974501096543406,
            0.1243707262249738,
            0.7720653820164257,
            0.7289500402606474,
            0.8547163416889588,
            0.09396411735347265,
            0.20455710233960145,
            0.620310138400527,
            0.8544860757281896,
            0.4964116800523849,
            0.9492493074164444,
            0.36008955858685465,
            0.742062304993595,
            0.7029850192964762,
            0.1929031656443625,
            0.8882161750112234,
            0.22461326488111422,
            0.1804839877587604,
            0.8283687648879925,
            0.7913686088585236,
            0.9207856175827153,
            0.9909042259594141,
            0.6583441010119987,
            0.8416889433642138,
            0.895993208812677,
            0.15676129048850918,
            0.019544631167190407,
            0.8912087623912354,
            0.41738641458882986,
            0.6895937449769161,
            0.3427578373169906,
            0.10723947827898728,
            0.37145815554044037,
            0.03363719833342327,
            0.9066696027058663,
            0.08205551219081031,
            0.08747295858038207,
            0.5265462564884933,
            0.32468853300789735,
            0.555060931327795,
            0.6688669326811171,
            0.12773421488969705,
            0.28279708907399126,
            0.6826034806447154,
            0.4178251368053921,
            0.34197159584254333,
            0.11165641216878286,
            0.321342817119623,
            0.23334651159520758,
            0.11924487223843006,
            0.5147025381780037,
            0.8389761275747275,
            0.9091664602935572,
            0.8088630132880362,
            0.2607386869603555,
            0.5999410190988087,
            0.28819851434906585,
            0.04835630359912679,
            0.16529934980286642,
            0.0283211742928825,
            0.1522700578023305,
            0.8017899115397439,
            0.5816539149431361,
            0.8766284195502531,
            0.36607109690603545,
            0.39133710316318604,
            0.5658621286068686,
            0.553863254057803,
            0.41149579292896055,
            0.8977800059833045,
            0.5282180875703348,
            0.5978462922083229,
            0.9243869938232245,
            0.9809912743248483,
            0.04464495824754944,
            0.6918201060281808,
            0.9539941439921931,
            0.598314374361743,
            0.7049634779983667,
            0.02967334422819201,
            0.9034675107453064,
            0.3824381966841687,
            0.7125636247785088,
            0.46032653582460226,
            0.6823756272948115,
            0.7291560137284867,
            0.57054662245767,
            0.6309233995324682,
            0.7940836743409977,
            0.4733584850334376,
            0.960228553092802,
            0.033264180994415415,
            0.16814821672040325,
            0.736037962743123,
            0.9586738942553996,
            0.893173335415169,
            0.5109786875054482,
            0.5549151808487973,
            0.21802841393578032,
            0.23501789526079042,
            0.3791673776712803,
            0.15938851572391344,
            0.35376449239632646,
            0.21968698647366824,
            0.8644231144946367,
            0.9270738631086481,
            0.6956917041872457,
            0.726619828394731,
            0.08460227948988652,
            0.9950944637125941,
            0.8931217911172211,
            0.9232025986508297,
            0.3980462848535681,
            0.8434192248453172,
            0.6210101014206424,
            0.2447119233625481,
            0.4728149708296845,
            0.9969833654357756,
            0.022097029428213677,
            0.6798154194066497,
            0.11316055178496498,
            0.49340319828418444,
            0.12653378444631747,
            0.9489053502084343,
            0.22118956202630968,
            0.24651018702562377,
            0.8609073082703036,
            0.57469873722498,
            0.9732365052430514,
            0.11157582445365954,
            0.9948488181432913,
            0.7750075816903491,
            0.6824869210183347,
            0.9706746344334413,
            0.8506416906468435,
            0.6473594056140869,
            0.08184697310946965,
            0.7174379148441202,
            0.2481925166245491,
            0.29448746765994793,
            0.5459280048231541,
            0.47602968071348795,
            0.9067203128317199,
            0.34257128653483093,
            0.8424911276362116,
            0.45065943491991345,
            0.3825418759346103,
            0.3011441084119385,
            0.7642300939193627,
            0.9387064133107097,
            0.26191207252113125,
            0.7220480451028579,
            0.3945400873391146,
            0.2814759956912324,
            0.3822764281628237,
            0.3324107674277045,
            0.6993260693676701,
            0.6870304009150965,
            0.8199722194167125,
            0.7831465219671321,
            0.8403136445565487,
            0.09866054540315206,
            0.6750132664533021,
            0.8657229507404858,
            0.692515775682393,
            0.7084102694711505,
            0.7169617771890912,
            0.39235021276499193,
            0.6903032332255705,
            0.2478800502627574,
            0.9473537490719353,
            0.7350254248795574,
            0.5768469902295779,
            0.8597779615375594,
            0.8990228231975581,
            0.8501882924142806,
            0.5020836162521721,
            0.3126972501723233,
            0.2857434014928203,
            0.45354164133144037,
            0.2271603917993733,
            0.5963812706403308,
            0.8605546076785234,
            0.2936311092815861,
            0.08552505365972296,
            0.18780913983720382,
            0.34126678216679596,
            0.9985202975337131,
            0.8017715377445582,
            0.0455698780699515,
            0.07001909476063806,
            0.4665253957940204,
            0.8093221951222709,
            0.5358520375887698,
            0.8273549967537387,
            0.6607114802365484,
            0.831747865402305,
            0.24218677476292327,
            0.2414979470983326,
            0.8628670065009877,
            0.08239544073571858,
            0.0034127007254199926,
            0.45338766762512095,
            0.781778674841391,
            0.3323679746811753,
            0.8322148564422156,
            0.6192291794895527,
            0.11557079954460847,
            0.351072521557656,
            0.39968089118429595,
            0.4318197373435919,
            0.32983179572587285,
            0.9130839532347397,
            0.3273734625749525,
            0.03944326217729044,
            0.7065110969928768,
            0.2360542022378156,
            0.2683174059266562,
            0.8117443767403388,
            0.6798629464495395,
            0.17049114604314852,
            0.2835947961549269,
            0.5629308723771778,
            0.23347413323279398,
            0.9529257396857971,
            0.666278700286948,
            0.9194575129816979,
            0.6251632588991757,
            0.566519180101875,
            0.2899959800462003,
            0.5240769084572787,
            0.7484874083065672,
            0.40395947920773423,
            0.6184481548822448,
            0.028634923128107226,
            0.5949219089791237,
            0.770302635405962,
            0.5851711852252468,
            0.5618693736367424,
            0.6742801452158564,
            0.1903057095990014,
            0.7484806062774504,
            0.08368846158790078,
            0.09019272108988141,
            0.6146362018157282,
            0.5694565001223136,
            0.7256902884757009,
            0.5506477948157542,
            0.8836104324990773,
            0.09572716072450826,
            0.7817739728435418,
            0.9944000399864048,
            0.7630955943997495,
            0.22449342981947473,
            0.964161341721483,
            0.779002477876206,
            0.7960531969799906,
            0.9307660331236423,
            0.48247816566216406,
            0.3905326427204988,
            0.6406367160732447,
            0.9042863697856872,
            0.09394422908248745,
            0.09106916108856877,
            0.32091770392173313,
            0.8778604432104994,
            0.25728533441054335,
            0.3289323350890395,
            0.5307732956740371,
            0.7714075046725684,
            0.9712754724458056,
            0.9363139358611828,
            0.29857690662282044,
            0.5558936888540338,
            0.04367368212775835,
            0.4735177370197753,
            0.3487941018314721,
            0.7557615469394956,
            0.7026309652761147,
            0.8761131538782503,
            0.758510751914601,
            0.46128134013383304,
            0.569136214426595,
            0.45278626485055806,
            0.48190775882140013,
            0.8597273559723679,
            0.1941231710668615,
            0.37909237308726584,
            0.559006862688822,
            0.02432400888128483,
            0.030242692015054695,
            0.8783865104355176,
            0.977036651768512,
            0.6146334601899077,
            0.7325962151434082,
            0.8951265824822033,
            0.25208772950546066,
            0.46377236336420125,
            0.4125381482030229,
            0.6257863258176941,
            0.8648165753259821,
            0.3103089777884924
          ],
          "segment_count": 8
        },
        "SPEAKER_00": {
          "embedding": [
            0.08508555365646464,
            0.3136976108669114,
            0.6722975811189806,
            0.4330311712048641,
            0.2528376930431464,
            0.42502566500882943,
            0.9742534163004493,
            0.8145815922226697,
            0.5460330219701569,
            0.6632350322144313,
            0.9098850897480485,
            0.10485582901012824,
            0.26620254723474834,
            0.15011879273599305,
            0.10925831047511181,
            0.14351088162147718,
            0.5442526217150648,
            0.8729539646025699,
            0.2789295114336743,
            0.10021151700651154,
            0.24004010517052443,
            0.6531147740750634,
            0.416160843063171,
            0.760846410619256,
            0.40062798205262706,
            0.6007725081964629,
            0.17719570362858095,
            0.512528351098693,
            0.6777481348131166,
            0.04999704999052501,
            0.13984893958535882,
            0.06853322607449408,
            0.7333060631426506,
            0.3830433901454189,
            0.2858059541651834,
            0.3390411712325839,
            0.07813496796505348,
            0.3855271099995946,
            0.8087401027395982,
            0.15974493185415484,
            0.6579147896572494,
            0.8074226846179904,
            0.6004546578886873,
            0.1505599095795801,
            0.801259784748063,
            0.9837237543711442,
            0.9647578358177187,
            0.27641669423933757,
            0.35350207915691645,
            0.7921891809770998,
            0.9803536392779462,
            0.093494501849682,
            0.31876679199009417,
            0.03432083157374055,
            0.4853745833949751,
            0.6245621984160419,
            0.26451080301461405,
            0.5755329160667354,
            0.7633157389952122,
            0.8912298525680445,
            0.43354123350557816,
            0.7609413807923769,
            0.0921223756326065,
            0.6459713880273883,
            0.17504248029745362,
            0.41251989061335226,
            0.12686922239841414,
            0.28937408720941404,
            0.5662847679416333,
            0.0016332327993338058,
            0.3096151565619526,
            0.5827058640056105,
            0.5774370447089704,
            0.8525990598154713,
            0.03447309948761401,
            0.18269030164923517,
            0.34256675203240317,
            0.8008517438123373,
            0.22526624660365813,
            0.8439913987383544,
            0.14035008955796735,
            0.6483541604555322,
            0.42066880970897214,
            0.5750517106724148,
            0.920918826239489,
            0.8172703126246788,
            0.07298927429434565,
            0.7657473960243679,
            0.520903629881517,
            0.7067793339918472,
            0.9914778837110703,
            0.6123975873337665,
            0.3982288250886692,
            0.26921379471695017,
            0.06684203136995004,
            0.49745233550648293,
            0.26443327961326535,
            0.615755926952278,
            0.1765477534184685,
            0.07686686503972973,
            0.261524398294245,
            0.83447789978834,
            0.09806072452633019,
            0.6204576444481869,
            0.2773867269711394,
            0.7004436565607997,
            0.9761296509466689,
            0.29855401428465855,
            0.9434658213026239,
            0.955644983411661,
            0.9184186653656319,
            0.6527939914317451,
            0.8960181190920148,
            0.1620669274793407,
            0.3149583537902728,
            0.1417851784903651,
            0.047941148411805745,
            0.7173385874270628,
            0.37501659404896437,
            0.4539498299275575,
            0.8139526641652123,
            0.39106281749894933,
            0.25857621163567646,
            0.15024708663749164,
            0.1383023071629209,
            0.1380260088336902,
            0.8865094160360911,
            0.21721992389213873,
            0.10594539277709214,
            0.374798955955294,
            0.02032662414551878,
            0.932190359107007,
            0.8855140243286715,
            0.4369416766738623,
            0.20222902671667475,
            0.5997393123479271,
            0.8365994441664459,
            0.27168941500861354,
            0.07834641784493834,
            0.892339730471165,
            0.4974417362149417,
            0.5808686067378839,
            0.6637029692640515,
            0.5437986216149504,
            0.6458221553011293,
            0.6588020114850844,
            0.6180630079050616,
            0.6388548819717741,
            0.19750309916129694,
            0.5845120825154803,
            0.054863202188400684,
            0.40972544474221617,
            0.39750296899498905,
            0.6470595121200527,
            0.4655062924308937,
            0.9140152998800155,
            0.9471475055498688,
            0.7571856746808117,
            0.4288608195052859,
            0.606435477164203,
            0.7097122926333902,
            0.916343281381186,
            0.6325516230880399,
            0.888622461017708,
            0.7646117090563397,
            0.45701702150293055,
            0.09193739380235999,
            0.7385187571563885,
            0.14604940243628994,
            0.8203836603156114,
            0.36131081906461326,
            0.6675694830259388,
            0.6706666049094556,
            0.9882812273099121,
            0.6303767652060812,
            0.15942161551158207,
            0.4291937581050915,
            0.43015565725745397,
            0.24736080705108,
            0.08198912921086432,
            0.7249930427117014,
            0.38359363240865185,
            0.2626971525114118,
            0.7235714154488143,
            0.4348500777535881,
            0.619664933799324,
            0.23958013389121413,
            0.1423438199892475,
            0.7511002540663861,
            0.2215569891743837,
            0.8829879408513324,
            0.25396117140051944,
            0.05825246007937823,
            0.885307591398735,
            0.9827495254456535,
            0.007492860120589695,
            0.6042355096554165,
            0.15217161247114463,
            0.6288535286946877,
            0.7334261146009639,
            0.2846050211113351,
            0.22019296288183854,
            0.2872159972339182,
            0.6565139368683708,
            0.824924438816915,
            0.1814309444289478,
            0.16021873238061957,
            0.7264419662708554,
            0.4137844836171499,
            0.49499853363144375,
            0.5382818744143086,
            0.5714583760720785,
            0.6624724344638409,
            0.5835685221737039,
            0.4288745310831167,
            0.011199954459440664,
            0.22614020709497473,
            0.7455016367578716,
            0.2287832951623443,
            0.23637017488811563,
            0.1662241605781548,
            0.31061939158191176,
            0.42862536595234435,
            0.6058611245184561,
            0.251432092580158,
            0.43701914319545043,
            0.5351654892493816,
            0.2659026339927739,
            0.3013010871398234,
            0.9084257227303089,
            0.6725159901207128,
            0.21370360602863558,
            0.8886916825692946,
            0.7735196060337534,
            0.9272791730792647,
            0.43951251280012293,
            0.5954601647188571,
            0.300224154222941,
            0.46521176006186826,
            0.8394851660117031,
            0.6758129510310187,
            0.23326424722360528,
            0.3298220190225998,
            0.7730795826532988,
            0.3024203365625867,
            0.8620458549047867,
            0.5280522623525694,
            0.9647924797118174,
            0.7786923726237656,
            0.8228821706477517,
            0.28712740855076924,
            0.8245079029685681,
            0.0394097276535309,
            0.36750480067718927,
            0.42185443278471246,
            0.17429416143793508,
            0.31539238436782824,
            0.7113311251590432,
            0.22775617081136978,
            0.2797876092624205,
            0.5976301371106556,
            0.06978966171698786,
            0.36921249575716275,
            0.5794484303942175,
            0.3060507216985313,
            0.8960274252476708,
            0.72528733249642,
            0.9277125156147016,
            0.23288122287998492,
            0.3955125215641635,
            0.7978264876918022,
            0.7772066201898283,
            0.158070056030151,
            0.9046342836020529,
            0.9967889058613251,
            0.9317970961971042,
            0.9098435894753644,
            0.21310146751129544,
            0.5784950856592523,
            0.9336983343930756,
            0.12844237351118537,
            0.520183273583788,
            0.25441196905800256,
            0.5431543192137306,
            0.8439970878154661,
            0.6649546205527289,
            0.3755605660218053,
            0.2395049619767632,
            0.4825633180655583,
            0.9381283013920786,
            0.644892431554758,
            0.7125005456890641,
            0.6060634355496931,
            0.7664826777675224,
            0.917761726991163,
            0.22344054007724867,
            0.2744252263005449,
            0.7532501668997166,
            0.33382896854249267,
            0.39223501912165315,
            0.46211125654821317,
            0.7006640881246253,
            0.16800765296591624,
            0.9491436394046275,
            0.2044601862291684,
            0.7281812108295689,
            0.7813867599442655,
            0.24708905965895567,
            0.05640554188995417,
            0.4396953678867721,
            0.14447302463226486,
            0.7562270932393121,
            0.12137963220063208,
            0.15588610276609582,
            0.6224569774514072,
            0.7256736483344446,
            0.22302187864890122,
            0.3310173317121873,
            0.5007156038900807,
            0.07817152506366876,
            0.8528596815135313,
            0.18154147349378014,
            0.36080012823229934,
            0.8058136007630408,
            0.16235874209985124,
            0.46693496448576843,
            0.9415116444411148,
            0.05153872708489682,
            0.9472999297925163,
            0.8054356889807579,
            0.550315339710948,
            0.10863549189806321,
            0.6273027895927822,
            0.4369041212738066,
            0.020743020746123997,
            0.707969041053388,
            0.9990795016852569,
            0.379739099814948,
            0.01906890151917351,
            0.5908437035849005,
            0.49361661347465846,
            0.06571178219896412,
            0.664598428483484,
            0.7648117541317315,
            0.06612579215782421,
            0.9397736436714265,
            0.4197683610953221,
            0.4594189138370608,
            0.2938600292247251,
            0.6451197501653387,
            0.9167820675854164,
            0.038054759224493306,
            0.021807393157999178,
            0.6346083641993714,
            0.6883136715291619,
            0.27189535065190296,
            0.29527190838764117,
            0.908743615359161,
            0.26853205837844796,
            0.191316077545723,
            0.9716696208781184,
            0.157367509111478,
            0.9606911711088927,
            0.954233922461315,
            0.23412255130011772,
            0.3813271151263131,
            0.5873629974587247,
            0.6791509140748772,
            0.33677760019899383,
            0.9975140365938108,
            0.88340146770722,
            0.38816154716928375,
            0.24238301569166187,
            0.8410939715806457,
            0.9561807242509532,
            0.6519101407810329,
            0.8059565860960154,
            0.3211444581250146,
            0.035165148085131714,
            0.49574766251154967,
            0.9197758892489004,
            0.6172269572412872,
            0.319973217267146,
            0.06734412461901151,
            0.13147225348505287,
            0.6676144348236932,
            0.17791493299911565,
            0.48319786788660934,
            0.39280597140448725,
            0.9723400786963553,
            0.5680457110887972,
            0.45490845167673877,
            0.34312193443287275,
            0.09731730079334444,
            0.34470602518125415,
            0.800096773766606,
            0.21471123015684146,
            0.7678913604692901,
            0.6512339092720948,
            0.45642362615083276,
            0.9715425189721636,
            0.8806564155108315,
            0.7135072269081412,
            0.09692139825182877,
            0.04455570381650786,
            0.06923033470456275,
            0.16928522838594717,
            0.0501340892363501,
            0.6440855645765987,
            0.39113266432804994,
            0.24761243486051976,
            0.2959465344082416,
            0.9681559146928653,
            0.11595069836151972,
            0.4793742018485694,
            0.24180378582454742,
            0.09870028174269208,
            0.690543269161159,
            0.6635403114445604,
            0.07781647192575003,
            0.6178478884619383,
            0.037225566790203946,
            0.7678567865497061,
            0.025867706579404626,
            0.4556575154716612,
            0.3137780112906259,
            0.30712267991320596,
            0.7636071619642224,
            0.6611647671677396,
            0.12228970424761643,
            0.127395836575956,
            0.9145674130623136,
            0.3759508534416731,
            0.34807725096808917,
            0.8932661071273494,
            0.688249182824861,
            0.5450410049445521,
            0.2721743564324126,
            0.7743575474856892,
            0.481878344103011,
            0.6149312128417357,
            0.8052902952800289,
            0.9015275661109996,
            0.8795704386382086,
            0.04887931046387306,
            0.9723485696834588,
            0.23378018580423132,
            0.024386886515922357,
            0.1582388703222477,
            0.5992371777839081,
            0.22496223438358331,
            0.45433500655604964,
            0.4917427572639892,
            0.8361372489153236,
            0.703644944517281,
            0.4718312698854269,
            0.044890591132147106,
            0.46851482295909785,
            0.5001858687189599,
            0.021741378074226048,
            0.10139708436723183,
            0.19173656576792086,
            0.6399996493393576,
            0.13508676313763235,
            0.5260982750223708,
            0.19561557602327873,
            0.7665924401926438,
            0.687279296339233,
            0.9086018346248493,
            0.6484936493473733,
            0.07857461294636459,
            0.4366927947229525,
            0.17271708956867704,
            0.49630270158369927,
            0.2876949724888376,
            0.3198694681226033,
            0.9353456175367487,
            0.3824031674275936,
            0.46117851283791833,
            0.765164439331585,
            0.38891369542103393,
            0.5351467444160642,
            0.7219590183797743,
            0.9624483975608029,
            0.4524595175006104,
            0.09904876122098649,
            0.08534889743737051,
            0.6202887391934838,
            0.28603594450071634,
            0.582545958042535,
            0.23567272497186675,
            0.5057805160320105,
            0.9302018486859654,
            0.46330333035754667,
            0.7459735189847647,
            0.6192351798416488,
            0.24251426927483066,
            0.7240900245160065,
            0.8212070941502398,
            0.5861727609560101,
            0.6969767784914412,
            0.45758036131815916,
            0.04949126582121077,
            0.7069567141664763,
            0.01974635527878832,
            0.9617944510005401,
            0.5880012599770953,
            0.6948812973203555,
            0.14967780146130838,
            0.9803223503618442,
            0.32598582473001925,
            0.7429402525964367
          ],
          "segment_count": 3
        },
        "SPEAKER_03": {
          "embedding": [
            0.15937152060968085,
            0.9552448051833307,
            0.36749304969023655,
            0.9961787884473108,
            0.9389330763161424,
            0.9987243216862794,
            0.12634626329105247,
            0.757371016587627,
            0.1866099899391822,
            0.5870557989517033,
            0.4203354359646927,
            0.1232101070235051,
            0.7723571110282962,
            0.5973467573471534,
            0.5045154269739422,
            0.8130401201959736,
            0.4069519711717299,
            0.6908584625832975,
            0.08024465826430904,
            0.4034879800949519,
            0.9632524740402288,
            0.4014922150521413,
            0.3963972534090223,
            0.5733425930274739,
            0.19751760487701564,
            0.909108356284355,
            0.13759579961925517,
            0.9989105282016169,
            0.09359272329796098,
            0.6083995873270097,
            0.3993826682085432,
            0.4474621981040193,
            0.22059994298495766,
            0.29756029661656036,
            0.8667598494121659,
            0.3716052793207977,
            0.9762132789114173,
            0.8350456658640396,
            0.9718186157046185,
            0.3114877301424803,
            0.309787551961768,
            0.6545646496312353,
            0.9275727776534092,
            0.8199053757747232,
            0.48028683340887424,
            0.010654086314614397,
            0.5911456075185337,
            0.5381752820714456,
            0.5833810672845272,
            0.04694099442586386,
            0.23913218382818213,
            0.5097091591492395,
            0.7806173352521423,
            0.9071908120892266,
            0.9240904730402231,
            0.9171866897309018,
            0.8284997795481003,
            0.9124499181452957,
            0.5846864673609802,
            0.5836211163414651,
            0.39231739461911874,
            0.24690885797819595,
            0.25791138108197376,
            0.6232841671980645,
            0.7195462913472066,
            0.9509081019685632,
            0.37313122020789624,
            0.446508348547497,
            0.8311776810103837,
            0.814627849351736,
            0.788545558390207,
            0.9395286688366479,
            0.9068063867307952,
            0.32021220774257564,
            0.6067536270328047,
            0.8185474828993201,
            0.8023366201133293,
            0.12602323855037567,
            0.1828795195126316,
            0.7464364793940462,
            0.6053211257104096,
            0.8492602544787903,
            0.12334357389929262,
            0.415126865943646,
            0.9278835452747056,
            0.9349735835507036,
            0.3802832905915863,
            0.8971448039295247,
            0.9373103883876781,
            0.9300111067480353,
            0.5237263493504855,
            0.22653197606449815,
            0.7617387375548524,
            0.13282566619710356,
            0.38504961489587963,
            0.9451589686457743,
            0.07868482337127514,
            0.6248004051496131,
            0.6183402410940789,
            0.979940579246502,
            0.25790042669770796,
            0.18246518952269364,
            0.675556961238407,
            0.8953982446050822,
            0.3110337644433854,
            0.5157131159928994,
            0.9744473890024036,
            0.8508549821430265,
            0.48730027068923987,
            0.777533228748601,
            0.995593590208506,
            0.2837039631829177,
            0.43938307699297496,
            0.4620334166990011,
            0.723107349119294,
            0.09420467485258888,
            0.6358792287974563,
            0.31726017863820344,
            0.5930856036385725,
            0.5441751974958483,
            0.596162528868908,
            0.8707416551484265,
            0.11750711181456241,
            0.40952358344652195,
            0.6613449493091041,
            0.2089823679207996,
            0.5444114035951964,
            0.06336970146907905,
            0.3610467807780603,
            0.7769675152770383,
            0.43796322813378274,
            0.4939182688892382,
            0.41612909006871357,
            0.7523182376138786,
            0.20859115527827465,
            0.7484461563925388,
            0.662622815355134,
            0.8239554601995842,
            0.852255633481237,
            0.7752363840083065,
            0.12470946016078477,
            0.562773191894562,
            0.9990280664878824,
            0.4494102536129029,
            0.3046107043801658,
            0.5988290223128836,
            0.19903409997509125,
            0.08228282521630947,
            0.2020675186738503,
            0.043358117348048286,
            0.8419077239100892,
            0.7540250387927822,
            0.046271322976731866,
            0.6124091682540836,
            0.006137159987272489,
            0.15178062693450456,
            0.8961505092812037,
            0.9204991760650401,
            0.5099182302513531,
            0.18985461509881563,
            0.9926969179162485,
            0.6272772781313145,
            0.09077336956245363,
            0.1818656855562738,
            0.8998689136947536,
            0.040278751596603546,
            0.854872151555447,
            0.29171322399974076,
            0.9197058545628718,
            0.5231534736319071,
            0.8488918090714456,
            0.5553163340052903,
            0.5634259776294583,
            0.2760854765726444,
            0.7923997649051309,
            0.9287718407921433,
            0.100083445256405,
            0.680136827006188,
            0.8457131221657718,
            0.2667047535493833,
            0.9388271720497359,
            0.28860383626150166,
            0.27213245118410934,
            0.7912675733315343,
            0.5710334996693108,
            0.9780892928256034,
            0.6358918661058398,
            0.2160364168164708,
            0.018842517733940523,
            0.40712350774186135,
            0.29471643562288863,
            0.8706572141334441,
            0.921015038238595,
            0.3388423987647393,
            0.046720193680717004,
            0.4681292967780236,
            0.3873975557043752,
            0.9086838537441054,
            0.013682127465866167,
            0.18565119619491688,
            0.2290507680468068,
            0.1630431130315817,
            0.9722318702949183,
            0.819752047558142,
            0.2105155210352091,
            0.9782962365123522,
            0.8479273495644828,
            0.5562785569675941,
            0.07948814638457902,
            0.8788196477573362,
            0.9383257802184702,
            0.9619484050177134,
            0.3089158646854421,
            0.4786287651548705,
            0.4147956990833652,
            0.27214863041083226,
            0.3226959783328355,
            0.9914698825678759,
            0.805279151866373,
            0.7688957978783749,
            0.8066212236271963,
            0.5981485863866867,
            0.8081713104390088,
            0.5055870576063283,
            0.40127655905750237,
            0.8245271134324578,
            0.258245968899807,
            0.5741087177641174,
            0.8742104378384697,
            0.845232971814897,
            0.6906603176269961,
            0.8392583288050085,
            0.4207571041023982,
            0.3397403865410441,
            0.5543357668129845,
            0.06420324415251599,
            0.1734590133390691,
            0.15174876080277877,
            0.8070029375494967,
            0.9772222507256696,
            0.7819143100326902,
            0.8272697764809542,
            0.9632778907632717,
            0.31128358786273247,
            0.015780670810736974,
            0.34169242777375275,
            0.34746173761943777,
            0.9016760028102422,
            0.28789843871875376,
            0.427836099748939,
            0.7895891469708355,
            0.8287644199071691,
            0.24653800241055912,
            0.29579891612606535,
            0.4959246481113829,
            0.4075180462167367,
            0.8630527133201956,
            0.3225358985840746,
            0.45259995666348507,
            0.11047805066246874,
            0.15784880860892525,
            0.6801965280744687,
            0.7144449201613725,
            0.07185538866587715,
            0.8600874580654525,
            0.1413489823593801,
            0.495129708473908,
            0.8065613445522369,
            0.7271263449106691,
            0.7761426345882089,
            0.5447553128314743,
            0.47180386453619627,
            0.9470146190851161,
            0.6096758105284678,
            0.81267382334819,
            0.09322968670330378,
            0.3179022623748985,
            0.5704183023971419,
            0.25110673985844134,
            0.29876292874579324,
            0.7759557637824563,
            0.44538802256476395,
            0.4202870241589939,
            0.6708488159713832,
            0.8348573279009393,
            0.8944106891613797,
            0.26643607903387834,
            0.8579276255335873,
            0.3092232150279193,
            0.4874379314315822,
            0.23009728233968074,
            0.6583663108921768,
            0.191399455417818,
            0.024204800756103206,
            0.05052911678800842,
            0.8763096204232189,
            0.5011663364836386,
            0.255626335298874,
            0.777722629115866,
            0.49430541547793305,
            0.201801692543503,
            0.874152437179804,
            0.7661274794318871,
            0.3731594141295158,
            0.012594608773900617,
            0.2664326444122004,
            0.20169969925656672,
            0.8878303526753131,
            0.01341291066570982,
            0.7824697402287112,
            0.47897618434594436,
            0.9077334140031437,
            0.07656410276102354,
            0.7718449192339395,
            0.8245626244687856,
            0.48964886652295436,
            0.21279254530399083,
            0.21790037423402275,
            0.08396101805904987,
            0.07063697399761626,
            0.7414397636706472,
            0.6488421862002427,
            0.026688916319550504,
            0.452100716746036,
            0.14946338422838767,
            0.19010652703288922,
            0.29768081602064045,
            0.39835401084549205,
            0.3788763696865308,
            0.6046856053675782,
            0.3059239827222081,
            0.4972930449909616,
            0.6534382863592881,
            0.6221644680494862,
            0.7990814611604187,
            0.6185988675893694,
            0.29067401787891123,
            0.6101846359401567,
            0.2141742059725007,
            0.6399653237078059,
            0.7704062179306667,
            0.9899118548808317,
            0.09483014540544699,
            0.7198899252046668,
            0.6235369827746622,
            0.1014223473827458,
            0.45141326259662884,
            0.5359354932167162,
            0.7847807706063674,
            0.013601356447064061,
            0.37290970288339054,
            0.6697417766181251,
            0.7986210400858545,
            0.05111199778895548,
            0.5917853100786763,
            0.23689314125295224,
            0.2879330893613068,
            0.24319203418107005,
            0.0705875583592015,
            0.04850965199351387,
            0.2965520096334008,
            0.22731710712946906,
            0.3791001671088987,
            0.09116633030951571,
            0.003161643532820557,
            0.5788324365360623,
            0.30018855534700284,
            0.34111485277114006,
            0.45909751120261677,
            0.6845298490060495,
            0.7464014957030628,
            0.20273062863677793,
            0.7016257325646206,
            0.8721676867837501,
            0.9598072529391136,
            0.5140960392476059,
            0.4675643632940164,
            0.5893066222098934,
            0.11724483831312471,
            0.9687321725400863,
            0.9256292908222438,
            0.19274338382847755,
            0.50713325296572,
            0.3187518192289692,
            0.28980451656127826,
            0.4712033468705019,
            0.9236974836649949,
            0.45174746012846156,
            0.7526252013603677,
            0.8115776661401731,
            0.5403652815551301,
            0.5349181705120207,
            0.855090919115041,
            0.4911854392120538,
            0.9214222416338209,
            0.7096679881390793,
            0.6680628258652926,
            0.648801426088525,
            0.6081793876938826,
            0.1386923364023822,
            0.9204390458058528,
            0.22433730841073418,
            0.4674609534047509,
            0.67714731810095,
            0.09908477312863806,
            0.725974084871251,
            0.5750920106421858,
            0.19082086826761124,
            0.18028868373782125,
            0.7885382816546854,
            0.6366193539437264,
            0.16426570150460196,
            0.21646585593670464,
            0.8860614294487653,
            0.3589733270516654,
            0.5575908986799576,
            0.9519088814620531,
            0.7849366514599235,
            0.9265922118006196,
            0.21615148448978794,
            0.8340902611106918,
            0.5141396022406695,
            0.5160736894040722,
            0.6919885048933402,
            0.9514442092948073,
            0.7410245535042598,
            0.3125643404266064,
            0.013190787684537186,
            0.8709055477757583,
            0.31775523412048756,
            0.09262426823853842,
            0.06319989545671545,
            0.24767385544288922,
            0.03644509343919555,
            0.19139623058816846,
            0.9189292770037563,
            0.48674316744771695,
            0.1096769323200868,
            0.196481399342337,
            0.05079419858625778,
            0.11838912587052153,
            0.9148053156331513,
            0.6609132982883819,
            0.09953053871172568,
            0.22417311568300347,
            0.7868085526936249,
            0.4039290686342272,
            0.17384172476775728,
            0.48290295972525654,
            0.400677550728207,
            0.000677905796406475,
            0.8380787818171512,
            0.27338503613051757,
            0.45508435381130075,
            0.7724482754353529,
            0.880306074882969,
            0.6534635148126098,
            0.030164561257271072,
            0.03203719813946959,
            0.029487142012581846,
            0.08065135235244192,
            0.016610301731561417,
            0.13976862035572357,
            0.7266805008187736,
            0.3805111529662628,
            0.7902329582791843,
            0.7856534945315925,
            0.7369416486167958,
            0.0029154495736571917,
            0.41757851209219,
            0.820570515933666,
            0.09741115279825074,
            0.2799131076063386,
            0.5469564697262916,
            0.8820279358788958,
            0.2267980524100508,
            0.3451442418046603,
            0.7678919762995949,
            0.8653313691636285,
            0.8656216296327993,
            0.7655993466330918,
            0.8110382635666983,
            0.3483236552862772,
            0.7452455562958151,
            0.08036873990933047,
            0.6683539072877462,
            0.6889660841314379,
            0.293557511557762,
            0.26538543223398114,
            0.6891193451721862,
            0.20893896935290968,
            0.9640409362260252,
            0.3020024432337386,
            0.7480552449644036,
            0.022493395429597274,
            0.9726127997485071,
            0.9143517795114549,
            0.2575924109355764,
            0.6534797993917613,
            0.19905866430220664,
            0.14887808574672057,
            0.5012114754450577,
            0.06320575683269769,
            0.4824058782603091,
            0.34090626392910295,
            0.1809913097791911,
            0.04097567728970941,
            0.7338913647773149,
            0.9969697902003287,
            0.1922298615126642,
            0.6242470807866466,
            0.8075548479348412
          ],
          "segment_count": 1
        },
        "SPEAKER_02": {
          "embedding": [
            0.30693486531318637,
            0.9640096313400186,
            0.2684086241428929,
            0.49581683577959423,
            0.06780930577772226,
            0.12445683905086957,
            0.9432985667922728,
            0.9526568893694036,
            0.6181242329912323,
            0.2851412562809267,
            0.790745535560756,
            0.6793400943441121,
            0.3062304082700644,
            0.042746741749154715,
            0.4668836489491497,
            0.8557197239864113,
            0.3239480448018255,
            0.4322197043073227,
            0.9722737343160964,
            0.5337069787287826,
            0.28325840969291405,
            0.9376484164077502,
            0.7012569590650781,
            0.10079478818219745,
            0.71528669691937,
            0.5693989084894397,
            0.18528557688685454,
            0.4155036200911538,
            0.623095828807186,
            0.09746517757017903,
            0.7664420237248116,
            0.8946446975398074,
            0.009986796769153261,
            0.09187913719774166,
            0.9240751350055263,
            0.5228557226697051,
            0.32991403773753647,
            0.9442890882748374,
            0.6294399206536452,
            0.9969902637859359,
            0.6318445090369808,
            0.7176367744728134,
            0.5969741426149243,
            0.33495116395632585,
            0.20531306114169656,
            0.6288526132481347,
            0.6062007473371558,
            0.729029049677363,
            0.6486948089385544,
            0.838707735395433,
            0.6760169363572159,
            0.4280507895533734,
            0.6091658825230094,
            0.9951129286906156,
            0.8709173863010102,
            0.25566172109260743,
            0.30407502978284806,
            0.90559975965537,
            0.6750418500614196,
            0.562165332414408,
            0.004782300345209323,
            0.8231313239591618,
            0.7757873936231308,
            0.9834549740406056,
            0.273442440676794,
            0.18630004181954707,
            0.14048736666290051,
            0.9308155970527925,
            0.7029064267764018,
            0.809180789069052,
            0.050243691513942146,
            0.17302196101285028,
            0.6930558767689353,
            0.9050321620806125,
            0.39239132488786044,
            0.7402117136544192,
            0.4672804275117476,
            0.30346356463508717,
            0.9491299491000043,
            0.14828166611234173,
            0.005091841800398678,
            0.649267190656875,
            0.9295484373567329,
            0.8101083461904254,
            0.025430765894305263,
            0.23757990511221905,
            0.6683207600982506,
            0.7291728997263318,
            0.3148027349661947,
            0.13238683108340799,
            0.9190443784027383,
            0.9424674715910593,
            0.1200559962303065,
            0.3576944459525183,
            0.8488427324546388,
            0.2258032747873312,
            0.8434292976287836,
            0.26104991900923735,
            0.5246822700953931,
            0.24467387893955628,
            0.42271746067681304,
            0.5768272452020484,
            0.271278037209138,
            0.27364319854678865,
            0.3495172702031134,
            0.3441316092516551,
            0.05523568373078891,
            0.5927879033829769,
            0.42550308704301865,
            0.8691558538253691,
            0.06076301914233273,
            0.7992143310777398,
            0.29030352747072297,
            0.5773526253252316,
            0.2222043361152819,
            0.3660429010709799,
            0.3001778677885206,
            0.38942101992703015,
            0.182874731036881,
            0.9023175678301325,
            0.04469024636830177,
            0.4123731704906859,
            0.862037311627644,
            0.8639490575219484,
            0.7324007009321705,
            0.3240038488970981,
            0.13467208916358264,
            0.24180715701474942,
            0.4489030275204112,
            0.5314631180967134,
            0.23159903217253353,
            0.7613133663283912,
            0.5774432540498655,
            0.9398519636442126,
            0.38023764129251436,
            0.29354750762596393,
            0.005379241470578222,
            0.2642445979911886,
            0.406950923816523,
            0.31124625494859315,
            0.6024941471999972,
            0.6975125174123782,
            0.168961828933342,
            0.8206236927503608,
            0.7871880479724421,
            0.5493724378880075,
            0.43590141548184913,
            0.7023422337889831,
            0.13346281114871295,
            0.617533547959616,
            0.8150119454556944,
            0.5894165696133513,
            0.9003084524523675,
            0.3550423925470073,
            0.2232559499735134,
            0.9396450136559736,
            0.2864123645055663,
            0.4914877099729035,
            0.8744660728912775,
            0.7646231801507782,
            0.4451391934302461,
            0.5662345552240278,
            0.5087364476447704,
            0.7545016964539013,
            0.8320357297599205,
            0.21472865720313217,
            0.2414023885580463,
            0.1842990380651338,
            0.29905298292163185,
            0.6888617571373816,
            0.8698155577702497,
            0.1889180625818645,
            0.36613251759263665,
            0.40203116417973284,
            0.03592746791347645,
            0.020863895238501518,
            0.9928132369591794,
            0.8664775373324959,
            0.17616272349411144,
            0.5876285451664156,
            0.8742329742527101,
            0.19475911725148676,
            0.045665579683630386,
            0.41207976331888163,
            0.9352167457522431,
            0.7541618301695228,
            0.023230756649030515,
            0.3165518400369858,
            0.11206697297161328,
            0.4712851757023243,
            0.314101474431537,
            0.012441295968388388,
            0.8398112680701443,
            0.6599008597598603,
            0.9033050921449445,
            0.24593139495415917,
            0.8743209445704421,
            0.7804992158182298,
            0.6333533378839051,
            0.9207617880354186,
            0.023361421147960804,
            0.8523354193768068,
            0.5521400244623073,
            0.2921874399304941,
            0.7138062071519337,
            0.18497280150764395,
            0.728215195405716,
            0.04978871433409637,
            0.9971573695905062,
            0.24784893818915155,
            0.9893976874578629,
            0.44787206821023307,
            0.7799375105802012,
            0.9662244387086028,
            0.5674290777795237,
            0.3895940996792907,
            0.7702458161494504,
            0.8584281222384057,
            0.519098703916568,
            0.5095770482679528,
            0.06745004221782569,
            0.7453011916765883,
            0.3759127713854977,
            0.49482502098845915,
            0.1615614237846048,
            0.46919541427108435,
            0.354425692404404,
            0.7886707316608692,
            0.15152483404505546,
            0.6792115933639717,
            0.9146460422358522,
            0.023890473737761764,
            0.08272605554097778,
            0.47034097208882053,
            0.895376592559822,
            0.7592397936957771,
            0.33484861567329127,
            0.6335966715451986,
            0.9427112957950755,
            0.8422589639511967,
            0.2376657693815143,
            0.30575555398034815,
            0.758257898715414,
            0.5490213372054714,
            0.35694169045927004,
            0.2521943771048958,
            0.02058784368923461,
            0.2629392953173505,
            0.8380906998680027,
            0.37505978010382246,
            0.665568334471709,
            0.2615444042125359,
            0.696006924636629,
            0.08847423915341246,
            0.8841051385404953,
            0.08445938985778467,
            0.4925898133817781,
            0.7041264423566896,
            0.24301957659370677,
            0.6325756786655962,
            0.59459591600108,
            0.9289920901171934,
            0.28877367753604954,
            0.48559132629105217,
            0.025737157786149156,
            0.3215109300372031,
            0.20503898711947466,
            0.9661539204823306,
            0.40204680143430904,
            0.6291132884066518,
            0.5497692115745547,
            0.6438141853099787,
            0.8544258522903955,
            0.9603554702756998,
            0.19109252261597298,
            0.034023821180269365,
            0.9331661687663897,
            0.4433393487568732,
            0.9315065888770283,
            0.5548314118709778,
            0.7488118351487187,
            0.36312006952765186,
            0.12262500398993081,
            0.33077517173145277,
            0.19904192932393105,
            0.7355913070831602,
            0.8149485168500514,
            0.40778243068397557,
            0.5148834525942518,
            0.15979806799796492,
            0.59173213163104,
            0.6066476326876001,
            0.402002375155346,
            0.7674338911913315,
            0.49813067912854214,
            0.9772374821031388,
            0.8784773732366649,
            0.5644356940484038,
            0.927178545749541,
            0.7348197490285813,
            0.5409794545895121,
            0.6902546969028817,
            0.19258328814362535,
            0.5384050394382845,
            0.673017588574522,
            0.5178495176517152,
            0.006502021986546369,
            0.7910203544888321,
            0.7080099287398866,
            0.39614022541998484,
            0.36552874167211025,
            0.43228440509627786,
            0.2763489049770448,
            0.2871123735506066,
            0.8774391295387418,
            0.9149568160318332,
            0.26255028991103735,
            0.9443293463462583,
            0.11758704071169046,
            0.38770505169394087,
            0.53524706294688,
            0.402468130630123,
            0.9183212660121304,
            0.3567848575684509,
            0.22743822837883976,
            0.5117844117137498,
            0.7557739949563237,
            0.11270465414735653,
            0.9223866493024723,
            0.38013989815199567,
            0.9396104513889658,
            0.7829728412671231,
            0.5186572449044561,
            0.8288804016877104,
            0.3060970260902821,
            0.10986011209881186,
            0.7084616486349806,
            0.43894824912318997,
            0.9527874712923003,
            0.5383701606068632,
            0.6610517315864288,
            0.5090116074830261,
            0.14068717478875326,
            0.4588862113285128,
            0.3269277079855616,
            0.02351437692290037,
            0.8468425531172806,
            0.650800644043556,
            0.5077437952701417,
            0.09820854428035608,
            0.5955942058753865,
            0.17899413934018715,
            0.7704497042765056,
            0.7535201998654312,
            0.2785806106208012,
            0.12005010314039921,
            0.5382913863933546,
            0.8551200608157558,
            0.03568677950221344,
            0.2407816155815703,
            0.5326007756346247,
            0.7010207658319024,
            0.9046774664391303,
            0.8726952783837065,
            0.9440295294060853,
            0.08986292738625545,
            0.3820158423393514,
            0.6244599476135808,
            0.5524684562370841,
            0.47930847884400485,
            0.7166973796266359,
            0.025942169967979378,
            0.8679756808841189,
            0.3550040764373742,
            0.9004385028620769,
            0.0031460269812378927,
            0.345223264657037,
            0.12729064831419157,
            0.3814100036231628,
            0.05463857186233978,
            0.8270300838851692,
            0.5170167194632794,
            0.3668818946121384,
            0.5726170129655945,
            0.6810287586256978,
            0.4338475953392301,
            0.031232784616085807,
            0.6252868981414528,
            0.09787642833985122,
            0.6646977265163754,
            0.38833722115119185,
            0.15107276553386761,
            0.4010850335473196,
            0.7179645747262199,
            0.3714385842990233,
            0.22483762875831048,
            0.2124494171394573,
            0.9956885278050217,
            0.3081696229034232,
            0.4814149816020641,
            0.1951583927162419,
            0.867303275750641,
            0.840345242750179,
            0.008942618068303876,
            0.8376227496750901,
            0.8548070457625208,
            0.46282992151971747,
            0.5678477053159195,
            0.632124013865878,
            0.09463650955715808,
            0.8458916000236912,
            0.1726479793533735,
            0.5862615029213757,
            0.6903028504116351,
            0.08169665838306783,
            0.9257775995922534,
            0.8106760432371508,
            0.8737053323196294,
            0.7182206539829299,
            0.653565961486485,
            0.7461688046108759,
            0.5835740954779061,
            0.8052858137647212,
            0.9430466384796767,
            0.3380016345338468,
            0.6122060318846471,
            0.5484299663835633,
            0.31266002019588535,
            0.5441687828695053,
            0.2855213715786843,
            0.47470222917818927,
            0.563606167220064,
            0.7935254596662529,
            0.9770821196829531,
            0.5568273422542203,
            0.801588290722673,
            0.464652545795881,
            0.6508196679471502,
            0.5173949359049613,
            0.6608540877692145,
            0.25729676357280296,
            0.2643197635200889,
            0.9145111762468764,
            0.9041170333881646,
            0.8107053812326168,
            0.12609854424174505,
            0.644034240082284,
            0.23233509062013735,
            0.3735769686462671,
            0.15013550152276267,
            0.5437099751940339,
            0.20038712893591337,
            0.5062276924278812,
            0.7214960451004309,
            0.9128633678006438,
            0.3960849999689424,
            0.4263698372486803,
            0.40576874518949,
            0.022257628039816457,
            0.20235134051713388,
            0.5313065941195,
            0.842689153144347,
            0.4566028203304261,
            0.2557746253254902,
            0.8009224003304019,
            0.7659302217211844,
            0.20085889176182992,
            0.8306871378435899,
            0.4448666276614911,
            0.3735900482525173,
            0.6254461422087189,
            0.48783098300857175,
            0.8778071512121128,
            0.47177984738272605,
            0.682603935973131,
            0.929169715210128,
            0.8892250780460451,
            0.4111522375531058,
            0.13365288520728913,
            0.3120380035033803,
            0.7984864032017381,
            0.24015502437426417,
            0.5457497036761529,
            0.890007500944586,
            0.5685793153960313,
            0.6990666107069509,
            0.6892292364953263,
            0.5673248332133092,
            0.1413293658946696,
            0.8982356945551145,
            0.12549336592614224,
            0.2716253508049393,
            0.8077938258575469,
            0.2915558081948799,
            0.60598949677564,
            0.7414759866434346,
            0.2485467603996655,
            0.3003699806254412,
            0.6402764275641949,
            0.2357576391962123,
            0.5662213224449603,
            0.8960012854024526,
            0.9502092269488953,
            0.2413110393027983,
            0.29916318200428726,
            0.48983065074373056,
            0.6354006743965406,
            0.9718653551835948,
            0.9052413614070606,
            0.9816567574015488,
            0.45447833995008524,
            0.9077139907437559
          ],
          "segment_count": 1
        },
        "SPEAKER_04": {
          "embedding": [
            0.5428955550212569,
            0.4811925797574774,
            0.8931297431659411,
            0.032599243724867555,
            0.6118148562727891,
            0.9579700352730007,
            0.9435378601180437,
            0.06470087759070053,
            0.42432946877104205,
            0.7493599395036095,
            0.5925125792534616,
            0.3987886688009833,
            0.3026780721979765,
            0.8054308701450139,
            0.9029220730528197,
            0.2680596451245991,
            0.7956153855144289,
            0.2517390594013633,
            0.09981469360355699,
            0.4677149244329397,
            0.6055935039555624,
            0.6939344301745826,
            0.9580206201401336,
            0.7117515254982291,
            0.6641834031710269,
            0.01371147916748805,
            0.34881094940011403,
            0.009082384730879078,
            0.5931870205811106,
            0.2679282116726315,
            0.14173205573549075,
            0.20961905810742065,
            0.6972514658665034,
            0.5600936342517069,
            0.7955419209547546,
            0.23132871054546988,
            0.9769465857392976,
            0.129205241819488,
            0.5860262661467794,
            0.732752303746544,
            0.886210619893177,
            0.5747763283607812,
            0.1872878200222019,
            0.3669502339785533,
            0.8283713544061021,
            0.8439465468632537,
            0.28576133047233343,
            0.8949411743462041,
            0.08568629038658881,
            0.6475821137255173,
            0.32494055384143317,
            0.8851712152422426,
            0.3965940860109346,
            0.7783644316103332,
            0.7722797116498079,
            0.14884675688203497,
            0.662928129579774,
            0.8854343221183859,
            0.609935053667457,
            0.9529423630072859,
            0.9709908964945261,
            0.19347663055350228,
            0.3360760116947875,
            0.30253220019248794,
            0.18993450407491919,
            0.3728031205964508,
            0.19724744623772694,
            0.5957787883970369,
            0.9732961285258773,
            0.11822469500938004,
            0.3429205881370644,
            0.3836000859310691,
            0.5204419082621473,
            0.42603202431877996,
            0.9734516215066156,
            0.24588329458533598,
            0.9243888837972178,
            0.6302166623128004,
            0.14696220104546587,
            0.30598109977197485,
            0.09083313530345372,
            0.3045181148676259,
            0.1783011735881711,
            0.8044141709075602,
            0.4032777161149881,
            0.36750538083353956,
            0.08173137879627212,
            0.04675355596783226,
            0.6234191413534016,
            0.5621599115247615,
            0.8386231104871891,
            0.30769118168167664,
            0.7002307539243074,
            0.3810542667152014,
            0.6526748375062686,
            0.13590925384801655,
            0.23504540360469228,
            0.9048628514284119,
            0.7599013746605235,
            0.8163580595942684,
            0.5487330494554266,
            0.44178575690111566,
            0.9335089873594935,
            0.538806910222011,
            0.7821989555274611,
            0.3583645650932874,
            0.10603271216029797,
            0.12033907358697227,
            0.9308621076752349,
            0.20182693847380717,
            0.9594523229610212,
            0.7210459008572185,
            0.39566803150548513,
            0.07448442376088116,
            0.9214645561430455,
            0.5043065427303102,
            0.9200760655933048,
            0.6366730683551096,
            0.6883647267412155,
            0.7971830994232355,
            0.6732511057725167,
            0.9226072750115429,
            0.7942337478293406,
            0.8979108982416174,
            0.2259606862813356,
            0.49457218367526967,
            0.8849300894079407,
            0.6621502710142392,
            0.7765243880593865,
            0.47093827072966987,
            0.5627251504765322,
            0.8570597189652105,
            0.21730645542791072,
            0.6097396385225732,
            0.0421003637293228,
            0.2400475784559677,
            0.03595562438788236,
            0.7460269624909032,
            0.6690726398623906,
            0.5482973061843436,
            0.871010964672239,
            0.1911682544390646,
            0.8008665859464233,
            0.47998839011877603,
            0.10837882947075361,
            0.7449633703131899,
            0.63205485663963,
            0.7033754164672902,
            0.6073903158041939,
            0.3306947997033711,
            0.6764835929584209,
            0.04428985518823203,
            0.4444639359157381,
            0.35122015486830527,
            0.10757864062340328,
            0.19355722499957073,
            0.6695875129987889,
            0.5294688226879997,
            0.5117202072983715,
            0.8776753459023777,
            0.3503662822829209,
            0.766608509239275,
            0.6065610603461016,
            0.966763264696648,
            0.5784166868116662,
            0.9420520074067923,
            0.8346055483395265,
            0.6990132379749143,
            0.5644439193312416,
            0.03321346741889497,
            0.9678836784253284,
            0.048508092090002064,
            0.2775161053873523,
            0.17932105369694906,
            0.7461677668051075,
            0.03184167649510061,
            0.9296252843010956,
            0.21119309931435315,
            0.749759369209233,
            0.9211603109599675,
            0.11142608547930277,
            0.9789428606023572,
            0.16555960747459875,
            0.5440479264251249,
            0.9129555244369797,
            0.16256314238321212,
            0.5024745373712445,
            0.19213358987673945,
            0.8629837208706707,
            0.6463887784984945,
            0.15212691742887186,
            0.2820745678791179,
            0.4881410922206625,
            0.5782627469923536,
            0.8793309270064242,
            0.6187806588457897,
            0.5903159243734534,
            0.9525647490371936,
            0.253626628668998,
            0.16052138695676266,
            0.09458763096203093,
            0.3199489627920453,
            0.669767165969647,
            0.5772280454849439,
            0.7040082556256262,
            0.19830636970262017,
            0.5720410278234477,
            0.8003496647083371,
            0.2518569935286289,
            0.6433159221464931,
            0.26297164569690346,
            0.407494587601683,
            0.4398564170287256,
            0.46260481137468346,
            0.7526013418314977,
            0.9318439104320452,
            0.9299930669676958,
            0.9567839297008572,
            0.7452363445676308,
            0.7471961512041781,
            0.35949167645830205,
            0.7158716208063082,
            0.6486886219426632,
            0.23058720094290963,
            0.4613945259506227,
            0.3994402326733394,
            0.8770529257737422,
            0.23078719893430477,
            0.5414636263982714,
            0.3147608984643717,
            0.7659924451012569,
            0.31095763201445115,
            0.7712063280058246,
            0.9852666187006633,
            0.7281670679347247,
            0.9038850780500689,
            0.14416969229060195,
            0.8535932437369063,
            0.4670150290403572,
            0.060142967885255305,
            0.12252385881751715,
            0.0027519669097758603,
            0.9258070869460582,
            0.13316889995562442,
            0.3922444661883058,
            0.6408440335707076,
            0.8711921003393184,
            0.6823211126411127,
            0.27305542991501563,
            0.8653977413637558,
            0.22916209559720502,
            0.2761782049205702,
            0.4308860309177811,
            0.7411212793471543,
            0.3139529663919437,
            0.9121719503172429,
            0.5710852259148339,
            0.4322662603469536,
            0.4268751217016894,
            0.150597279538628,
            0.8759674929252251,
            0.1823570172679696,
            0.6668576724147618,
            0.7925873677880777,
            0.7891692102118915,
            0.2853767955054638,
            0.9652232215725585,
            0.647376808458671,
            0.32309610753580553,
            0.7692281613979113,
            0.8204656006657459,
            0.5093707267336569,
            0.7231760380143487,
            0.8487967088946227,
            0.6749993125096427,
            0.7564221494167127,
            0.5004679004901814,
            0.6192218548894597,
            0.22212148577056723,
            0.650591587154947,
            0.7490760224903342,
            0.5566873213028385,
            0.022104332295119655,
            0.5913278115521408,
            0.08680029827719593,
            0.6272317109993232,
            0.5761469212731701,
            0.5032745724855484,
            0.49848753152471326,
            0.04397621575125432,
            0.5133987298917666,
            0.8846359450193584,
            0.3732566189742822,
            0.6932158164374559,
            0.5971666473076088,
            0.6397969502681949,
            0.9805324126120355,
            0.3002190231798565,
            0.07899348897997915,
            0.15516777417228866,
            0.9485095312275672,
            0.9600145681410246,
            0.16398863812070374,
            0.9776322288611311,
            0.6392247036373254,
            0.5595082939654489,
            0.40268334473082723,
            0.5356172268195959,
            0.7091659110887778,
            0.18200286830193957,
            0.15046641450819975,
            0.06116440912031662,
            0.11228117659129622,
            0.6978405089492571,
            0.35190434599533527,
            0.6947273271992015,
            0.003972618291925856,
            0.25500479863841896,
            0.22717877206732107,
            0.2467631012145547,
            0.29790622547016565,
            0.5478423158298327,
            0.17777341544969105,
            0.9553897875005106,
            0.4279274013284635,
            0.5598854532116772,
            0.6589870350202497,
            0.009968362450700985,
            0.2625004288611744,
            0.850372898250663,
            0.1217900927758192,
            0.9741119422817843,
            0.7443716258882732,
            0.07623728834623067,
            0.7638031177596345,
            0.11705873919087662,
            0.275741270978597,
            0.46379709520888646,
            0.09657735712341797,
            0.6216530402424186,
            0.13694882060912894,
            0.9700932427961968,
            0.4667043022617845,
            0.9918663267613491,
            0.3175535874599713,
            0.1052831361993537,
            0.9416140513550314,
            0.6619009810932636,
            0.94247428467554,
            0.11586979700218059,
            0.5372761624660518,
            0.1714695404159522,
            0.4788802454364445,
            0.5556531073406256,
            0.7412494505480598,
            0.3612756578517369,
            0.41662300804497077,
            0.24596283255077522,
            0.20826770522364102,
            0.15091631579918074,
            0.8987585339673333,
            0.7155350846282144,
            0.6164607301391412,
            0.058319484883833095,
            0.7754867589419902,
            0.800544357789766,
            0.3756491993399549,
            0.514638295372858,
            0.7696376110106659,
            0.6930608937553109,
            0.38102462945457005,
            0.7430201250826731,
            0.7208204615795752,
            0.30751758434691223,
            0.9168862354267758,
            0.4852468075935368,
            0.43690573238363695,
            0.7895358920640231,
            0.8910302723663176,
            0.13568686153890352,
            0.6513909322093944,
            0.6369791662051666,
            0.5573393922807386,
            0.2246400673880692,
            0.8348990785805338,
            0.733067603530911,
            0.15996673107638748,
            0.28711664122541514,
            0.4758171867343103,
            0.9901175612458879,
            0.3265529783209309,
            0.7002808669190663,
            0.8125360953011005,
            0.8456142089579395,
            0.4951567606885572,
            0.12009616875061269,
            0.3164868878650392,
            0.13937029329725004,
            0.11159194268503903,
            0.25656641825862814,
            0.7255663581229255,
            0.7532753241214091,
            0.6695393096945621,
            0.07511820183208251,
            0.4657962007386687,
            0.6893597571164485,
            0.9041275821771158,
            0.01629652981782337,
            0.9695244816183236,
            0.9065480274424421,
            0.4409990662842249,
            0.7021645839346805,
            0.23979982841469039,
            0.6797089077439981,
            0.35822818361665754,
            0.08010574305808527,
            0.235091453918285,
            0.4185426934201214,
            0.17573714032186027,
            0.07850384110785913,
            0.9397549559387772,
            0.22619573569691964,
            0.6219248307370893,
            0.9234214561376066,
            0.559601974281744,
            0.23885756778571754,
            0.21367335711190671,
            0.33399404694084855,
            0.6263912067784574,
            0.6486366880301973,
            0.8338983496724749,
            0.3928517363271279,
            0.13266627149062882,
            0.012842695568620277,
            0.9584078307700631,
            0.0005360415774063876,
            0.313246115005415,
            0.9791250731956885,
            0.7721929189563236,
            0.1894610293069936,
            0.50035531079888,
            0.7640214415522385,
            0.9045736950186247,
            0.8966936764215863,
            0.6093429118773985,
            0.24139652292654523,
            0.6636280703837922,
            0.3800713105156426,
            0.4510005098731331,
            0.5429235324140941,
            0.4108564346113833,
            0.6988622545122835,
            0.33063904129162214,
            0.09207375661961192,
            0.3447873990888253,
            0.34755463930593555,
            0.6671310483474054,
            0.7321767778853508,
            0.5553042562359861,
            0.1919574982320783,
            0.34450195001123307,
            0.5663686606210612,
            0.40073034064186763,
            0.44598917192259113,
            0.6759336248763288,
            0.7519682999824256,
            0.23359202457069483,
            0.8224339626490929,
            0.11779790294319514,
            0.3042929344103442,
            0.2863953817723115,
            0.7400855575282222,
            0.5996865522002871,
            0.5515837514408626,
            0.5736909842184966,
            0.21180834393954684,
            0.735422395932794,
            0.5428469965873964,
            0.1531860745125173,
            0.4068281603095165,
            0.5439680069812004,
            0.23818170571000985,
            0.5795530310034225,
            0.003337071365836608,
            0.234564518290869,
            0.42751577110732286,
            0.2629104931400007,
            0.3915813904366686,
            0.8869029693726216,
            0.9061148223841294,
            0.8496382235353009,
            0.016575721295285062,
            0.6120539447149624,
            0.5568689882000161,
            0.6695202674195412,
            0.8000979076741219,
            0.9859252288963339,
            0.07930495349382694,
            0.5873521998063851,
            0.636495013240553,
            0.5041291741221395,
            0.4787937448044909,
            0.7084698834841994,
            0.8931975224834071,
            0.6880109455747883,
            0.7057446422191647,
            0.8487249314966459,
            0.01823899986471411,
            0.1475061896730041,
            0.2995633932221681,
            0.6789112026509133,
            0.5102768937633293
          ],
          "segment_count": 1
        }
      }
    }
    

    11111 ...

    立即注册
    更新于:2025-08-24 16:29:38

    通义之旅2

    补全services/audio_processor.py 文件里 def get_matched_audios()函数的的代码 ,如果没有现有切分音频文件的扩展,告诉我可用的扩展,我去安装。

    再优化下 get_matched_audios() ,mixed_dialogue_segment_pass_list 改成2维数组,['similarity'=>'0.2','path'=>'...'],如果没有相似度超过阈值的(比如阈值是0.8),按切分音频的数量,比如切了10个,找相似度最大的2个(如果第一是0.6,第二是0.3那就只保留一个),切了20个,找相似度最大的4个。最后把符合的合并成音频。 20250825 03:16

    find_matched_segment()

    遇到各种问题,为了搞音频处理。 20250825 03:00

    请注意,只修改函数get_matched_audios(),只解决导出的保存的音频声音变慢变低的问题,其他的不需要优化,如果有必要可以改 实现完整的音频处理函数,集成SpeakerExtractor类
    async def process_audio(file, config_value, whisper_model, device): 函数,只解决导出音色改变问题。

    通义:我理解你的需求。你希望我专注于解决 get_matched_audios() 函数中导出的音频声音变慢变低的问题,以及实现完整的 process_audio 函数。

    首先,让我检查 get_matched_audios() 函数中音频保存的部分,找出可能导致音频变慢变低的问题:

    20250825 0537

    声纹识别找到了合适的模型已经可以用了,但是输出的提取的音频各种音色变了,有了杂音等问题。 20250825

    我现反馈个情况,你现别改哈。输出的音频现在音色正常了,但是有杂音和电流声。我在网上查的原因分析“”出现「原来干净、合成后却带杂音 / 电流声」的 99 % 都是下面 3 类原因,按出现频率从高到低列给你,并给出可直接落地的排查 / 修复代码。
    浮点溢出 / 量化噪声(最常见)
    • 你在 get_matched_audios 里把 int16 直接除以 32768 变成 float,
    • 之后又用 torchaudio.save 写回 wav,但 没有归一化到 [-1,1] 以内 或 忘记转回 int16。
    • 结果数值越界 保存时产生爆音、电流声。
    修复(两行就够)“ 你觉得对不对。切记先别改代码。

    20250825 0553...

    立即注册
    更新于:2025-08-25 06:54:22

    目标说话人声音提取模型训练的思路

    我有个现有的代码用于从多人说话里提取目标说话人的声音(不需要完整提取,不是用来记录会议中某说话人的说话内容的,是用来RVC训练的),现在有个问题就是提取出来的声音偶尔还会有别人的声音,大概占比10%,我想把这些也去掉。于是我想到办法,把提取出来的音频,在和目标说话人的纯净的人声embedding比对,看目标说话人在音频中的说话时间占比为,如果占比很高的话,比如超过0.9就保留,否则二次提取目标说话人的声音。我想把这个占比的结果做成反馈机制,类似监督模式,整个流程变成一个模型训练。之后直接用训练的模型去做特定说话人的人声提取。

    我有个现有的代码用于从多人说话里提取目标说话人的声音(不需要完整提取,不是用来记录会议中某说话人的说话内容的,是用来RVC训练的),现在有个问题就是提取出来的声音偶尔还会有别人的声音,大概占比10%,我想把这些也去掉。于是我想到办法,把提取出来的音频,在和目标说话人的纯净的人声embedding比对,看目标说话人在音频中的说话时间占比为,如果占比很高的话,比如超过0.9就保留,否则二次提取目标说话人的声音。我想把这个占比的结果做成反馈机制,类似监督模式,整个流程变成一个模型训练。之后直接用训练的模型去做特定说话人的人声提取。audio_processor.py里的主函数asyncdefprocess_audio(file,config_value,whisper_model,device):和defget_matched_audios(target_audio,负责的是从多人说话里提取目标说话人的声音。t3.py这里的代码是用于把提取出的人声的人声再次和目标人说话人比对,看时间占比。现在要解决把整个流程设计成模型训练的模式。...

    立即注册
    更新于:2025-08-25 21:42:58

    python报错 can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

    ERROR:app.services.audio_processor:保存音频或其他操作失败: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

    ERROR:app.services.audio_processor:处理音频时发生错误: 保存音频或其他操作失败: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

    ERROR:app.api.audio_router:处理音频时发生错误:

    Traceback (most recent call last):

    File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 677, in process_audio

    target_embedding = get_or_create_target_embedding(target_audio_path, CACHE_DIR, verification)

    File "D:\python\fastapi-speaker-extractor\app\utils\audio_utils.py", line 110, in get_or_create_target_embedding

    np.save(cache_file, embedding.numpy()) # 存为 numpy

    TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

    During handling of the above exception, another exception occurred:

    # =========================================
    # 4. 函数:获取目标 embedding(支持缓存)
    def get_or_create_target_embedding(audio_path, cache_dir ,verification):
        os.makedirs(cache_dir, exist_ok=True)
        with open(audio_path, 'rb') as f:
            file_hash = hashlib.md5(f.read()).hexdigest()
        cache_file = os.path.join(cache_dir, f"{file_hash}.npy")
        if os.path.exists(cache_file):
            print(f"✅ [缓存命中] 从缓存加载目标说话人 embedding: {cache_file}")
            # 从 .npy 加载的是 numpy,需要转为 Tensor
            embedding_np = np.load(cache_file)
            return torch.from_numpy(embedding_np)  # ✅ 转为 PyTorch Tensor
        else:
            print(f"🔁 [缓存未命中] 正在提取目标说话人音频的 embedding: {audio_path}")
            embedding = extract_audio_embedding(audio_path ,verification)  # Tensor
            # 保存为 numpy 到缓存
            np.save(cache_file, embedding.numpy())  # 存为 numpy
            print(f"💾 [缓存保存] 已保存目标说话人 embedding 到缓存: {cache_file}")
            return embedding  # Tensor

    kimi瞬间解决了...

    立即注册
    更新于:2025-08-26 00:18:51

    Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

    根据你的问题和代码分析,这个错误是由于PyTorch张量和模型在不同设备(CPU和GPU)上导致的。我来为你提供几种解决方案:

    ## 问题分析

    错误的核心在于:`Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!`

    主要问题点:

    1. 代码中存在多个模型加载点,设备管理不统一

    2. 音频张量加载后未明确指定设备

    3. SpeechBrain模型和PyAnnote模型可能使用了不同的设备配置

    ## 解决方案

    ### 方案一:统一设备管理(推荐)

    修改代码以确保所有模型和张量都使用统一的设备配置:

    [services/audio_processor.py](D:\python\fastapi-speaker-extractor\app\services/audio_processor.py)

    能不能专门构建一个app/utils/device_middleware.py一个中间件,让所有项目下运行的程序统一走中间件,然后中间件统一设置device,device_middleware.py我已经创建

    创建一个新的设备管理中间件,用于统一管理所有模型和张量的设备分配

    [device_middleware.py](D:\python\fastapi-speaker-extractor\app\utils\device_middleware.py)

    修改audio_processor.py文件,使用新的设备管理中间件

    [services/audio_processor.py](D:\python\fastapi-speaker-extractor\app\services/audio_processor.py)

    修改audio_utils.py文件,加入设备管理中间件的支持

    [audio_utils.py](D:\python\fastapi-speaker-extractor\app\utils\audio_utils.py)

    修改embedding_utils.py文件,加入设备管理中间件的支持

    [embedding_utils.py](D:\python\fastapi-speaker-extractor\app\utils\embedding_utils.py)

    修改model_loader.py文件,加入设备管理中间件的支持

    [model_loader.py](D:\python\fastapi-speaker-extractor\app\utils\model_loader.py)

    修改onnx_model_loader.py文件,加入设备管理中间件的支持

    [onnx_model_loader.py](D:\python\fastapi-speaker-extractor\app\utils\onnx_model_loader.py)

    修改__init__.py文件,确保设备中间件被正确导入

    [__init__.py](D:\python\fastapi-speaker-extractor\app\utils\__init__.py)

    修改audio_processor.py中get_matched_audios函数,确保音频处理时使用统一的设备

    [services/audio_processor.py](D:\python\fastapi-speaker-extractor\app\services/audio_processor.py)

    修改audio_processor.py中的process_audio函数,确保设备一致性

    [services/audio_processor.py](D:\python\fastapi-speaker-extractor\app\services/audio_processor.py)

    现在我已经为你实现了一个完整的设备管理解决方案,以解决你遇到的设备不一致问题。以下是我所做的更改和方案说明:

    ### 方案概述

    我创建了一个统一的设备管理中间件([device_middleware.py](file:///D:/python/fastapi-speaker-extractor/app/utils/device_middleware.py)),用于在整个项目中统一管理所有模型和张量的设备分配。这样可以确保所有计算都在同一设备上进行,避免了CUDA和CPU设备混用的问题。

    ### 主要修改内容

    1. **创建设备管理中间件**:

    - 新增 [app/utils/device_middleware.py](file:///D:/python/fastapi-speaker-extractor/app/utils/device_middleware.py) 文件

    - 实现了 [DeviceMiddleware](file:///D:/python/fastapi-speaker-extractor/app/utils/device_middleware.py#L14-L83) 类,用于统一管理设备

    - 提供了设备移动方法,确保所有张量和模型都在同一设备上

    2. **修改音频处理相关文件**:

    - 更新 [audio_processor.py](file:///D:/python/fastapi-speaker-extractor/app/services/audio_processor.py) 使用设备中间件

    - 修改 [get_matched_audios](file:///D:/python/fastapi-speaker-extractor/app/services/audio_processor.py#L127-L302) 函数,确保处理过程中设备一致性

    - 修改 [process_audio](file:///D:/python/fastapi-speaker-extractor/app/services/audio_processor.py#L719-L801) 函数,使用设备中间件的设备

    3. **创建辅助工具函数**:

    - 在 [audio_utils.py](file:///D:/python/fastapi-speaker-extractor/app/utils/audio_utils.py) 中添加设备管理函数

    - 在 [embedding_utils.py](file:///D:/python/fastapi-speaker-extractor/app/utils/embedding_utils.py) 中添加嵌入向量设备管理函数

    - 在 [model_loader.py](file:///D:/python/fastapi-speaker-extractor/app/utils/model_loader.py) 中添加模型设备管理函数

    - 在 [onnx_model_loader.py](file:///D:/python/fastapi-speaker-extractor/app/utils/onnx_model_loader.py) 中添加ONNX模型设备适配

    ### 方案优势

    1. **统一设备管理**:所有模型和张量都使用同一个设备管理器,避免了设备不一致的问题

    2. **易于维护**:当需要更改设备时,只需在中间件中修改,无需更改所有相关代码

    3. **兼容性好**:支持CPU、CUDA等多种设备类型...

    立即注册
    更新于:2025-08-26 01:31:33

    腾讯元宝推荐的项目结构(音频处理项目)

    fastapi-speaker-extractor/

    ├── app/

    │ ├── api/

    │ │ ├── endpoints.py # 一般的 API 路由

    │ │ ├── audio_router.py # 音频处理相关的 API 路由

    │ │ └── __init__.py

    │ ├── services/

    │ │ ├── audio_processor.py # 音频处理逻辑,如提取、相似度计算

    │ │ ├── audio_dataset.py # 自定义 Dataset 类

    │ │ ├── audio_model.py # PyTorch 模型定义

    │ │ ├── data_loader.py # 数据加载与预处理逻辑

    │ │ ├── train_model.py # 模型训练逻辑

    │ │ └── __init__.py

    │ ├── schemas/

    │ │ ├── api_schemas.py # Pydantic 模型定义

    │ │ └── __init__.py

    │ ├── utils/

    │ │ ├── custom_logger.py # 自定义日志记录器

    │ │ ├── helpers.py # 其他辅助函数

    │ │ └── __init__.py

    │ ├── main.py # FastAPI 应用入口

    │ ├── __init__.py

    │ └── static/ # 静态文件(如需要)

    ├── data/

    │ ├── mixed/

    │ ├── target_pure/

    │ ├── extracted/

    │ ├── embeddings/

    │ ├── labels/

    │ └── models/ # 训练好的模型保存位置

    ├── tests/ # 测试代码

    │ ├── __init__.py

    │ └── test_api.py # 示例测试文件

    ├── requirements.txt # 项目依赖

    ├── README.md # 项目说明

    └── .gitignore # Git 忽略规则

    三、各文件夹的职责说明

    1. 1.app/api/
      • endpoints.py: 定义一般的 API 路由,如说话人提取的通用接口。
      • audio_router.py: 定义与音频处理相关的 API 路由,如提取目标说话人声音、语音转文字、训练模型相关接口。
      • __init__.py: 使api成为一个 Python 包。
    2. 2.app/services/
      • audio_processor.py: 包含音频处理的业务逻辑,如调用 SpeechBrain 进行相似度计算、音频分割、提取等。
      • audio_dataset.py: 定义自定义的 PyTorchDataset类,用于加载和处理训练数据。
      • audio_model.py: 定义 PyTorch 模型架构,如 CNN 模型。
      • data_loader.py: 包含数据加载与预处理的逻辑,如创建DataLoader、数据转换等。
      • train_model.py: 包含模型训练的逻辑,如训练循环、损失计算、优化器更新等。
      • __init__.py: 使services成为一个 Python 包。
    3. 3.app/schemas/
      • api_schemas.py: 定义 Pydantic 模型,用于请求和响应的数据验证与序列化。
      • __init__.py: 使schemas成为一个 Python 包。
    4. 4.app/utils/
      • custom_logger.py: 自定义日志记录器的实现。
      • helpers.py: 其他辅助函数,如文件操作、路径处理等。
      • __init__.py: 使utils成为一个 Python 包。
    5. 5.app/main.py
      • FastAPI 应用的入口文件,包含应用初始化、路由注册、事件处理等。
    6. 6.data/
      • 存放所有与数据相关的文件,如混合音频、目标纯净音频、提取的音频、嵌入向量、标签文件和训练好的模型。
      • models/: 用于保存训练好的 PyTorch 模型。
    7. 7.tests/
      • 存放测试代码,确保各个模块的功能正确性。
      • test_api.py: 示例测试文件,测试 API 路由。
    8. 8.requirements.txt
      • 列出项目所需的 Python 包及其版本,便于环境部署和依赖管理。
    9. 9.README.md
      • 项目说明文档,包括项目介绍、安装步骤、使用指南等。
    10. 10..gitignore
      • 指定 Git 忽略的文件和目录,如虚拟环境目录、缓存文件等。

    四、关于data_loader.py等模块的放置

    根据上述推荐的项目结构:...

    立即注册
    更新于:2025-08-26 01:38:31

    音频处理项目fse

    安装好了anaconda软件后,先按国内的镜像源,可以用清华的镜像源,

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

    设置好镜像源后,执行下面命令

    conda create -n fse python=3.11

    直连的用这个命令速度更快

    conda create -n fse -c https://conda.anaconda.org/conda-forge --override-channels python=3.11

    conda activate fse

    pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu128

    说明cu128就是安装的torch torchaudio torchvision对应支持的CUDA版本12.8,如果你的显卡驱动支持CUDA12.8 或更高,你都可以安装cu128,如果你显卡驱动只支持CUDA12.6那就安装

    pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu126

    现在测试的是cu128和cu126都可以,cu129安装了后再安装下面的其他扩展,会有些扩展安装不上

    所以建议安装 torch torchaudio torchvision的cu128或cu126

    pip3 install fastapi speechbrain uvicorn pydantic python-multipart librosa soundfile pydub scipy pillow python-dotenv pytest httpx onnxruntime

    pip3 install pydantic_setting (如果pip安装失败尝试用conda安装)

    conda install pydantic_setting (如果还是失败,网络先直连然后用conda-forge频道安装)

    用这下面个命令

    conda install -c https://conda.anaconda.org/conda-forge --override-channels pydantic-settings

    为确保datasets和modelscope兼容,请用以下命令安装确定版本

    pip install datasets==2.18.0

    pip install modelscope==1.11.0

    之后设置huggingface的主目录和缓存目录(不设置默认是C盘的,后面重装系统又要重新下载模型)

    Win10系统下环境搭建

    安装提示:此项目不要安装whisperx
    ModelScope 与 numpy 2.x 冲突是官方已知 issue,
    在 单一环境 里 无法同时满足 whisperx 与 ModelScope。
    最稳妥:把声纹功能放到独立环境或改用 SpeechBrain。

    安装好了anaconda软件后,先按国内的镜像源,可以用清华的镜像源,设置好镜像源后,执行下面命令
    conda create -n fse python=3.11
    直连的用这个命令速度更快
    conda create -n fse -c https://conda.anaconda.org/conda-forge --override-channels python=3.11
    conda activate fse
    pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu128
    说明cu128就是安装的torch torchaudio torchvision对应支持的CUDA版本12.8,如果你的显卡驱动支持CUDA12.8 或更高,你都可以安装cu128,如果你显卡驱动只支持CUDA12.6那就安装
    pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu126
    现在测试的是cu128和cu126都可以,cu129安装了后再安装下面的其他扩展,会有些扩展安装不上
    所以建议安装 torch torchaudio torchvision的cu128或cu126
    pip3 install fastapi speechbrain uvicorn pydantic python-multipart  librosa  soundfile pydub scipy pillow  python-dotenv pytest httpx datasets
    pip3 install pydantic_setting (如果pip安装失败尝试用conda安装)
    conda install pydantic_setting ( 
    直连的用这个命令
    conda install -c https://conda.anaconda.org/conda-forge --override-channels pydantic-settings
    
    
    之后设置huggingface的主目录和缓存目录(不设置默认是C盘的,后面重装系统又要重新下载模型)
    

    训练代码

    import os
    import torch
    import torch.nn as nn
    import torch.optim as optim
    from torch.utils.data import DataLoader
    from tqdm import tqdm
    from app.services.audio_dataset import SpeakerExtractionDataset  # 导入数据集类
    from app.services.audio_model import SpeakerExtractionCNN1D  # 导入模型类
    # 参数配置
    DATA_DIR = 'data/embeddings'  # 数据目录
    LABELS_DIR = 'data/labels'    # 标签目录
    EMBEDDING_DIR = 'data/embeddings'  # 嵌入目录
    BATCH_SIZE = 16
    EPOCHS = 20
    LEARNING_RATE = 0.001
    MODEL_SAVE_PATH = 'models/speaker_extraction_model.pth'
    EMBEDDING_DIM = 192  # 根据您的嵌入维度调整
    # 设备配置
    device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    print(f"使用设备: {device}")
    # 创建 Dataset 和 DataLoader
    dataset = SpeakerExtractionDataset(
        data_dir=DATA_DIR,
        labels_dir=LABELS_DIR,
        embedding_dir=EMBEDDING_DIR,
        transform=None
    )
    dataloader = DataLoader(
        dataset,
        batch_size=BATCH_SIZE,
        shuffle=True
    )
    # 初始化模型
    model = SpeakerExtractionCNN1D(input_dim=1).to(device)  # 根据特征维度调整 input_dim
    # 损失函数和优化器
    criterion = nn.MSELoss()  # 回归任务,若为分类任务可改为 nn.CrossEntropyLoss()
    optimizer = optim.Adam(model.parameters(), lr=LEARNING_RATE)
    # 训练循环
    for epoch in range(EPOCHS):
        model.train()  # 设置模型为训练模式
        running_loss = 0.0
        for features, labels in tqdm(dataloader, desc=f"Epoch {epoch+1}/{EPOCHS}"):
            features = features.to(device)  # 将特征移动到设备
            labels = labels.to(device)      # 将标签移动到设备
            # 前向传播
            outputs = model(features)
            loss = criterion(outputs, labels)  # 计算损失
            # 反向传播和优化
            optimizer.zero_grad()  # 清零梯度
            loss.backward()        # 反向传播
            optimizer.step()       # 更新参数
            running_loss += loss.item() * features.size(0)  # 累加损失
        # 计算每个 epoch 的平均损失
        epoch_loss = running_loss / len(dataloader.dataset)
        print(f"Epoch {epoch+1}/{EPOCHS}, Loss: {epoch_loss:.4f}")
    # 保存模型
    torch.save(model.state_dict(), MODEL_SAVE_PATH)
    print(f"模型已保存到 {MODEL_SAVE_PATH}")
    

    . 代码说明

    • •数据集与数据加载器: 使用SpeakerExtractionDataset类加载数据,并通过DataLoader进行批处理和打乱。
    • •模型初始化: 初始化SpeakerExtractionCNN1D模型,并将其移动到相应的设备(GPU 或 CPU)。
    • •损失函数与优化器: 使用均方误差损失(MSE)进行回归任务,您可以根据需要更改为分类任务的损失函数。
    • •训练循环: 在每个 epoch 中,遍历数据加载器,进行前向传播、损失计算、反向传播和参数更新。使用tqdm显示训练进度。
    • •模型保存: 训练完成后,将模型参数保存到指定路径。

    5. 其他注意事项

    • •特征与标签: 确保在SpeakerExtractionDataset中正确加载和处理特征与标签。如果使用不同的特征(如嵌入向量),请相应调整模型输入维度。
    • •模型选择: 根据您的任务需求(回归或分类),选择合适的模型和损失函数。
    • •超参数调整: 根据实验结果调整学习率、批次大小和训练轮数等超参数,以获得更好的模型性能。

    通过上述步骤,您可以将audio_dataset.py和audio_model.py整合在一起,并编写train_audio_model.py进行模型训练。这样,您就能够利用反馈机制,训练一个模型来提高目标说话人声音提取的准确性。 ...

    立即注册
    更新于:2025-08-27 15:03:13

    各种python 相关命令

    torch.cuda.is_available()命令行查看cuda的命令

    命令行(CMD / Anaconda Prompt)里直接敲:

    python -c "import torch; print(torch.cuda.is_available())"
    

    返回 True 表示 CUDA 可用,False 表示不可用。


    conda create -n my -c https://conda.anaconda.org/conda-forge --override-channels mamba
    

    用conda-forge的官方源安装 环境变量名是my的mamba环境 20250826 0712


    激活环境后,没装python装python,装了python的话直接执行

    pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu129
    

    具体根据你显卡驱动的cuda版本 cu129就是cuda12.9

    如果是做音频处理,建议按下面这些扩展

    pip3 install fastapi uvicorn pydantic python-multipart  librosa  soundfile pydub scipy pillow  python-dotenv pytest httpx
    

    20250828 0720

    报错


    Collecting anyio<5,>=3.6.2 (from starlette<0.48.0,>=0.40.0->fastapi)
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl (100 kB)
    Collecting starlette<0.48.0,>=0.40.0 (from fastapi)
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f7/1f/b876b1f83aef204198a42dc101613fefccb32258e5428b5f9259677864b4/starlette-0.47.2-py3-none-any.whl (72 kB)
    Collecting pydantic-core==2.33.2 (from pydantic)
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a0/75/4a0a9bac998d78d889def5e4ef2b065acba8cae8c93696906c3a91f310ca/pydantic_core-2.33.2-cp313-cp313-win_amd64.whl (2.0 MB)
         ---------------------------------------- 2.0/2.0 MB 2.3 MB/s  0:00:00
    Collecting pydantic
      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6a/c0/ec2b1c8712ca690e5d61979dee872603e92b8a32f94cc1b72d53beab008a/pydantic-2.11.7-py3-none-any.whl (444 kB)
    ERROR: Ignored the following versions that require a different python version: 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11; 1.10.0 Requires-Python >=3.8,<3.12; 1.10.0rc1 Requires-Python >=3.8,<3.12; 1.10.0rc2 Requires-Python >=3.8,<3.12; 1.10.1 Requires-Python >=3.8,<3.12; 1.11.0 Requires-Python >=3.9,<3.13; 1.11.0rc1 Requires-Python >=3.9,<3.13; 1.11.0rc2 Requires-Python >=3.9,<3.13; 1.11.1 Requires-Python >=3.9,<3.13; 1.11.2 Requires-Python >=3.9,<3.13; 1.11.3 Requires-Python >=3.9,<3.13; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 1.26.0 Requires-Python >=3.9,<3.13; 1.26.1 Requires-Python >=3.9,<3.13; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.7.2 Requires-Python >=3.7,<3.11; 1.7.3 Requires-Python >=3.7,<3.11; 1.8.0 Requires-Python >=3.8,<3.11; 1.8.0rc1 Requires-Python >=3.8,<3.11; 1.8.0rc2 Requires-Python >=3.8,<3.11; 1.8.0rc3 Requires-Python >=3.8,<3.11; 1.8.0rc4 Requires-Python >=3.8,<3.11; 1.8.1 Requires-Python >=3.8,<3.11; 1.9.0 Requires-Python >=3.8,<3.12; 1.9.0rc1 Requires-Python >=3.8,<3.12; 1.9.0rc2 Requires-Python >=3.8,<3.12; 1.9.0rc3 Requires-Python >=3.8,<3.12; 1.9.1 Requires-Python >=3.8,<3.12; 3.3.0 Requires-Python >=3.9,<3.13; 3.3.1 Requires-Python >=3.9,<3.13; 3.3.2 Requires-Python >=3.9,<3.13; 3.3.3 Requires-Python >=3.9,<3.13; 3.3.4 Requires-Python >=3.9,<3.13; 3.4.0 Requires-Python >=3.9,<3.13; 3.4.1 Requires-Python >=3.9,<3.13; 3.4.2 Requires-Python >=3.9,<3.13
    ERROR: Could not find a version that satisfies the requirement ctranslate2==4.4.0 (from whisperx) (from versions: 4.6.0)
    ERROR: No matching distribution found for ctranslate2==4.4.0
    (fse) D:\python\fastapi-speaker-extractor>
    (fse) D:\python\fastapi-speaker-extractor>python --version
    Python 3.13.5
    (fse) D:\python\fastapi-speaker-extractor>
    

    20250826 0747...

    立即注册
    更新于:2025-08-26 07:48:02

    python 报错 SyntaxError: 'return' outside function

    {

    "1b38f5a6230ac636944ef3df2a7b18a9aec530f931fed681d942267186102368": {

    "short_code": "1uqjLT",

    "label": 0.0,

    "filepath": "outputs\\preprocessed\\1b38f5a6230ac636944ef3df2a7b18a9aec530f931fed681d942267186102368.wav",

    "created_at": "2025-08-26T10:23:35.373116+08:00"

    },

    "0386ab79e9163b22a2b5e25a84d3443d79b5cc08d7f26d87da3bc68de8340544": {

    "short_code": "1uqcmD",

    "label": 0.67,

    "filepath": "outputs\\preprocessed\\0386ab79e9163b22a2b5e25a84d3443d79b5cc08d7f26d87da3bc68de8340544.wav",

    "created_at": "2025-08-26T03:22:45.509993+08:00"

    },

    "856616252eccfa58e713998fdeaaf8a2acbd896d15977bf780884ca73635cc76": {

    "short_code": "1uqiqv",

    "label": 0.0,

    "filepath": "outputs\\preprocessed\\processed_tmpo9v0me_w_1uqiqv.wav",

    "created_at": "2025-08-26T09:52:01.721592+08:00"

    }

    }

    2025-08-26 09:14:02,637 --- app.api.audio_router --- ERROR --- 处理音频时发生错误:

     "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 75
        return
        ^
    SyntaxError: 'return' outside function
    2025-08-26 09:14:02,631 --- app.api.audio_router --- WARNING --- 无法从主应用获取模型: WhisperX 模型未加载
    2025-08-26 09:14:02,631 --- app.api.audio_router --- INFO --- 未提供配置参数,使用默认配置
    2025-08-26 09:14:02,632 --- app.api.audio_router --- INFO --- 收到请求,文件=西游记多人16秒.wav,config={}
    2025-08-26 09:14:02,637 --- app.api.audio_router --- ERROR --- 处理音频时发生错误:
    Traceback (most recent call last):
      File "D:\python\fastapi-speaker-extractor\app\api\audio_router.py", line 72, in extract_speaker
        from app.services.audio_processor import process_audio
      File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 75
        return
        ^
    SyntaxError: 'return' outside function
    

    Traceback (most recent call last):

    File "D:\python\fastapi-speaker-extractor\app\api\audio_router.py", line 72, in extract_speaker

    from app.services.audio_processor import process_audio

    File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 75

    return

    ^

    # 导入自定义模块
    try:
        from logger import logger
        from app.utils.embedding_model_middleware import get_embedding_middleware, ModelType
        from app.utils.onnx_model_loader import ONNXPyannoteEmbedding
        from app.utils.error_handler import ErrorHandler
    except ImportError as e:
        print(f"导入工具模块失败: {e}")
        return
    

    代码 return的这个写法不知道是错哪里了。


    通义灵码:

    到目前为止,我们已经解决了以下几个问题:

    JSON解析错误 - 通过将 config_value 参数改为可选并改进解析逻辑

    类型注解兼容性问题 - 通过使用 Union[Path, str] 替代 Path | str 以支持 Python 3.8+

    模型加载问题 - 通过修改模型加载逻辑确保默认加载

    目录创建问题 - 通过将字符串路径转换为 Path 对象

    现在您的应用程序应该能够正常处理音频文件了。


    20250826 0926

    G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\pydub\audio_segment.py:678: RuntimeWarning: coroutine 'UploadFile.seek' was never awaited
      file.seek(0)
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback
    G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\pydub\audio_segment.py:678: RuntimeWarning: coroutine 'UploadFile.read' was never awaited
      file.seek(0)
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback
    G:\ProgramData\miniconda3\envs\speaker-extractor\lib\site-packages\pydub\utils.py:268: RuntimeWarning: coroutine 'UploadFile.seek' was never awaited
      file.seek(0)
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback
    2025-08-26 09:26:28,638 --- fastapi-speaker-extractor --- ERROR --- ❌ 处理音频时发生错误: a bytes-like object is required, not 'coroutine'
    Traceback (most recent call last):
      File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 148, in process_audio
    

    22222222

    2025-08-26 09:29:05,415 --- fastapi-speaker-extractor --- INFO --- 📊 计算目标说话人占比
    ✅ [缓存命中] 从缓存加载目标说话人 embedding: inputs/target_reference/target_reference_embedding\121e918b12035ef25024d8d9e2c8f39b.npy
    🎧 正在分析音频,总长度: 3.00 秒,分段长度: 1.5 秒
    2025-08-26 09:29:05,422 --- fastapi-speaker-extractor --- ERROR --- ❌ 处理音频时发生错误: 'float' object cannot be interpreted as an integer
    Traceback (most recent call last):
    

    222222222222

    2025-08-26 09:30:22,560 --- fastapi-speaker-extractor --- INFO --- 临时文件已清理: C:\Users\ADMINI~1\AppData\Local\Temp\tmpybyujt8p.wav
    2025-08-26 09:30:22,561 --- app.api.audio_router --- ERROR --- 处理音频时发生错误:
    Traceback (most recent call last):
      File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 188, in process_audio
        proportion = calculate_target_proportion(
      File "D:\python\fastapi-speaker-extractor\app\utils\audio_utils.py", line 118, in calculate_target_proportion
        for i in range(num_segments):
    TypeError: 'float' object cannot be interpreted as an integer
    

    33333

        raise RuntimeError(f"音频处理失败: {str(e)}")
    RuntimeError: 音频处理失败: 'WindowsPath' object has no attribute 'cpu'
    INFO:     127.0.0.1:14903 - "POST /api/audio/speaker/extract/ HTTP/1.1" 500 Internal Server Error                                                                                         
    ERROR:    Exception in ASGI application
    Traceback (most recent call last):
      File "D:\python\fastapi-speaker-extractor\app\services\audio_processor.py", line 223, in process_audio
        sha256_hash=compute_audio_sha256(output_filepath),
      File "D:\python\fastapi-speaker-extractor\app\utils\common_utils.py", line 208, in compute_audio_sha256
        audio_np = audio_tensor.cpu().numpy()  # 转 CPU 并转为 NumPy
    AttributeError: 'WindowsPath' object has no attribute 'cpu'
    

    5555555 ...

    立即注册
    更新于:2025-08-26 10:37:20

    python常用命令

    python -m app.services.batch_process

    1. 打开 PowerShell(Win+X → Windows PowerShell)。
    2. 执行下面两条命令,一行一回车:
    # 如果 profile 文件不存在,先自动创建
    if (!(Test-Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force }
    
    # 把激活 fse311 的语句写进去(不会重复写入)
    Add-Content -Path $PROFILE -Value 'conda activate fse311'
    


    ...

    立即注册
    更新于:2025-08-26 11:59:52

    腾讯编程助手

    我已经成功修复了batch_process.py文件中的问题。主要修复包括:

    1. 修复了模块导入问题:添加了项目根目录到sys.path,确保Python能够找到app模块
    2. 移除了不存在的装饰器:删除了@gpu_memory_monitor装饰器调用
    3. 修复了函数参数不匹配:调整了process_single_file函数的参数
    4. 添加了错误处理:为文件处理和批量处理添加了try-catch块
    5. 添加了目录检查:检查输入目录是否存在,避免运行时错误
    6. 修复了类型注解:将dict改为dict[str, any]

    现在batch_process.py应该能够正常运行了。主要的错误"cannot access local variable 'mixed_dialogue'"已经在audio_processor.py中修复,而batch_process.py的结构和导入问题也已经解决。 20250826 1224...

    立即注册
    更新于:2025-08-26 12:24:29

    python一些扩展兼容安装的处理方案

    这里把踩过坑记录下,目的为了节省python的扩展环境的时间,提高效率

    即使有了腾讯元宝和Kimi这样的AI智能回答工具,还是要花不少时间才能找到解决方案

    为确保datasets和modelscope兼容,请用以下命令安装确定版本...

    立即注册
    更新于:2025-08-27 15:07:21
    相关内容

    AI和Python 学习整理

    AudioSeparationGUI 对输入的音频,自动根据说话人进行分类 20250817

    SoloSpeech 项目安装和运行测试 20250817

    python 多项目部署 优先考虑用Anaconda

    espnet 声音分离

    ClearerVoice-Studio 安装测试遇到的问题,安装pysptk一直失败

    uvr5 bs roformer 爆显存以及关于huggingface的国内镜像hf-mirror.com

    用Kimi编程

    Studio One 调试插件Techivation AI-Rack 一键智能混音

    在hf-mirror.com模型镜像站用代码下载模型遇到报错 speaker-diarization模型不...

    用腾讯元宝编程

    Conda国内镜像源

    数字对象标识符 (DOI)

    在创建conda环境时,如果不指定Python版本,conda将不会默认安装Python。

    whisperx 的使用 音频处理

    Win10系统 Trae的使用 关于powershell报错: 因为在此系统上禁止运行脚本

    warp的使用

    AI编程工具比较

    FastApi

    SQL 学习整理

    SQL中EXISTS的使用

    Yii2报错没有关联命名 common\models\Post has no relation named

    SQL常用语句

    SQL复杂查询(案例一)

    Sql常用查询操作

    【知乎】从零学会SQL:复杂查询

    sql查询两张表中不同的数据

    php知识点学习整理

    PHP preg_quote() 函数

    PHP str_ireplace() 函数

    查看php位置

    php7.4 查看版本

    PHP提示 cURL error 60: SSL certificate problem: unable to get loca...

    php过滤表单输入的emoji表情

    PHP 中英文混排截取字符串 (用php自带的函数,简单效果又好)

    PHP的源代码BUG整理

    php如何查看扩展是否开启

    linux下安装php的Exif扩展笔记!(用LNMP一键安装脚本安装的php)

    configure: error: Cannot find ldap.h 解决方法

    一个PHP针对数字的加密解密类

    php的Memcache addServer 后set失败

    PHP8 报错Required parameter $r follows optional parameter

    php执行shell不阻塞方法

    CURL超时时间设置

    常用的网络协议学习整理

    HTTP/1.1 302 Found(PHP的get_headers()函数验证链接是否有效)

    HTTP/1.0 200 OK(PHP的get_headers()函数验证链接是否有效)

    推荐内容

    怎样使用V2Ray代理和SSTap玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩...

    sstap游戏代理教程 从此玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩虹六...

    BT磁力搜索网站汇总和找不到的资源

    什么是磁力链接,您如何使用?

    Z-Library:全球最大的数字图书馆/含打不开的解决方案/镜像

    使用V2Ray的mKCP协议加速游戏

    v2rayN已停止工作

    【车险课堂】什么是无赔款优待系数ncd,你“造”吗?