On this page

StartRealtimeASRTask

2026-09-18
POST

https://cloud-realtime-asr-api.zegotech.cn/

Start cloud real-time speech recognition task and add the speech recognition instance to the RTC conversation.

Request

Query Parameters

    Action stringrequired

    Possible values: [StartRealtimeASRTask]

    Interface prototype parameters

    https://cloud-realtime-asr-api.zegotech.cn?Action=StartRealtimeASRTask

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    Common parameter. 16-bit hexadecimal random string (hex encoding of 8 bytes of random number). For generation algorithm, refer to Signature Example.

    Timestamp int64required

    Common parameter. Current Unix timestamp, in seconds. For generation algorithm, refer to Signature Example, maximum allowed deviation of 10 minutes.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    Signature stringrequired

    Common parameter. Signature, used to verify the legitimacy of the request. Please refer to Signature Mechanism to generate.

Body

required
    RoomId stringrequired

    RTC room ID

    RecognitionRange integer

    Possible values: [0, 1]

    Recognition range. 0: all streams in the room, 1: specified StreamList.

    ASR object
    ASR parameters
    Vendor string

    Possible values: [Tencent, AliyunParaformer, AliyunFunASR, AliyunQwenAudioASR, VolcSeedASR, Microsoft]

    Default value: Tencent

    ASR vendor. Refer to Configure ASR parameter description. If you need Alibaba, Microsoft recognition vendors, please contact ZEGOCLOUD business support to enable.

    Params object

    Vendor parameters. For specific usage, refer to the Params parameter description in Configure ASR.

    VADSilenceSegmentation number

    Possible values: >= 200 and <= 2000

    Default value: 500

    Used to set how many milliseconds after the user stops speaking, two sentences will no longer be considered as one. Unit is ms, range [200, 2000], default is 500. For detailed explanation, refer to Configure ASR - Speech Segmentation Control.

    HotWord stringdeprecated

    This parameter is deprecated. Please set it through Params vendor parameters.

    StreamList object[]
    List of streams to be recognized, takes effect when RecognitionRange parameter is 1. When RecognitionRange parameter is 1, this parameter cannot be empty.
  • Array[
  • StreamId stringrequired

    Stream ID to be recognized.

    ASR object
    ASR parameters
    Vendor string

    Possible values: [Tencent, AliyunParaformer, AliyunFunASR, AliyunQwenAudioASR, VolcSeedASR, Microsoft]

    Default value: Tencent

    ASR vendor. Refer to Configure ASR parameter description. If you need Alibaba, Microsoft recognition vendors, please contact ZEGOCLOUD business support to enable.

    Params object

    Vendor parameters. For specific usage, refer to the Params parameter description in Configure ASR.

    VADSilenceSegmentation number

    Possible values: >= 200 and <= 2000

    Default value: 500

    Used to set how many milliseconds after the user stops speaking, two sentences will no longer be considered as one. Unit is ms, range [200, 2000], default is 500. For detailed explanation, refer to Configure ASR - Speech Segmentation Control.

    HotWord stringdeprecated

    This parameter is deprecated. Please set it through Params vendor parameters.

    EnableTranslation boolean

    Whether to enable translation.

    Translation object
    Translation LLM configuration item
    Vendor stringrequired

    Possible values: [DoubaoSeedTranslation, QwenMT]

    LLM vendor to call.

    SourceLanguage stringrequired

    Source language

    TargetLanguage stringrequired

    Target language

    LLM objectrequired
    LLM parameters for translation.
    Url stringrequired

    LLM interface address to call. Different for different Vendors:

    • When Vendor is DoubaoSeedTranslation: https://ark.cn-beijing.volces.com/api/v3/responses
    • When Vendor is QwenMT: https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
    ApiKey stringrequired

    The parameter used for authentication by the LLM service provider.

    Model stringrequired

    The LLM model name to call, required. Different vendors support different models.

    Params object

    LLM or application platform request parameters, optional.

    • For OpenAI protocol, you can configure parameters such as max_tokens, temperature, stream, etc.
    • For other application platforms, you can fill in the parameters supported by the platform.
  • ]
  • AdvancedConfig object
    Advanced configuration parameters.
    MaxIdleTime integer

    Possible values: >= 30 and <= 1800

    Default value: 120

    If no one is publishing streams in the RTC room for more than MaxIdleTime, the background automatically stops the recognition task, in seconds.

    EnableTranslation boolean

    Whether to enable translation. Disabled by default.

    Translation object
    Translation LLM configuration item
    Vendor stringrequired

    Possible values: [DoubaoSeedTranslation, QwenMT]

    LLM vendor to call.

    SourceLanguage stringrequired

    Source language

    TargetLanguage stringrequired

    Target language

    LLM objectrequired
    LLM parameters for translation.
    Url stringrequired

    LLM interface address to call. Different for different Vendors:

    • When Vendor is DoubaoSeedTranslation: https://ark.cn-beijing.volces.com/api/v3/responses
    • When Vendor is QwenMT: https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
    ApiKey stringrequired

    The parameter used for authentication by the LLM service provider.

    Model stringrequired

    The LLM model name to call, required. Different vendors support different models.

    Params object

    LLM or application platform request parameters, optional.

    • For OpenAI protocol, you can configure parameters such as max_tokens, temperature, stream, etc.
    • For other application platforms, you can fill in the parameters supported by the platform.
    SubtitleType integer

    Subtitle delivery type, default is 0.
    0: No delivery;
    1: Recognition results only (e.g., when a user says "你好" in Chinese, delivers "你好");
    2: Translation results only (e.g., when a user says "你好" in Chinese, delivers the translated "Hello");
    3: Both recognition and translation results (e.g., when a user says "你好" in Chinese, delivers both "你好" and "Hello").
    If you need to display subtitles on the client, it is recommended to set this to 1, 2, or 3. For details, see Display Subtitles.

    CallbackConfig object
    Callback configuration.
    HostTag string

    You can set up to two callback addresses to monitor events that occur during the task. Use this parameter to specify which callback address the task's events should be routed to. Contact ZEGO technical support to configure the specific tag values in advance. Currently, Custom1 and Custom2 are supported.

Responses​

Task started successfully
Schema
    Code integer

    Return code, 0 means success, other values mean failure. For details, refer to Return Codes.

    Message string

    Request result description

    RequestId string

    Request ID

    Data object
    TaskId string

    Unique identifier of the task.

Previous

Return Codes

Next

Stop Cloud Real-Time ASR

On this page

Back to top