TypeError: Cannot read properties of undefined (reading ‘map’)

用户在 AnythingLLM Desktop(版本 1.11.1)的 Meeting Assistant 功能中,使用 GPU/CUDA 转录引擎( windows-x64-cuda/tinyscribe.exe )进行会议录音转文字。系统为 Windows 11,NVIDIA GPU(NVIDI

TypeError: Cannot read properties of undefined (reading 'map')

TypeError: Cannot read properties of undefined (reading ‘map’)

快速结论:该报错发生在 AnythingLLM Desktop 的 Meeting Assistant 使用 GPU/CUDA 引擎进行语音转录时。优先检查 CUDA 引擎是否正确下载了所有 ONNX 模型文件,以及是否开启了 Speaker Identification(说话人识别)功能。

问题场景

用户在 AnythingLLM Desktop(版本 1.11.1)的 Meeting Assistant 功能中,使用 GPU/CUDA 转录引擎(windows-x64-cuda/tinyscribe.exe)进行会议录音转文字。系统为 Windows 11,NVIDIA GPU(NVIDIA RTX PRO 500 Blackwell)。开启 Speaker Identification 功能时故障稳定复现。CPU 引擎(windows-x64/tinyscribe.exe)工作正常。

报错原文

master-recording.wav - Transcription failed! TypeError: Cannot read properties of undefined (reading 'map')
    at e.postProcessTranscriptionResponse (..../main/index.js:39:32091)

Error: Master recording transcription file does not exist after conversion!

关键日志序列:

[Tinyscribe] stderr [INFO] pyannote-rs: Using CUDA execution provider (NVIDIA GPU)
[Tinyscribe] stderr [INFO] pyannote-rs: Using CPU execution provider

原因分析

可能原因:CUDA 引擎在初始化后虽然检测到 GPU,但由于模型文件下载不完整(特别是部分 ONNX 文件缺失),导致实际执行时退回到 CPU。在 Speaker Identification 启用的情况下,Tinyscribe 返回的 JSON 响应中 segments 字段缺失(undefined),AnythingLLM 的 postProcessTranscriptionResponse 函数在执行 response.segments.map(...) 时崩溃。

项目维护者指出,CUDA 引擎内部退回到 CPU 是预期的故障转移行为,但模型文件下载不完整是触发该 Bug 的关键。GPU 模式 + Speaker Identification 的组合会暴露这个问题,而纯 CPU 模式不会受影响。

环境排查

  • AnythingLLM Desktop 版本(已知在 1.11.1 上复现)
  • 操作系统:Windows 11
  • NVIDIA 显卡型号及驱动版本
  • CUDA 引擎所在路径下的模型文件完整性(windows-x64-cuda/tinyscribe.exe 同目录下的 ONNX 文件)
  • Meeting Assistant 存储目录(通常在 %APPDATA%/anythingllm-desktop/storage/meeting-assistant/

解决步骤

  1. 检查模型文件完整性:导航到引擎目录(例如 C:\Users\XXXX\AppData\Roaming\anythingllm-desktop\storage\engines\meeting-assistant\windows-x64-cuda\),确认所有必要的 ONNX 模型文件都已完整下载。如果发现文件缺失或大小异常,可以删除该目录并让 AnythingLLM 重新下载。
  2. 关闭 Speaker Identification 进行测试:在 Meeting Assistant 设置中临时禁用 Speaker Identification,仅使用 GPU 引擎进行转录,以确定问题是否与说话人识别功能相关。
  3. 临时切换到 CPU 引擎:如果 GPU 问题无法解决,可以切换到 CPU 引擎(windows-x64/tinyscribe.exe)作为工作绕过方案,该模式已被确认 100% 可靠。
  4. 更新 AnythingLLM:检查是否有更新版本,该问题可能已在后续版本中修复。
  5. 清理并重试:删除对应会议文件夹中因失败产生的残存文件,重新开始转录。

验证方法

执行解决步骤后,在 Meeting Assistant 中重新尝试转录(新会议或对已有会议点击 Retranscribe)。成功时会在会议文件夹中生成 master-recording.json 文件,且日志中不会出现 TypeError: Cannot read properties of undefined (reading 'map') 报错。推荐先用一个短录音进行测试。

参考来源

Mintplex-Labs/anything-llm #5185

GamsGo AI

AI 工具推荐

想把多个 AI 模型放在一个入口?

GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。

了解 GamsGo AI

推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。

celebrityanime
celebrityanime
文章: 7657

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注