- 语音:序数解析(第一个/第二个等)、解析失败计数与 API detail.retry_remaining; 百度 ASR 固定 dev_pid 为普通话;SurgeryPipelineError 支持 extra 并入 HTTP detail。 - Demo:demo 路由与假 RTSP、客户端 index 与 README;BackendResolver 与配置调整。 - 可观测:消耗 TSV 日志、语音文件日志、终端 Markdown 辅助;相关测试与依赖更新。 - 注意:.env 仍被 gitignore,本地密钥不会进入本提交。 Made-with: Cursor
22 lines
485 B
Python
22 lines
485 B
Python
"""Errors surfaced by the surgery recording / result pipeline."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
|
|
class SurgeryPipelineError(Exception):
|
|
"""录制未能按约定完成启动或停止。"""
|
|
|
|
def __init__(
|
|
self,
|
|
code: str,
|
|
message: str,
|
|
*,
|
|
extra: dict[str, Any] | None = None,
|
|
) -> None:
|
|
self.code = code
|
|
self.message = message
|
|
self.extra = extra
|
|
super().__init__(message)
|