Skip to content

[Bug] 音频识别:OOM崩溃后文件上传链路永久损坏 + 兼容模式接口间歇403 #600

Description

@ch12chloe-pixel

环境

  • Operit AI Android 最新版
  • 阿里云百炼 DashScope (qwen3.5-omni-plus)
  • 用户API Key余额充足(996,666/1,000,000)

Bug 1:文件上传链路OOM导致永久损坏 🔴 严重

复现步骤

  1. 使用 aliyun_omni_stt 转写插件处理46MB音频文件(实为MP4视频改后缀名)
  2. 软件内存解码时膨胀至247MB
  3. 触发 OOM 崩溃:
    java.lang.OutOfMemoryError: Failed to allocate a 247748488 byte allocation 
    with 25165824 free bytes and 199MB until OOM
    
  4. OOM后所有音频识别功能永久失效,即使换用266KB正常mp3,仍报错:
    InternalError.Algo.InvalidParameter: The provided URL does not appear to be valid.
    
  5. 卸载重装Operit无效
  6. 同一音频通过DashScope原生接口(base64 data URL)正常识别 ✅

推测根因

Operit的音频文件上传链路将音频完整解码到内存后再处理,大文件导致OOM。OOM后文件上传服务进程被系统杀死,且无法自动恢复。重装后问题仍存在,可能是代码层面未正确处理OOM后的状态恢复。

建议修复

  • 音频文件上传改用流式上传或base64 data URL直传,避免内存中完整解码
  • DashScope原生多模态接口支持 data:audio/{format};base64,... 格式
  • 验证:设置→模型→音频识别→测试连接阿里云omni模型 → 始终"API连接失败",同一配置对话功能正常

Bug 2:兼容模式接口间歇403 🟡

复现步骤

  1. 阿里云配置绑定 qwen3.5-omni-plus(用户Key)
  2. 通过兼容模式接口 (compatible-mode/v1/chat/completions) 调用
  3. 间歇性403 "free tier exhausted"
  4. 6月11日统计:33次调用中20次失败
  5. 同一Key通过DashScope原生接口正常 ✅

推测

兼容模式接口可能存在独立的免费层配额,耗尽后未正确fallback到付费余额。


补充

以上两个bug叠加导致:同一模型配置下,对话功能正常但音频识别功能完全不可用。已在百炼控制台确认成功和失败调用记录(同一Key)。当前临时绕过方案:直接调用DashScope原生多模态接口传base64 data URL。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions