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

# Speech to Text

> Transcribe speech from an audio or video URL into text, with optional speaker diarization and word-level timestamps.



## OpenAPI

````yaml POST /v1/audio/stt
openapi: 3.0.1
info:
  title: FineVoice API
  description: >-
    This is the documentation for the FineVoice API. If you have any questions
    or need assistance, please contact support@finevoice.ai.
  version: v1
servers:
  - url: https://apis.finevoice.ai
    description: FineVoice API Gateway
security:
  - BearerAuth: []
paths:
  /v1/audio/stt:
    post:
      tags:
        - Audio
      summary: Speech to Text
      description: >-
        Transcribe speech from an audio or video URL into text, with optional
        speaker diarization and word-level timestamps.
      operationId: SpeechToText
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpeechToTextRequest'
      responses:
        '200':
          description: >-
            Task accepted. Returns a taskId for async polling or the result URL
            directly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioTaskResponse'
        '401':
          description: Unauthorized — invalid or missing API key.
        '422':
          description: Validation error — check request body fields.
components:
  schemas:
    SpeechToTextRequest:
      type: object
      description: The speech-to-text request payload.
      properties:
        url:
          type: string
          description: The source audio or video URL.
          example: https://example.com/audio.mp3
        language:
          type: string
          description: The source language code (e.g. `en`, `zh`, `ja`).
          example: en
        title:
          type: string
          description: An optional task title for reference.
        format:
          type: string
          description: 'Expected transcript output format: `srt`, `vtt`, `json`, `txt`.'
          example: json
        engine:
          type: string
          description: 'The transcription engine to use. Supported: `whisper`, `funasr`.'
          example: whisper
        useAsync:
          type: boolean
          description: Set to `true` to process asynchronously.
          example: true
        word_level_timestamp_alignment:
          type: boolean
          description: Whether to include word-level timestamp alignment.
          example: false
        speaker_diarization:
          type: boolean
          description: Whether to enable speaker diarization (identify multiple speakers).
          example: false
        min_speakers:
          type: integer
          format: int32
          description: Minimum number of speakers for diarization.
        max_speakers:
          type: integer
          format: int32
          description: Maximum number of speakers for diarization.
        batch_size:
          type: integer
          format: int32
          description: The transcription batch size.
        script_target:
          type: string
          description: The target output script style or format.
    AudioTaskResponse:
      type: object
      description: Standard response for audio processing tasks.
      properties:
        status:
          type: integer
          format: int32
          description: HTTP-style status code (200 for success, 202 for in-progress).
        url:
          type: string
          description: Download URL of the generated audio file (available when completed).
        taskId:
          type: string
          description: Task identifier for async polling. Use with GET /v1/task/{task_id}.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        error:
          $ref: '#/components/schemas/ApiError'
        urls:
          type: array
          items:
            type: string
          description: Multiple output URLs (e.g. for separation stems).
        service:
          type: string
        port:
          type: string
        timestamp:
          type: string
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token (API key). Format: `Bearer {your_api_key}`'

````