On this page

AddASRStream

2026-11-16
POST

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

Add the specified stream to the ASR task. Only effective when the RecognitionRange parameter is set to 1.

Request

Query Parameters

    Action stringrequired

    Possible values: [AddASRStream]

    API prototype parameter

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

    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
    TaskId stringrequired

    Unique identifier of the task.

    StreamInfo objectrequired
    The stream to be recognized.
    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, GoogleTranslateV2]

    Translation service vendor:

    • DoubaoSeedTranslation: Doubao translation
    • QwenMT: Tongyi Qianwen translation
    • GoogleTranslateV2: Google Translate
    SourceLanguage string

    Source language. Optional. The value must be an enum value of the corresponding translation vendor. When Vendor is GoogleTranslateV2, you can omit it or set it to an empty string for automatic source language detection.

    TargetLanguage stringrequired

    Target language

    LLM objectrequired
    LLM parameters for translation.
    Url string

    LLM endpoint to call. It varies by Vendor:

    • When Vendor is DoubaoSeedTranslation: required, e.g., https://ark.cn-beijing.volces.com/api/v3/responses
    • When Vendor is QwenMT: required, e.g., https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions (China site) or https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 (International site)
    • When Vendor is GoogleTranslateV2: optional. If not passed, the server default endpoint https://translation.googleapis.com/language/translate/v2 is used.
    ApiKey string

    API key for LLM verification. It is empty by default. Make sure to fill in the corresponding API key in production environments.

    Model string

    The LLM model name to call. It varies by Vendor:

    • When Vendor is DoubaoSeedTranslation: required, e.g., doubao-seed-translation-250915
    • When Vendor is QwenMT: required, e.g., qwen-mt-lite
    • When Vendor is GoogleTranslateV2: optional. If not passed, nmt is used by default.
    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.
    • When Vendor is GoogleTranslateV2, passing through parameters is not supported.
    Sequence int64

    Request sequence number, used to guarantee the ordering of add and delete operations on the same stream. The backend only processes the request with the latest Sequence. If not set, requests are processed in the order received by the backend.

    📌 Important The Sequence values for AddASRStream and DeleteASRStream must be sequential. For example:

    1. AddASRStream(Sequence:1)
    2. DeleteASRStream(Sequence:2)
    3. AddASRStream(Sequence:3)
    4. DeleteASRStream(Sequence:4)
    5. ...

Responses​

Add stream success
Schema
    Code integer

    Return code. 0 indicates success; other values indicate failure. For details, refer to Return Codes.

    Message string

    Request result description.

    RequestId string

    Request ID.

Previous

Stop Cloud Real-Time ASR

Next

Delete ASR Stream

On this page

Back to top