> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Paraformer V2 语音识别

> - Paraformer V2 录音文件识别模型，支持中文（含方言）、英文、日语等多语种
- 支持说话人分离、热词定制、语气词过滤
- 异步处理模式，使用返回的任务ID [进行查询](/pages/zh/api-manual/task-management/get-task-detail)
- 识别结果会在任务详情的 `results` 字段中返回




## OpenAPI

````yaml openapi/zh/paraformer-v2.json POST /v1/audios/generations
openapi: 3.1.0
info:
  title: Paraformer V2 语音识别
  version: '1.0'
servers:
  - url: https://api.aihubmax.com
security:
  - BearerAuth: []
paths:
  /v1/audios/generations:
    post:
      tags:
        - Audio > 语音识别
      summary: Paraformer V2 语音识别
      description: >
        - Paraformer V2 录音文件识别模型，支持中文（含方言）、英文、日语等多语种

        - 支持说话人分离、热词定制、语气词过滤

        - 异步处理模式，使用返回的任务ID
        [进行查询](/pages/zh/api-manual/task-management/get-task-detail)

        - 识别结果会在任务详情的 `results` 字段中返回
      operationId: paraformer-v2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ParaformerRequest'
            examples:
              basic_transcription_with_default_settings:
                summary: Basic transcription with default settings
                value:
                  model: paraformer-v2
                  file_urls:
                    - https://example.com/audio/meeting.wav
              multi_language_transcription_with_diarization:
                summary: Multi-language transcription with diarization
                value:
                  model: paraformer-v2
                  file_urls:
                    - https://example.com/audio/interview_part1.mp3
                    - https://example.com/audio/interview_part2.mp3
                  language_hints:
                    - zh
                    - en
                  diarization:
                    enabled: true
                    speaker_count: 3
              8khz_telephone_audio_with_recognition_tuning:
                summary: 8kHz telephone audio with recognition tuning
                value:
                  model: paraformer-8k-v2
                  file_urls:
                    - https://example.com/audio/call_recording.wav
                  channel_id:
                    - 0
                    - 1
                  recognition:
                    disfluency_removal_enabled: true
                    vocabulary_id: vocab-xxxx
      responses:
        '200':
          $ref: '#/components/responses/TaskCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ParaformerRequest:
      type: object
      required:
        - model
        - file_urls
      properties:
        model:
          description: |-
            `paraformer-v2`：支持中英日等多语种
            `paraformer-8k-v2`：8kHz 采样率，仅支持中文
          examples:
            - paraformer-v2
            - paraformer-8k-v2
          type: string
          default: paraformer-v2
        file_urls:
          description: >
            音频文件 URL 列表


            **说明：**

            - 支持 HTTP/HTTPS 协议的公网可访问 URL

            - 单次请求最多 100 个 URL

            - 支持格式：aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg,
            opus, wav, webm, wma, wmv

            - 单文件不超过 2GB，时长不超过 12 小时
          items:
            type: string
          maxItems: 100
          minItems: 1
          type: array
          example:
            - https://example.com/audio/meeting.wav
        language_hints:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >
            待识别语种提示


            **说明：**

            - 仅 `paraformer-v2` 支持，`paraformer-8k-v2` 不适用

            -
            支持的语言代码：`zh`（中文）、`en`（英文）、`ja`（日语）、`yue`（粤语）、`ko`（韩语）、`de`（德语）、`fr`（法语）、`ru`（俄语）
          x-unsupported-models:
            - paraformer-8k-v2
          example:
            - zh
            - en
        channel_id:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          description: |-
            音轨索引

            **说明：**
            - 索引从 0 开始，`[0]` 表示第一个音轨
            - 默认 `[0]`（仅处理第一个音轨）
            - 每个指定的音轨独立计费


            > 非必须不要传这个参数。
          x-advanced: true
          example:
            - 0
        recognition:
          anyOf:
            - description: Recognition configuration settings.
              properties:
                disfluency_removal_enabled:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  default: null
                  description: |
                    过滤语气词

                    **说明：**
                    - 启用后，识别结果中的语气词（如「嗯」「啊」）将被过滤
                    - 默认关闭
                  example: false
                timestamp_alignment_enabled:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  default: null
                  description: |
                    时间戳校准

                    **说明：**
                    - 启用后提高时间戳的对齐精度
                    - 默认关闭
                  example: false
                vocabulary_id:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: |
                    热词表 ID

                    **说明：**
                    - 使用 DashScope 定制热词功能创建的热词表 ID
                    - 仅 v2 系列模型支持
                  example: vocab-xxxx
                special_word_filter:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: |
                    敏感词过滤规则（JSON 字符串）

                    **说明：**
                    - 不传则使用系统内置敏感词过滤
                    - 传入 JSON 可自定义替换/移除规则
                  example: >-
                    {"filter_with_signed":{"word_list":["测试"]},"system_reserved_filter":true}
              type: object
            - type: 'null'
          default: null
          description: |-
            识别配置

            **说明：**
            - 包含语气词过滤、时间戳校准、热词、敏感词过滤等设置
            - 不传则使用默认配置


            > 非必须不要传这个参数。
          x-advanced: true
        diarization:
          anyOf:
            - description: Speaker diarization configuration.
              properties:
                enabled:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  default: null
                  description: |
                    说话人分离开关

                    **说明：**
                    - 启用后识别结果中包含 `speaker_id` 字段
                    - 仅适用于单声道音频
                    - 默认关闭
                  example: false
                speaker_count:
                  anyOf:
                    - maximum: 100
                      minimum: 2
                      type: integer
                    - type: 'null'
                  default: null
                  description: |
                    说话人数量提示

                    **说明：**
                    - 范围：`2` - `100`
                    - 需先启用说话人分离（`enabled: true`）
                    - 仅作为辅助提示，不保证输出精确匹配该数量
                  example: 2
              type: object
            - type: 'null'
          default: null
          description: |-
            说话人分离配置

            **说明：**
            - 包含分离开关和说话人数量提示
            - 不传则不启用说话人分离


            > 非必须不要传这个参数。
          x-advanced: true
    TaskResponse:
      type: object
      properties:
        created:
          type: integer
          description: 任务创建时间戳
          example: 1757165031
        id:
          type: string
          description: 任务ID
          example: task-unified-1757165031-uyujaw3d
        model:
          type: string
          description: 实际使用的模型名称
        object:
          type: string
          description: 任务的具体类型
          enum:
            - audio.generation.task
        progress:
          type: integer
          description: 任务进度百分比 (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: 任务状态
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          type: object
          description: 异步任务信息
          properties:
            can_cancel:
              type: boolean
              description: 任务是否可以取消
              example: true
            estimated_time:
              type: integer
              description: 预计完成时间（秒）
              example: 45
        type:
          type: string
          description: 任务的输出类型
          enum:
            - audio
          example: audio
    ErrorResponse400:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 请求格式错误
            type:
              type: string
              example: invalid_request_error
    ErrorResponse401:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: API密钥无效
            type:
              type: string
              example: authentication_error
    ErrorResponse402:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 账户余额不足
            type:
              type: string
              example: insufficient_quota
    ErrorResponse422:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 参数校验失败
            type:
              type: string
              example: validation_error
    ErrorResponse429:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 请求频率超限
            type:
              type: string
              example: rate_limit_error
    ErrorResponse500:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 服务器内部错误
            type:
              type: string
              example: server_error
    ErrorResponse503:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 服务暂不可用，请稍后重试
            type:
              type: string
              example: service_unavailable
  responses:
    TaskCreated:
      description: 任务创建成功
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TaskResponse'
    BadRequest:
      description: 请求格式错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse400'
    Unauthorized:
      description: 未授权
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse401'
    PaymentRequired:
      description: 余额不足
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse402'
    UnprocessableEntity:
      description: 参数校验失败
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse422'
    TooManyRequests:
      description: 请求频率超限
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse429'
    InternalServerError:
      description: 服务器内部错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse500'
    ServiceUnavailable:
      description: 服务暂不可用
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse503'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        ## 所有接口均需要使用Bearer Token进行认证 ##

        使用时在请求头中添加：

        `Authorization: Bearer YOUR_API_KEY`

````