Defines Pydantic request and response schemas for voiceprint registration and identification, enabling voice‑based authentication APIs.
# Source: https://github.com/code-100-precent/LingEcho-App | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
from pydantic import BaseModel
from typing import List, Optional
class VoiceprintRegisterRequest(BaseModel):
"""声纹注册请求模型"""
speaker_id: str
assistant_id: str
class Config:
schema_extra = {"example": {"speaker_id": "user_001", "assistant_id": "assistant_001"}}
class VoiceprintRegisterResponse(BaseModel):
"""声纹注册响应模型"""
success: bool
msg: str
class Config:
schema_extra = {"example": {"success": True, "msg": "已登记: user_001"}}
class VoiceprintIdentifyRequest(BaseModel):
"""声纹识别请求模型"""
speaker_ids: str # 逗号分隔的候选说话人
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key