tencent cloud

Feedback

Live Streaming Audio Auditing Service Event Notification

Last updated: 2024-12-02 11:42:19
    If you have configured an audio moderation callback address, the server will return the moderation results in JSON to the specified callback address after the audio moderation is complete. You can then proceed with subsequent file processing operation based on the callback content.
    This document describes the notification fields of the callback message sent by Tencent Cloud Streaming Services (CSS) to the user after the audio moderation callback event is triggered.

    Note

    Before reading this document, ensure that you have understood how the callback function is configured and callback messages are received in Tencent CSS. For detailed procedures, see How to Receive Event Notifications.
    In streaming audio moderation, only potentially non-compliant results are called back by default, not normal results.

    Audio Moderation Service Event Parameter Description

    Event Type Parameter

    Event Type
    Field Value Description
    Streaming Audio Moderation Service
    event_type = 315

    Common Callback Parameters

    Field Name
    Type
    Description
    t
    int64
    Expiration time. It is the UNIX timestamp signifying the expiration of the event notification signature.
    The default expiration time for message notifications from Tencent Cloud is 10 minutes. If the time designated by the t value in a message notification has expired, the notification is deemed invalid, thereby safeguarding against network replay attacks.
    The format of t is a decimal UNIX timestamp, which is the seconds elapsed from midnight of January 1, 1970 (UTC/GMT).
    sign
    string
    Security signature for event notification: sign = MD5(key + t)
    Tencent Cloud concatenates the encrypted key and t into a string, and then uses MD5 calculation to obtain the sign value, which is then placed in the notification message. After the notification is received, your backend server can determine whether the sign is correct using the same algorithm, thus confirming whether the message comes from Tencent Cloud's backend.
    Note:
    The key is the callback key which is in Feature Configuration > Live Stream Callback and used for authentication. You are advised to specify this field to ensure data security.
    

    Callback Message Parameters

    Parameter
    Required or Not
    Data Type
    Description
    appid
    Required
    Number
    Business ID.
    stream_id
    Mandatory
    String
    Stream name.
    channelId
    Mandatory
    String
    Channel ID.
    domain
    Mandatory
    String
    Push domain name.
    path
    Optional
    String
    Push stream path.
    asr_text
    Optional
    String
    Audio text.
    cdn_url
    Optional
    String
    CDN address.
    duration
    Optional
    Number
    Speech recognition duration (seconds).
    label
    Optional
    String
    This field is used to return the malicious label with the highest priority in the detection result (LabelResults) to indicate the moderation result recommended by the model. You are advised to process different violation types and suggested values according to your business requirements.
    language_results
    Optional
    Array of AudioResultDetailLanguageResult
    This field is used to return the detailed moderation results of minority language audio detection.
    For specific result content, please see the detailed descriptions of AudioResultDetailLanguageResult data structure.
    Note: This field may return null, indicating that there is no valid value available.
    moan_results
    Optional
    Array of MoanResult
    Moderation result of vulgar content in the audio; Note: This field may return null, indicating that there is no valid value available.
    recognition_results
    Optional
    Array of RecognitionResult
    Label result information list of the identification class.
    Note: This field may return null, indicating that there is no valid value available.
    request_id
    Optional
    String
    Request ID
    seq
    Optional
    Number
    Audio sequence
    speaker_results
    Optional
    Array of AudioResultDetailSpeakerResult
    Speaker identification result in the audio.
    Note: This field may return null, indicating that there is no valid value available.
    sub_label
    Optional
    String
    Sub-label name. If the sub-label is not matched, an empty string will be returned.
    suggestion
    Optional
    string
    Recommended value. Valid values:
    Block: content filtering
    Review: pending re-moderation
    Pass: normal
    text_results
    Optional
    Array of TextResult
    Dialog content moderation result in the audio.
    Note: This field may return null, indicating that there is no valid value available.
    data
    Optional
    Data
    Speech recognition result.

    AudioResultDetailLanguageResult

    Minority language detection result in the audio.
    Name
    Type
    Description
    Label
    String
    This field is used to return the corresponding language type information.
    Note: This field may return null, indicating that there is no valid value available.
    Score
    Integer
    This parameter is used to return the confidence of the current label. Value range: 0 (lowest confidence) to100 (highest confidence). A larger value indicates a higher possibility that the audio belongs to the current returned language label.
    Note: This field may return null, indicating that there is no valid value available.
    StartTime
    Float
    This parameter is used to return the start time of the segment corresponding to the specified language label within the audio file, in the unit of seconds. Note: This field may return null, indicating that there is no valid value available.
    EndTime
    Float
    This parameter is used to return the end time of the segment corresponding to the specified language label within the audio file, in the unit of seconds.
    Note: This field may return null, indicating that there is no valid value available.

    MoanResult

    Vulgar content moderation result.
    Name
    Type
    Description
    Label
    String
    The value is fixed at Moan (moan/panting). If there is no MoanResult in the callback result for the audio, there are no relevant violations about moan/panting in this audio.
    Note: This field may return null, indicating that there is no valid value available.
    Score
    Integer
    The confidence determined by the machine for the current category. Value range: 0 to 100. A higher score indicates a higher possibility that it belongs to the current category.
    (Example: Moan 99 indicates that the sample has a high possibility of belonging to the moan/panting category)
    Suggestion
    String
    You are advised to perform operations after obtaining the judgment result.
    Recommended value. Valid values:
    Block: Blocking is recommended.
    Review: Re-moderation is recommended.
    Pass: Pass is recommended.
    StartTime
    Float
    Violation event start time, in the unit of seconds (s).
    EndTime
    Float
    Violation event end time, in the unit of seconds (s).
    SubLabel
    String
    This field is used to return the secondary label under the current label (Label).
    Note: This field may return null, indicating that there is no valid value available.

    RecognitionResult

    Result information list of the recognition category label.
    Name
    Type
    Description
    Label
    String
    Possible values include: Teenager, Gender
    Note: This field may return null, indicating that there is no valid value available.
    Tags
    Array of Label
    Identifying Tag List
    Note: This field may return null, indicating that there is no valid value available.

    AudioResultDetailSpeakerResult

    Returned speaker recognition result in the audio.
    Name
    Type
    Description
    Label
    String
    This field is used to return the content types requiring detection for the result.
    Note: This field may return null, indicating that there is no valid value available.
    Score
    Integer
    This field is used to return the confidence level of the moaning detection. Value range: 0 (lowest confidence) to 100 (highest confidence). A larger value indicates a higher possibility that the audio is the speaker's voice print.
    Note: This field may return null, indicating that there is no valid value available.
    StartTime
    Float
    This field is used to return the start time of the corresponding speaker's segment within the audio file, in the unit of seconds.
    Note: This field may return null, indicating that there is no valid value available.
    EndTime
    Float
    This field is used to return the end time of the corresponding speaker's segment within the audio file, in the unit of seconds.
    Note: This field may return null, indicating that there is no valid value available.

    TextResult

    Content moderation result in the audio.
    Name
    Type
    Description
    Label
    String
    Malicious label:
    Normal: Normal
    Porn: Porn
    Abuse: Abuse
    Ad: Advertisement
    Custom: Custom dictionary
    And other types of content that are offensive, unsafe or inappropriate.
    If there is no TextResults returned in the callback result for the audio, there are no relevant violations in this audio
    Note: This field may return null, indicating that there is no valid value available.
    Keywords
    Array of String
    Keywords that are matched. If it is empty, the violation is determined by the model.
    Note: This field may return null, indicating that there is no valid value available.
    LibId
    String
    Library identifier of the matched keyword library
    Note: This field may return null, indicating that there is no valid value available.
    LibName
    String
    Name of the matched keyword library
    Note: This field may return null, indicating that there is no valid value available.
    Score
    Integer
    The confidence determined by the machine for the current category. Value range: 0 to 100. A higher score indicates a higher possibility that it belongs to the current category.
    (Example: Porn 99 indicates that the sample has an extremely high possibility of being pornographic.)
    Note: This field may return null, indicating that there is no valid value available.
    Suggestion
    String
    You are advised to perform operations after obtaining the judgment result.
    Recommended value. Valid values:
    Block: Blocking is recommended.
    Review: Re-moderation is recommended.
    Pass: Pass is recommended.
    Note: This field may return null, indicating that there is no valid value available.
    LibType
    Integer
    Type of custom dictionary. Information related to the custom dictionary can be viewed after you log in to the console.
    Custom Block and Allow Library
    Custom Library
    SubLabel
    String
    This field is used to return the secondary label under the current label (Label).
    Note: This field may return null, indicating that there is no valid value available.

    Data

    Name
    Type
    Description
    asr_tmp_full_results
    Array of AsrTmpFullResults
    Details of the audio detection result, which may be empty.

    AsrTmpFullResults

    Details of the audio detection results.
    Name
    Type
    Description
    appearing_point
    Array of Number
    Time point of occurrence.
    confidence
    Number
    Confidence level.
    id
    String
    Audio text.
    periods
    String
    Time period.
    url
    String
    Audio URL.

    Tag

    Recognition label list
    Name
    Type
    Description
    Name
    String
    The specific name is determined based on the Label field:
    When the Label field is Teenager, possible values for Name include: Teenager
    When the Label field is Gender, possible values for Name include: Male, Female
    Note: This field may return null, indicating that there is no valid value available.
    Score
    Integer
    Confidence score: 0 to 100. A larger value indicates a greater confidence.
    Note: This field may return null, indicating that there is no valid value available.
    StartTime
    Float
    Recognition start offset time, unit: milliseconds
    Note: This field may return null, indicating that there is no valid value available.
    EndTime
    Float
    Recognition end offset time, unit: milliseconds
    Note: This field may return null, indicating that there is no valid value available.

    Callback Message Example

    {
    "appid": xxx08,
    "asr_text": "",
    "cdn_url": "",
    "channelId": "xxxun01",
    "data": {
    "asr_tmp_full_results": [
    {
    "appearing_point": [
    0.02300000004470348,
    15.02299976348877
    ],
    "confidence": 100,
    "create_time": 1685929588,
    "id": "",
    "periods": "00:00:00-00:00:15",
    "url": "https://xxx.Audit-09-46-27.wav"
    }
    ]
    },
    "domain": "xxx.cn",
    "duration": 10,
    "event_type": 315,
    "interface": "general_callback",
    "label": "Moan",
    "language_results": [ ],
    "moan_results": [
    {
    "EndTime": 15,
    "Label": "Moan",
    "Score": 99,
    "StartTime": 0,
    "SubLabel": "PornMoan",
    "Suggestion": "Block"
    }
    ],
    "path": "live",
    "recognition_results": [ ],
    "request_id": "xxx594-4f4d-a5d0-99cce8b750b4",
    "seq": 3232590095,
    "speaker_results": [ ],
    "status": 2,
    "stream_id": "xxxn01",
    "sub_label": "PornMoan",
    "suggestion": "Block",
    "task_id": xxx36881,
    "text_results": [ ]
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support