getVoiceCloneStatus
Check the status of a voice cloning task by providing the speaker ID to monitor progress and completion.
Instructions
#工具说明:根据声音克隆任务的发音人ID,查询该任务目前的状态。
样例1:
用户输入:查一下id为xxx的声音克隆好了没有。 思考过程: 1.用户想要查询声音克隆任务的状态,需要使用“getVoiceCloneStatus”工具。 2.工具需要参数,isSuccess,perId两个参数。 3.用户提到了ID为xxx,所以perid的值为xxx,现在不清楚这个任务的状态,所以isSuccess的值为false。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| perId | No | 音色克隆任务的ID |
Implementation Reference
- The main handler function for the 'getVoiceCloneStatus' tool. It takes a perId parameter, fetches the DH API client, calls voice_clone_status on it, and returns the status or an error response.
async def getVoiceCloneStatus( perId: Annotated[str, Field(description="音色克隆任务的ID", default=None)] ) -> MCPVoiceCloneStatusResponse: """ Retrieve the status of a voice clone task via the DH API. Args: perId: 音色克隆任务的ID Returns: 任务状态 """ try: client = await getDhClient() ret = await client.voice_clone_status(perId) return ret except Exception as e: return MCPVoiceCloneStatusResponse(error=str(e)) - src/mcp_server_baidu_digitalhuman/dhserver.py:556-568 (registration)The @mcp.tool decorator that registers the 'getVoiceCloneStatus' tool with its name and description, including usage examples.
@mcp.tool( name="getVoiceCloneStatus", description=( """ #工具说明:根据声音克隆任务的发音人ID,查询该任务目前的状态。 # 样例1: 用户输入:查一下id为xxx的声音克隆好了没有。 思考过程: 1.用户想要查询声音克隆任务的状态,需要使用“getVoiceCloneStatus”工具。 2.工具需要参数,isSuccess,perId两个参数。 3.用户提到了ID为xxx,所以perid的值为xxx,现在不清楚这个任务的状态,所以isSuccess的值为false。 """) ) - Input schema defined by the Annotated parameter for perId and output type MCPVoiceCloneStatusResponse.
perId: Annotated[str, Field(description="音色克隆任务的ID", default=None)] ) -> MCPVoiceCloneStatusResponse: