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

# Speech to Text

> Transcribe audio to text

<Warning>
  This BETA endpoint only accepts `application/form-data` and `application/msgpack`.
</Warning>


## OpenAPI

````yaml post /v1/asr
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/asr:
    post:
      tags:
        - OpenAPI v1
      summary: Speech to Text
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                audio:
                  description: Audio to be converted to text
                  format: binary
                  title: Audio
                  type: string
                language:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: Language to be used for the speech
                  title: Language
                ignore_timestamps:
                  default: true
                  description: >-
                    Whether to return precise timestamps in the text, this will
                    increase the latency in audio shorter than 30 seconds
                  title: Ignore Timestamps
                  type: boolean
              required:
                - audio
              type: object
          application/msgpack:
            schema:
              properties:
                audio:
                  description: Audio to be converted to text
                  format: binary
                  title: Audio
                  type: string
                language:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: Language to be used for the speech
                  title: Language
                ignore_timestamps:
                  default: true
                  description: >-
                    Whether to return precise timestamps in the text, this will
                    increase the latency in audio shorter than 30 seconds
                  title: Ignore Timestamps
                  type: boolean
              required:
                - audio
              type: object
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  text:
                    title: Text
                    type: string
                  duration:
                    description: Duration of the audio in seconds
                    title: Duration
                    type: number
                  segments:
                    items:
                      $ref: '#/components/schemas/ASRSegment'
                    title: Segments
                    type: array
                required:
                  - text
                  - duration
                  - segments
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
        '402':
          description: No payment -- see charging schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
        '422':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      title: Location
                      description: error field
                      type: array
                      items:
                        type: string
                    type:
                      title: Type
                      description: error type
                      type: string
                    msg:
                      title: Message
                      description: error message
                      type: string
                    ctx:
                      title: Context
                      description: error context
                      type: string
                    in:
                      title: In
                      type: string
                      enum:
                        - path
                        - query
                        - header
                        - cookie
                        - body
                  required:
                    - loc
                    - type
                    - msg
      security:
        - BearerAuth: []
components:
  schemas:
    ASRSegment:
      properties:
        text:
          title: Text
          type: string
        start:
          title: Start
          type: number
        end:
          title: End
          type: number
      required:
        - text
        - start
        - end
      title: ASRSegment
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````