On this page

AddASRStream

2026-09-18
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]

    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.
    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