QwenCloudBRASIL
Tradução de apoio para consulta. Código e identificadores técnicos preservados. Consultar referência original ↗

ASR compatível com OpenAI

Áudio via API de bate-papo

Métodos de conexão

Escolha o método que corresponde ao seu modelo.

Modelo Método de conexão
Qwen3-ASR-Flash-Filetrans DashScope assíncrono apenas
Qwen3-ASR-Flash Compatível com OpenAI e DashScope síncrono

Formatos de áudio suportados

Qwen3-ASR-Flash aceita áudio codificado em Base64 ou URLs acessíveis publicamente.

Entrada de áudio codificada em Base64

Use o URL de dados formato: data:<mediatype>;base64,<data>.

Exemplo: data:audio/wav;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjI5LjEwMAAAAAAAAAAAAAAA//PAxABQ/BXRbMPe4IQAhl9

Base64 encoding examples

Python

  ```python
  import base64, pathlib

  # Replace "input.mp3" with your audio file path
  file_path = pathlib.Path("input.mp3")
  base64_str = base64.b64encode(file_path.read_bytes()).decode()
  data_uri = f"data:audio/mpeg;base64,{base64_str}"
  ```

Java

  ```java
  import java.nio.file.*;
  import java.util.Base64;

  public class Main {
    /**
       * Replace "filePath" with your audio file path.
       */
    public static String toDataUrl(String filePath) throws Exception {
      byte[] bytes = Files.readAllBytes(Paths.get(filePath));
      String encoded = Base64.getEncoder().encodeToString(bytes);
      return "data:audio/mpeg;base64," + encoded;
    }

    // Example usage
    public static void main(String[] args) throws Exception {
      System.out.println(toDataUrl("input.mp3"));
    }
  }
  ```

asr_options não é padrão. Com o OpenAI SDK, passe-o via extra_body.

OpenAPI

openapi: 3.1.0
info:
  title: Qwen-ASR Audio File Recognition API
  description: API reference for Qwen-ASR audio file recognition. Supports OpenAI-compatible, DashScope synchronous, and DashScope asynchronous protocols.
  version: 1.0.0
servers:
  - url: https://maas.qwencloudapi.com
    description: Singapore
security:
  - bearer: []
