2026-04-24 15:33:22 +08:00
|
|
|
|
# 复制为 `.env` 并按环境填写。pydantic-settings 将字段名映射为大写下划线环境变量。
|
|
|
|
|
|
# 启动前须执行 `alembic upgrade head`(`start.sh` / `start_fresh.sh` 已包含)。
|
|
|
|
|
|
# 算法、管线、归档路径、视觉/语音日志等非部署项见 `app/baked/algorithm.py` 与 `app/baked/pipeline.py`。
|
|
|
|
|
|
# 详细说明见 docs/video-backends.md。
|
2026-04-20 17:58:03 +08:00
|
|
|
|
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
# --- PostgreSQL ---
|
2026-04-20 17:58:03 +08:00
|
|
|
|
POSTGRES_USER=postgres
|
|
|
|
|
|
POSTGRES_PASSWORD=postgres
|
|
|
|
|
|
POSTGRES_DB=operation_room
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
POSTGRES_HOST=localhost
|
|
|
|
|
|
POSTGRES_PORT=35432
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# 可选:整串 async DSN(会覆盖与默认一致的 POSTGRES_* 组合时的逻辑,见 Settings)
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
# DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:35432/operation_room
|
|
|
|
|
|
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# --- HTTP(python -m main / 容器等入口)---
|
2026-04-23 20:42:21 +08:00
|
|
|
|
# SERVER_HOST=0.0.0.0
|
|
|
|
|
|
# SERVER_PORT=38080
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# --- Video:RTSP 与按路后端(须与客户端 camera_ids 一致)---
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
# VIDEO_DEFAULT_BACKEND=rtsp
|
|
|
|
|
|
# VIDEO_CAMERA_BACKEND_OVERRIDES_JSON={"or-cam-01":"rtsp","or-cam-02":"hikvision_sdk"}
|
|
|
|
|
|
# VIDEO_RTSP_URLS_JSON_FILE=app/resources/camera_rtsp_urls.sample.json
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# VIDEO_RTSP_URLS_JSON={"or-cam-01":"rtsp://..."}
|
|
|
|
|
|
# VIDEO_RTSP_URL_TEMPLATE=rtsp://user:pass@host:554/path/{camera_id}
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# --- 海康 SDK(Linux x86_64;二进制勿提交仓库)---
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
# HIKVISION_LIB_DIR=/opt/hikvision/lib
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# 可选:单一路径,见 app/services/video/hikvision_runtime.py 直读 HIKVISION_LIB_PATH
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
# HIKVISION_LIB_PATH=
|
|
|
|
|
|
# HIKVISION_SDK_ENABLED=false
|
|
|
|
|
|
# HIKVISION_DEVICE_IP=
|
|
|
|
|
|
# HIKVISION_USER=
|
|
|
|
|
|
# HIKVISION_PASSWORD=
|
|
|
|
|
|
# HIKVISION_CHANNEL=1
|
|
|
|
|
|
# HIKVISION_PREVIEW_RTSP_TEMPLATE=rtsp://{user}:{password}@{ip}:554/Streaming/Channels/101
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# HIKVISION_CAMERA_RTSP_URLS_JSON={}
|
feat: surgery pipeline API, video inference, voice confirm, and tests
- Add FastAPI routes for surgery start/end, results, pending confirmation (WAV upload), and health checks.
- Implement RTSP/Hikvision capture, consumable classification, session manager, MinIO/Baidu voice resolution, and DB persistence.
- Add documentation (client API, video backends, staging checklist) and sample camera/RTSP config.
- Add pytest suite (API contract, session manager, voice, repositories, pipeline persistence) and httpx dev dependency.
- Replace deprecated HTTP_422_UNPROCESSABLE_ENTITY with HTTP_422_UNPROCESSABLE_CONTENT.
- Fix SurgeryPipeline DB reads to use an explicit transaction with autobegin disabled.
Made-with: Cursor
2026-04-21 18:33:54 +08:00
|
|
|
|
# HIKVISION_SDK_FALLBACK_TO_RTSP=true
|
|
|
|
|
|
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# --- 百度(语音:短语音识别 AipSpeech + 在线合成;控制台开通对应能力)---
|
|
|
|
|
|
# BAIDU_APP_ID=
|
|
|
|
|
|
# BAIDU_API_KEY=
|
|
|
|
|
|
# BAIDU_SECRET_KEY=
|
|
|
|
|
|
# 可选
|
|
|
|
|
|
# BAIDU_CONNECTION_TIMEOUT_MS=
|
|
|
|
|
|
# BAIDU_SOCKET_TIMEOUT_MS=
|
|
|
|
|
|
# BAIDU_ASR_DEV_PID=1537
|
2026-04-23 16:09:20 +08:00
|
|
|
|
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# --- MinIO(语音 WAV)---
|
2026-04-23 14:24:20 +08:00
|
|
|
|
# MINIO_ENDPOINT=127.0.0.1:9000
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# MINIO_ACCESS_KEY=
|
|
|
|
|
|
# MINIO_SECRET_KEY=
|
2026-04-23 14:24:20 +08:00
|
|
|
|
# MINIO_BUCKET=operation-room-voice
|
|
|
|
|
|
# MINIO_SECURE=false
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# MINIO_REGION=
|
2026-04-23 14:24:20 +08:00
|
|
|
|
|
2026-04-24 15:33:22 +08:00
|
|
|
|
# --- Demo 客户端 / 一键联调(生产关闭)---
|
2026-04-23 14:24:20 +08:00
|
|
|
|
# DEMO_CORS_ENABLED=true
|
|
|
|
|
|
# DEMO_CORS_ORIGINS=*
|
|
|
|
|
|
# DEMO_ORCHESTRATOR_ENABLED=false
|
|
|
|
|
|
# DEMO_ORCHESTRATOR_RTSP_PORT=18554
|
|
|
|
|
|
# DEMO_ORCHESTRATOR_RTSP_JSON_HOST=host.docker.internal
|