Conversational AI Metrics Callback

Tencent RTC Conversational AI provides rich metrics callback features. These status callbacks are sent through Tencent RTC's custom messages, allowing easy monitoring of conversation performance on the client side. Metrics such as LLM and TTS call duration and performance data are pushed to the terminal in real-time via Tencent RTC custom messages, enabling monitoring of Conversational AI duration and quality.
Through the Tencent RTC SDK Receive Custom Messages feature, you can listen for callbacks on the client to receive real AI dialogue metrics data. cmdID is fixed at 1.
Field
Type
Description
type
Number
Message type, 10020 indicates AI service invocation callback
sender
String
Sender's `userid`, which is the bot's ID
payload
Object
Message payload, including metric details
The payload object contains the following fields:
Field
Type
Description
metric
String
The metric names are as follows:
asr_latency
llm_network_latency
llm_first_token
tts_network_latency
tts_first_frame_latency
tts_discontinuity
interruption
value
Number
Call metrics
tag
Object
Tags associated with the metric
The tag object contains the following fields:
Field
Type
Description
roundid
String
Conversation round ID
Metric Name Description:
Status Code
Description
asr_latency
ASR latency. Note: The metric includes the time set by VadSilenceTime when starting an Conversational AI.
llm_network_latency
Network latency of LLM requests
llm_first_token
LLM first token latency, metric includes network latency
tts_network_latency
Network latency of TTS requests
tts_first_frame_latency
TTS first frame latency, metric includes network latency
tts_discontinuity
Number of non-continuous TTS requests, indicating that after a TTS streaming request finishes playing, the next request has not yet returned a result, usually due to high TTS latency
interruption
This conversation was interrupted