notes(asr): 切片串行 ASR 绕单文件大小限制
deploy notes / build-and-deploy (push) Successful in 3m40s

ASR server 直接 500 拒绝大文件 (15MB / ~15min 4.7s 即返回 500),不是
处理超时。改成:sidecar 装 ffmpeg → /transcribe endpoint 把音频切 60s
段 → 串行调外部 ASR → 拼接 transcript。notes 主容器 call_asr 改成 POST
到 sidecar /transcribe(timeout 1h 给长录音留余地)。

- feishu sidecar Dockerfile + ffmpeg + requests
- server.py 加 TranscribeReq;fallback -c copy 失败时 re-encode AAC
- main.rs 删除 asr_url/asr_token 字段(now sidecar concern)
- k8s manifest: ASR_URL/ASR_TOKEN 从主容器移到 feishu sidecar env
This commit is contained in:
Fam Zheng
2026-05-17 22:38:05 +01:00
parent e5a87cc65f
commit 688ccdc76f
4 changed files with 104 additions and 39 deletions
+3 -2
View File
@@ -4,7 +4,7 @@
FROM node:20-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-markdown ca-certificates curl \
python3 python3-pip python3-markdown ca-certificates curl ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# lark-cli postinstall 调 curl 下二进制,没 curl 会报 spawnSync ENOENT
@@ -12,7 +12,8 @@ RUN npm install -g @larksuite/cli@1.0.29
RUN pip install --no-cache-dir --break-system-packages \
fastapi==0.115.6 \
uvicorn==0.34.0
uvicorn==0.34.0 \
requests==2.32.3
COPY markdown-to-feishu /usr/local/bin/markdown-to-feishu
RUN chmod +x /usr/local/bin/markdown-to-feishu