tencent cloud

Feedback

DescribeTaskDetail

Last updated: 2023-12-04 16:14:02

    1. API Description

    Domain name for API request: ams.tencentcloudapi.com.

    This interface is used to view the detailed information of the audio moderation tasks, including task status, detection results, corresponding text content recognized from the audio file, recommended follow-up operations of the maliciousness tags corresponding to the detection results, and so on. For specific output content, see the output parameter examples.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: DescribeTaskDetail.
    Version Yes String Common Params. The value used for this API: 2020-12-29.
    Region No String Common Params. This parameter is not required for this API.
    TaskId Yes String This field indicates the task ID (in the Results parameter) returned after an audio moderation task is created. It is used to identify the moderation task for which to query the details.

    Note: the query API can query up to 20 tasks at a time.
    ShowAllSegments No Boolean This boolean field indicates whether to display all audio segments. Valid values: True (yes), False (display only audio segments that hit the moderation rule). Default value: False.

    3. Output Parameters

    Parameter Name Type Description
    TaskId String
    Note: this field may return null, indicating that no valid values can be obtained.
    DataId String
    Note: this field may return null, indicating that no valid values can be obtained.
    BizType String
    Note: this field may return null, indicating that no valid values can be obtained.
    Name String
    Note: this field may return null, indicating that no valid values can be obtained.
    Status String
    Note: this field may return null, indicating that no valid values can be obtained.
    Type String
    Note: this field may return null, indicating that no valid values can be obtained.
    Suggestion String
    Note: this field may return null, indicating that no valid values can be obtained.
    Labels Array of TaskLabel
    Note: this field may return null, indicating that no valid values can be obtained.
    InputInfo InputInfo
    Note: this field may return null, indicating that no valid values can be obtained.
    AudioText String
    Note: this field may return null, indicating that no valid values can be obtained.
    AudioSegments Array of AudioSegments
    Note: this field may return null, indicating that no valid values can be obtained.
    ErrorType String
    Note: this field may return null, indicating that no valid values can be obtained.
    ErrorDescription String
    Note: this field may return null, indicating that no valid values can be obtained.
    CreatedAt String
    Note: this field may return null, indicating that no valid values can be obtained.
    UpdatedAt String
    Note: this field may return null, indicating that no valid values can be obtained.
    Label String
    Note: this field may return null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Viewing Task Details

    This example shows you how to view the details of a task by TaskId.

    Input Example

    POST / HTTP/1.1
    Host: ams.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTaskDetail
    <Common request parameters>
    
    {
        "TaskId": "task-video-XwxJtbkKXWgCt8AZ"
    }
    

    Output Example

    {
        "Response": {
            "TaskId": "w-audio-X_Qnzci_GulDQ01r",
            "DataId": "",
            "BizType": "202012161",
            "Name": "",
            "Status": "FINISH",
            "Type": "AUDIO",
            "Suggestion": "Review",
            "Labels": [
                {
                    "Label": "Abuse",
                    "Suggestion": "Review",
                    "Score": 0,
                    "SubLabel": ""
                }
            ],
            "InputInfo": {
                "Type": "URL",
                "Url": "https://test.cos.ap-guangzhou.myqcloud.com/porn5.mp3"
            },
            "AudioText": "Audio text",
            "AudioSegments": [
                {
                    "Result": {
                        "HitFlag": 0,
                        "Url": "https://cos.ap-guangzhou.myqcloud.com/0.mp3",
                        "Suggestion": "Pass",
                        "Label": "Normal",
                        "Text": "",
                        "TextResults": [],
                        "MoanResults": [],
                        "LanguageResults": [],
                        "Duration": "60000",
                        "Score": 0,
                        "Extra": "",
                        "SubLabel": ""
                    },
                    "OffsetTime": "0"
                }
            ],
            "ErrorType": "",
            "ErrorDescription": "",
            "CreatedAt": "2021-01-05T08:48:13.069Z",
            "UpdatedAt": "2021-01-05T08:49:31.421Z",
            "RequestId": "34785328532523",
            "Label": "Abuse"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    DryRunOperation DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used.
    FailedOperation The operation failed.
    InternalError An internal error occurred.
    InvalidParameter The parameter is incorrect.
    InvalidParameterValue The parameter value is incorrect.
    LimitExceeded The quota limit is exceeded.
    MissingParameter The parameter is missing.
    OperationDenied The operation was denied.
    RequestLimitExceeded The number of requests exceeds the frequency limit.
    ResourceInUse The resource is in use.
    ResourceInsufficient The resource is insufficient.
    ResourceNotFound The resource does not exist.
    ResourceUnavailable The resource is unavailable.
    ResourcesSoldOut The resources have been sold out.
    UnauthorizedOperation The operation is unauthorized.
    UnknownParameter The parameter is unknown.
    UnsupportedOperation The operation is not supported.