paths:
  /compatible-mode/v1/chat/completions:
    post:
      operationId: asrOpenAICompatible
      summary: Recognize audio (OpenAI-compatible)
      description: Recognize audio files using the OpenAI-compatible Chat Completions API. Supports Qwen3-ASR-Flash. Accepts audio input as URLs or Base64-encoded data.
      security:
        - bearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OpenAIASRRequest"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OpenAIASRResponse"
      x-codeSamples:
        - lang: python
          label: Audio URL
          source: |-
            from openai import OpenAI
            import os

            try:
              client = OpenAI(
                # If you have not configured environment variables, replace the following line with your API key: api_key = "sk-xxx",
                api_key=os.getenv("DASHSCOPE_API_KEY"),
                base_url="https://maas.qwencloudapi.com/compatible-mode/v1",
              )


              stream_enabled = False  # Whether to enable streaming output
              completion = client.chat.completions.create(
                model="qwen3-asr-flash",
                messages=[
                  {
                    "content": [
                      {
                        "type": "input_audio",
                        "input_audio": {
                          "data": "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3"
                        }
                      }
                    ],
                    "role": "user"
                  }
                ],
                stream=stream_enabled,
                # When stream is set to False, the stream_options parameter cannot be set
                # stream_options={"include_usage": True},
                extra_body={
                  "asr_options": {
                    # "language": "zh",
                    "enable_itn": False
                  }
                }
              )
              if stream_enabled:
                full_content = ""
                print("Streaming output content is:")
                for chunk in completion:
                  # If stream_options.include_usage is True, the choices field of the last chunk is an empty list and should be skipped (you can get token usage via chunk.usage)
                  print(chunk)
                  if chunk.choices and chunk.choices[0].delta.content:
                    full_content += chunk.choices[0].delta.content
                print(f"Full content is: {full_content}")
              else:
                print(f"Non-streaming output content is: {completion.choices[0].message.content}")
            except Exception as e:
              print(f"Error message: {e}")
        - lang: python
          label: Base64-encoded audio
          source: |-
            import base64
            from openai import OpenAI
            import os
            import pathlib

            try:
              # Replace with the actual path to your audio file
              file_path = "welcome.mp3"
              # Replace with the actual MIME type of your audio file
              audio_mime_type = "audio/mpeg"

              file_path_obj = pathlib.Path(file_path)
              if not file_path_obj.exists():
                raise FileNotFoundError(f"Audio file not found: {file_path}")

              base64_str = base64.b64encode(file_path_obj.read_bytes()).decode()
              data_uri = f"data:{audio_mime_type};base64,{base64_str}"

              client = OpenAI(
                # If you have not configured environment variables, replace the following line with your API key: api_key = "sk-xxx",
                api_key=os.getenv("DASHSCOPE_API_KEY"),
                base_url="https://maas.qwencloudapi.com/compatible-mode/v1",
              )


              stream_enabled = False  # Whether to enable streaming output
              completion = client.chat.completions.create(
                model="qwen3-asr-flash",
                messages=[
                  {
                    "content": [
                      {
                        "type": "input_audio",
                        "input_audio": {
                          "data": data_uri
                        }
                      }
                    ],
                    "role": "user"
                  }
                ],
                stream=stream_enabled,
                # When stream is set to False, the stream_options parameter cannot be set
                # stream_options={"include_usage": True},
                extra_body={
                  "asr_options": {
                    # "language": "zh",
                    "enable_itn": False
                  }
                }
              )
              if stream_enabled:
                full_content = ""
                print("Streaming output content is:")
                for chunk in completion:
                  # If stream_options.include_usage is True, the choices field of the last chunk is an empty list and should be skipped (you can get token usage via chunk.usage)
                  print(chunk)
                  if chunk.choices and chunk.choices[0].delta.content:
                    full_content += chunk.choices[0].delta.content
                print(f"Full content is: {full_content}")
              else:
                print(f"Non-streaming output content is: {completion.choices[0].message.content}")
            except Exception as e:
              print(f"Error message: {e}")
        - lang: javascript
          label: Audio URL
          source: |-
            // Preparations before running:
            // Universal for Windows/Mac/Linux:
            // 1. Make sure Node.js is installed (version >= 14 recommended)
            // 2. Run the following command to install necessary dependencies: npm install openai

            import OpenAI from "openai";

            const client = new OpenAI({
              // If you have not configured environment variables, replace the following line with your API key: apiKey: "sk-xxx",
              apiKey: process.env.DASHSCOPE_API_KEY,
              baseURL: "https://maas.qwencloudapi.com/compatible-mode/v1",
            });

            async function main() {
              try {
                const streamEnabled = false; // Whether to enable streaming output
                const completion = await client.chat.completions.create({
                  model: "qwen3-asr-flash",
                  messages: [
                    {
                      role: "user",
                      content: [
                        {
                          type: "input_audio",
                          input_audio: {
                            data: "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3"
                          }
                        }
                      ]
                    }
                  ],
                  stream: streamEnabled,
                  // When stream is set to False, the stream_options parameter cannot be set
                  // stream_options: {
                  //   "include_usage": true
                  // },
                  asr_options: {
                    // language: "zh",
                    enable_itn: false
                  }
                });

                if (streamEnabled) {
                  let fullContent = "";
                  console.log("Streaming output content is:");
                  for await (const chunk of completion) {
                    console.log(JSON.stringify(chunk));
                    if (chunk.choices && chunk.choices.length > 0) {
                      const delta = chunk.choices[0].delta;
                      if (delta && delta.content) {
                        fullContent += delta.content;
                      }
                    }
                  }
                  console.log(`Full content is: ${fullContent}`);
                } else {
                  console.log(`Non-streaming output content is: ${completion.choices[0].message.content}`);
                }
              } catch (err) {
                console.error(`Error message: ${err}`);
              }
            }

            main();
        - lang: javascript
          label: Base64-encoded audio
          source: |-
            // Preparations before running:
            // Universal for Windows/Mac/Linux:
            // 1. Make sure Node.js is installed (version >= 14 recommended)
            // 2. Run the following command to install necessary dependencies: npm install openai

            import OpenAI from "openai";
            import { readFileSync } from 'fs';

            const client = new OpenAI({
              // If you have not configured environment variables, replace the following line with your API key: apiKey: "sk-xxx",
              apiKey: process.env.DASHSCOPE_API_KEY,
              baseURL: "https://maas.qwencloudapi.com/compatible-mode/v1",
            });

            const encodeAudioFile = (audioFilePath) => {
                const audioFile = readFileSync(audioFilePath);
                return audioFile.toString('base64');
            };

            // Replace with the actual path to your audio file
            const dataUri = `data:audio/mpeg;base64,${encodeAudioFile("welcome.mp3")}`;

            async function main() {
              try {
                const streamEnabled = false; // Whether to enable streaming output
                const completion = await client.chat.completions.create({
                  model: "qwen3-asr-flash",
                  messages: [
                    {
                      role: "user",
                      content: [
                        {
                          type: "input_audio",
                          input_audio: {
                            data: dataUri
                          }
                        }
                      ]
                    }
                  ],
                  stream: streamEnabled,
                  // When stream is set to False, the stream_options parameter cannot be set
                  // stream_options: {
                  //   "include_usage": true
                  // },
                  asr_options: {
                    // language: "zh",
                    enable_itn: false
                  }
                });

                if (streamEnabled) {
                  let fullContent = "";
                  console.log("Streaming output content is:");
                  for await (const chunk of completion) {
                    console.log(JSON.stringify(chunk));
                    if (chunk.choices && chunk.choices.length > 0) {
                      const delta = chunk.choices[0].delta;
                      if (delta && delta.content) {
                        fullContent += delta.content;
                      }
                    }
                  }
                  console.log(`Full content is: ${fullContent}`);
                } else {
                  console.log(`Non-streaming output content is: ${completion.choices[0].message.content}`);
                }
              } catch (err) {
                console.error(`Error message: ${err}`);
              }
            }

            main();
        - lang: bash
          label: Audio URL
          source: |-
            curl -X POST 'https://maas.qwencloudapi.com/compatible-mode/v1/chat/completions' \
            -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "model": "qwen3-asr-flash",
              "messages": [
                {
                  "content": [
                    {
                      "type": "input_audio",
                      "input_audio": {
                        "data": "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3"
                      }
                    }
                  ],
                  "role": "user"
                }
              ],
              "stream":false,
              "asr_options": {
                "enable_itn": false
              }
            }'
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: DashScope API key. Get your API key from [QwenCloud console](https://home.qwencloud.com/api-keys).
  schemas:
    OpenAIASRRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: The model name. Only applicable to Qwen3-ASR-Flash.
          examples:
            - qwen3-asr-flash
        messages:
          type: array
          description: The list of messages.
          items:
            type: object
            required:
              - role
              - content
            properties:
              role:
                type: string
                description: The role of the message sender.
                enum:
                  - system
                  - user
              content:
                type: array
                description: The content of the message.
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: Set to `input_audio` for audio input.
                      enum:
                        - input_audio
                    input_audio:
                      type: object
                      description: The audio input object.
                      properties:
                        data:
                          type: string
                          description: "The audio to recognize. Supports URLs of Internet-accessible files and Base64-encoded data (Data URL format: `data:<mediatype>;base64,<data>`)."
                    text:
                      type: string
                      description: "Context for customized recognition (System Message only). Provide background text, entity vocabularies, and other reference information. Length limit: 10,000 tokens."
        asr_options:
          type: object
          description: Specifies whether to enable certain features. Not a standard OpenAI parameter — pass it through `extra_body` when using an OpenAI SDK.
          properties:
            language:
              type: string
              description: If you know the language of the audio, specify it to improve recognition accuracy. Specify only one language. If the audio contains multiple languages, do not specify this parameter.
              enum:
                - zh
                - yue
                - en
                - ja
                - de
                - ko
                - ru
                - fr
                - pt
                - ar
                - it
                - es
                - hi
                - id
                - th
                - tr
                - uk
                - vi
                - cs
                - da
                - fil
                - fi
                - is
                - ms
                - no
                - pl
                - sv
            enable_itn:
              type: boolean
              description: Specifies whether to enable Inverse Text Normalization (ITN). Applicable only to Chinese and English audio.
              default: false
        stream:
          type: boolean
          description: Specifies whether to use streaming output. We recommend setting this to `true` to improve responsiveness and reduce the risk of timeouts.
          default: false
        stream_options:
          type: object
          description: Configuration for streaming output. Takes effect only when `stream` is `true`.
          properties:
            include_usage:
              type: boolean
              description: Specifies whether to include token consumption information in the last data block of the response.
              default: false
    OpenAIASRResponse:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for this call.
          example: chatcmpl-487abe5f-d4f2-9363-a877-xxxxxxx
        choices:
          type: array
          description: The output information of the model.
          items:
            type: object
            properties:
              finish_reason:
                type: string
                description: "`null` during generation. `stop` when finished naturally. `length` when output exceeded maximum length."
                enum:
                  - stop
                  - length
                  - null
                example: stop
              index:
                type: integer
                description: The index of the current object in the `choices` array.
                example: 0
              message:
                type: object
                description: The message object output by the model.
                properties:
                  role:
                    type: string
                    description: The role of the output message. Always `assistant`.
                    example: assistant
                  content:
                    type: string
                    description: The speech recognition result text.
                    example: Welcome to QwenCloud.
                  annotations:
                    type: array
                    description: Output annotation information, such as language and emotion.
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: Set to `audio_info`.
                          example: audio_info
                        language:
                          type: string
                          description: The language of the recognized audio.
                          enum:
                            - zh
                            - yue
                            - en
                            - ja
                            - de
                            - ko
                            - ru
                            - fr
                            - pt
                            - ar
                            - it
                            - es
                            - hi
                            - id
                            - th
                            - tr
                            - uk
                            - vi
                            - cs
                            - da
                            - fil
                            - fi
                            - is
                            - ms
                            - no
                            - pl
                            - sv
                          example: zh
                        emotion:
                          type: string
                          description: The emotion of the recognized audio.
                          enum:
                            - surprised
                            - neutral
                            - happy
                            - sad
                            - disgusted
                            - angry
                            - fearful
                          example: neutral
                    example:
                      - emotion: neutral
                        language: zh
                        type: audio_info
          example:
            - finish_reason: stop
              index: 0
              message:
                annotations:
                  - emotion: neutral
                    language: zh
                    type: audio_info
                content: Welcome to QwenCloud.
                role: assistant
        created:
          type: integer
          description: The UNIX timestamp (in seconds) when the request was created.
          example: 1767683986
        model:
          type: string
          description: The model used for this request.
          example: qwen3-asr-flash
        object:
          type: string
          description: Always `chat.completion`.
          example: chat.completion
        usage:
          type: object
          description: Token consumption information.
          properties:
            completion_tokens:
              type: integer
              description: The number of tokens in the model's output.
              example: 12
            completion_tokens_details:
              type: object
              properties:
                text_tokens:
                  type: integer
                  description: The number of tokens in the model's output text.
                  example: 12
            prompt_tokens:
              type: integer
              description: The number of tokens in the input.
              example: 42
            prompt_tokens_details:
              type: object
              properties:
                audio_tokens:
                  type: integer
                  description: The length of the input audio in tokens. Each second of audio converts to 25 tokens. Audio shorter than 1 second is counted as 1 second.
                  example: 42
                text_tokens:
                  type: integer
                  description: Ignore this parameter.
                  example: 0
            seconds:
              type: integer
              description: The duration of the audio in seconds.
              example: 1
            total_tokens:
              type: integer
              description: The total number of tokens in the input and output.
              example: 54
      examples:
        - summary: Non-streaming response
          value:
            choices:
              - finish_reason: stop
                index: 0
                message:
                  annotations:
                    - emotion: neutral
                      language: zh
                      type: audio_info
                  content: Welcome to QwenCloud.
                  role: assistant
            created: 1767683986
            id: chatcmpl-487abe5f-d4f2-9363-a877-xxxxxxx
            model: qwen3-asr-flash
            object: chat.completion
            usage:
              completion_tokens: 12
              completion_tokens_details:
                text_tokens: 12
              prompt_tokens: 42
              prompt_tokens_details:
                audio_tokens: 42
                text_tokens: 0
              seconds: 1
              total_tokens: 54
    DashScopeASRRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: The model name. Only applicable to Qwen3-ASR-Flash.
          examples:
            - qwen3-asr-flash
        input:
          type: object
          required:
            - messages
          description: The input object.
          properties:
            messages:
              type: array
              description: The list of messages.
              items:
                type: object
                required:
                  - role
                  - content
                properties:
                  role:
                    type: string
                    description: The role of the message sender.
                    enum:
                      - system
                      - user
                  content:
                    type: array
                    description: The content of the message.
                    items:
                      type: object
                      properties:
                        audio:
                          type: string
                          description: The audio to recognize (User Message). Supports URLs, Base64-encoded data, and local file paths (SDK only).
                        text:
                          type: string
                          description: "Context for customized recognition (System Message). Length limit: 10,000 tokens."
        parameters:
          type: object
          description: Additional parameters.
          properties:
            asr_options:
              type: object
              description: Specifies whether to enable certain features. Supported only by Qwen3-ASR-Flash.
              properties:
                language:
                  type: string
                  description: If you know the language of the audio, specify it to improve recognition accuracy. Specify only one language. If the audio contains multiple languages, do not specify this parameter.
                  enum:
                    - zh
                    - yue
                    - en
                    - ja
                    - de
                    - ko
                    - ru
                    - fr
                    - pt
                    - ar
                    - it
                    - es
                    - hi
                    - id
                    - th
                    - tr
                    - uk
                    - vi
                    - cs
                    - da
                    - fil
                    - fi
                    - is
                    - ms
                    - no
                    - pl
                    - sv
                enable_itn:
                  type: boolean
                  description: Specifies whether to enable Inverse Text Normalization (ITN). Applicable only to Chinese and English audio.
                  default: false
    DashScopeASRResponse:
      type: object
      properties:
        request_id:
          type: string
          description: The unique identifier for this call. The Java SDK returns this as `requestId`.
          example: 568e2bf0-d6f2-97f8-9f15-a57b11dc6977
        output:
          type: object
          description: The call result.
          properties:
            choices:
              type: array
              description: The model output, included when `result_format` is `message`.
              items:
                type: object
                properties:
                  finish_reason:
                    type: string
                    description: "`null` during generation. `stop` when finished naturally. `length` when output exceeded maximum length."
                    enum:
                      - stop
                      - length
                      - null
                    example: stop
                  message:
                    type: object
                    description: The message object output by the model.
                    properties:
                      role:
                        type: string
                        description: The role of the output message. Always `assistant`.
                        example: assistant
                      content:
                        type: array
                        description: The output message content.
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                              description: The speech recognition result text.
                              example: Welcome to QwenCloud.
                        example:
                          - text: Welcome to QwenCloud.
                      annotations:
                        type: array
                        description: Output annotation information.
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              description: Set to `audio_info`.
                              example: audio_info
                            language:
                              type: string
                              description: The language of the recognized audio.
                              enum:
                                - zh
                                - yue
                                - en
                                - ja
                                - de
                                - ko
                                - ru
                                - fr
                                - pt
                                - ar
                                - it
                                - es
                                - hi
                                - id
                                - th
                                - tr
                                - uk
                                - vi
                                - cs
                                - da
                                - fil
                                - fi
                                - is
                                - ms
                                - no
                                - pl
                                - sv
                              example: zh
                            emotion:
                              type: string
                              description: The emotion of the recognized audio.
                              enum:
                                - surprised
                                - neutral
                                - happy
                                - sad
                                - disgusted
                                - angry
                                - fearful
                              example: neutral
                        example:
                          - language: zh
                            type: audio_info
                            emotion: neutral
              example:
                - finish_reason: stop
                  message:
                    annotations:
                      - language: zh
                        type: audio_info
                        emotion: neutral
                    content:
                      - text: Welcome to QwenCloud.
                    role: assistant
        usage:
          type: object
          description: Token consumption information.
          properties:
            input_tokens_details:
              type: object
              properties:
                text_tokens:
                  type: integer
                  description: Ignore this parameter.
                  example: 0
            output_tokens_details:
              type: object
              properties:
                text_tokens:
                  type: integer
                  description: The length of the recognized text output in tokens.
                  example: 6
            seconds:
              type: integer
              description: The duration of the audio in seconds.
              example: 1
      examples:
        - summary: DashScope synchronous response
          value:
            output:
              choices:
                - finish_reason: stop
                  message:
                    annotations:
                      - language: zh
                        type: audio_info
                        emotion: neutral
                    content:
                      - text: Welcome to QwenCloud.
                    role: assistant
            usage:
              input_tokens_details:
                text_tokens: 0
              output_tokens_details:
                text_tokens: 6
              seconds: 1
            request_id: 568e2bf0-d6f2-97f8-9f15-a57b11dc6977
    AsyncASRRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: The model name. Only applicable to Qwen3-ASR-Flash-Filetrans.
          examples:
            - qwen3-asr-flash-filetrans
        input:
          type: object
          required:
            - file_url
          description: The input object.
          properties:
            file_url:
              type: string
              description: The URL of the audio file to be recognized. Must be accessible over the Internet.
        parameters:
          type: object
          description: Additional parameters.
          properties:
            language:
              type: string
              description: If you know the language of the audio, specify it to improve recognition accuracy.
              enum:
                - zh
                - yue
                - en
                - ja
                - de
                - ko
                - ru
                - fr
                - pt
                - ar
                - it
                - es
                - hi
                - id
                - th
                - tr
                - uk
                - vi
                - cs
                - da
                - fil
                - fi
                - is
                - ms
                - no
                - pl
                - sv
            enable_itn:
              type: boolean
              description: Specifies whether to enable Inverse Text Normalization (ITN). Applicable only to Chinese and English audio.
              default: false
            enable_words:
              type: boolean
              description: "Controls whether to return word-level timestamps. When `false`, returns sentence-level timestamps. When `true`, returns word-level timestamps (supported for Chinese, English, Japanese, Korean, German, French, Spanish, Italian, Portuguese, and Russian). Also affects sentence segmentation: `false` uses VAD-based segmentation, `true` uses VAD and punctuation-based segmentation."
              default: false
            text:
              type: string
              description: "Context for customized recognition. Provide background text, entity vocabularies, and other reference information. Length limit: 10,000 tokens."
            channel_id:
              type: array
              items:
                type: integer
              description: "Indexes of audio tracks to recognize in a multi-track audio file. Index starts from 0. Default: `[0]`. Each specified track is billed separately."
              default:
                - 0
    AsyncASRSubmitResponse:
      type: object
      properties:
        request_id:
          type: string
          description: The unique identifier for this call.
          example: 92e3decd-0c69-47a8-xxxxxxxxxxxx
        output:
          type: object
          properties:
            task_id:
              type: string
              description: The task ID. Use this to query the task result.
              example: 8fab76d0-0eed-4d20-xxxxxxxxxxxx
            task_status:
              type: string
              description: The task status.
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
                - UNKNOWN
              example: PENDING
      examples:
        - summary: Task submitted
          value:
            request_id: 92e3decd-0c69-47a8-xxxxxxxxxxxx
            output:
              task_id: 8fab76d0-0eed-4d20-xxxxxxxxxxxx
              task_status: PENDING
    AsyncASRGetResponse:
      type: object
      properties:
        request_id:
          type: string
          description: The unique identifier for this call.
          example: 1dca6c0a-0ed1-4662-aa39-xxxxxxxxxxxx
        output:
          type: object
          properties:
            task_id:
              type: string
              description: The task ID.
              example: 8fab76d0-0eed-4d20-929f-xxxxxxxxxxxx
            task_status:
              type: string
              description: The task status.
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
                - UNKNOWN
              example: SUCCEEDED
            result:
              type: object
              description: The recognition result (available when task_status is SUCCEEDED).
              properties:
                transcription_url:
                  type: string
                  description: The download URL for the recognition result JSON file. Valid for 24 hours.
                  example: https://dashscope-result.oss-cn-beijing.aliyuncs.com/result.json?Expires=1761631066&OSSAccessKeyId=LTAIxxxx&Signature=xxxx
            submit_time:
              type: string
              description: The time when the task was submitted.
              example: 2025-10-27 13:57:45.948
            scheduled_time:
              type: string
              description: The time when the task was scheduled (start of execution).
              example: 2025-10-27 13:57:46.018
            end_time:
              type: string
              description: The time when the task ended.
              example: 2025-10-27 13:57:47.079
            task_metrics:
              type: object
              description: Task metrics with subtask status statistics.
              properties:
                TOTAL:
                  type: integer
                  description: The total number of subtasks.
                  example: 1
                SUCCEEDED:
                  type: integer
                  description: The number of successful subtasks.
                  example: 0
                FAILED:
                  type: integer
                  description: The number of failed subtasks.
                  example: 0
            code:
              type: string
              description: Error code. Returned only when the task fails.
              example: FILE_403_FORBIDDEN
            message:
              type: string
              description: Error message. Returned only when the task fails.
              example: FILE_403_FORBIDDEN
        usage:
          type: object
          description: Token consumption information.
          properties:
            seconds:
              type: integer
              description: The duration of the audio in seconds.
              example: 3
      examples:
        - summary: SUCCEEDED
          value:
            request_id: 1dca6c0a-0ed1-4662-aa39-xxxxxxxxxxxx
            output:
              task_id: 8fab76d0-0eed-4d20-929f-xxxxxxxxxxxx
              task_status: SUCCEEDED
              submit_time: 2025-10-27 13:57:45.948
              scheduled_time: 2025-10-27 13:57:46.018
              end_time: 2025-10-27 13:57:47.079
              result:
                transcription_url: https://dashscope-result.oss-cn-beijing.aliyuncs.com/result.json?Expires=1761631066&OSSAccessKeyId=LTAIxxxx&Signature=xxxx
            usage:
              seconds: 3
        - summary: RUNNING
          value:
            request_id: 6769df07-2768-4fb0-ad59-xxxxxxxxxxxx
            output:
              task_id: 9be1700a-0f8e-4778-be74-xxxxxxxxxxxx
              task_status: RUNNING
              submit_time: 2025-10-27 14:19:31.150
              scheduled_time: 2025-10-27 14:19:31.233
              task_metrics:
                TOTAL: 1
                SUCCEEDED: 0
                FAILED: 0
        - summary: FAILED
          value:
            request_id: 3d141841-858a-466a-9ff9-xxxxxxxxxxxx
            output:
              task_id: c58c7951-7789-4557-9ea3-xxxxxxxxxxxx
              task_status: FAILED
              submit_time: 2025-10-27 15:06:06.915
              scheduled_time: 2025-10-27 15:06:06.967
              end_time: 2025-10-27 15:06:07.584
              code: FILE_403_FORBIDDEN
              message: FILE_403_FORBIDDEN