nex_basse/openapi.json

1 line
15 KiB
JSON
Raw Normal View History

2026-03-02 10:26:22 +00:00
{"openapi":"3.1.0","info":{"title":"iMeeting 语音识别模型服务","description":"高性能语音识别服务,为 iMeeting 会议系统提供实时语音转写、声纹识别和离线文件分析功能。","version":"2.0.0"},"paths":{"/api/docs/websocket":{"post":{"tags":["WebSocket文档"],"summary":"Websocket Protocol Doc","description":"WebSocket 协议文档 (仅用于 Swagger UI 展示)。\n\n该接口定义了 WebSocket 通信的 JSON 数据结构。\n实际的 WebSocket 连接地址为 `ws://<host>/`。\n\n**客户端消息字段 (输入):**\n- `mode`: 控制模式 (2pass, online, register, 等)\n- `is_speaking`: VAD 状态标记\n- `hotwords`: 更新热词\n- `use_spk_id`: 开启/关闭声纹识别\n\n**服务端响应字段 (输出):**\n- `text`: 语音识别结果\n- `timestamp`: 词/句时间戳\n- `speaker`: 识别到的说话人\n- `is_final`: 识别状态标识 (True: 最终结果/句尾, False: 正在识别/中间结果)\n- `status`: 任务状态 (processing/completed/failed)","operationId":"websocket_protocol_doc_api_docs_websocket_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WSClientMessage"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WSServerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/speakers":{"get":{"tags":["声纹管理"],"summary":"Get Speakers","description":"获取已注册声纹列表 (支持分页)。\nGet list of registered speakers (supports pagination).","operationId":"get_speakers_api_speakers_get","parameters":[{"name":"pageNum","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"页码 (默认 1)","default":1,"title":"Pagenum"},"description":"页码 (默认 1)"},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"description":"每页数量 (默认 20)","default":20,"title":"Pagesize"},"description":"每页数量 (默认 20)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["声纹管理"],"summary":"Register Speaker","description":"注册新声纹 (通过上传文件)。\nRegister a new speaker (via file upload).","operationId":"register_speaker_api_speakers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakerRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["声纹管理"],"summary":"Remove Speaker","description":"删除已注册的声纹。\nDelete a registered speaker.","operationId":"remove_speaker_api_speakers_delete","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","description":"要删除的说话人名称","title":"Name"},"description":"要删除的说话人名称"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/speakers/{name}":{"put":{"tags":["声纹管理"],"summary":"Update Speaker","description":"更新已存在的声纹 (重新录入)。\nUpdate an existing speaker (re-recording).","operationId":"update_speaker_api_speakers__name__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakerRegisterRequest"}}}},"responses":{"200":{"description":"Successful Res