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

# Convert Speech to text

> This endpoint converts a list files into text for each of one



## OpenAPI

````yaml POST /voice/speech-to-text
openapi: 3.1.0
info:
  title: Pawa AI APIs
  description: >-
    API endpoints in Pawa Platform to perform CRUD operations on different
    features using Pawa AI, a digital assistant built for Africa for various
    tasks.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.pawa-ai.com/v1
    description: Production Server
security:
  - bearerAuth: []
paths:
  /voice/speech-to-text:
    post:
      tags:
        - Speech to Text
      summary: Speech to Text
      description: This endpoint converts a list files into text for each of one
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: >-
                    Audio files to be transcribed `(max 10)`. Types accepted
                    are: `audio/mp3`, `audio/mpeg`, audio/x-mp3, `audio/wav`,
                    `audio/wave`, `audio/x-wav`, `audio/x-pn-wav`, `audio/aac`,
                    `audio/m4a`, `audio/x-m4a`, `audio/x-mp4`, `audio/ogg`,
                    `audio/opus`, `audio/x-ms-wma`, `audio/wma`
                model:
                  type: string
                  example: pawa-stt-v1-20240701
                  enum:
                    - pawa-stt-v1-20240701
                language:
                  type: string
                  enum:
                    - English
                    - Swahili
                    - Luo
                    - Meru
                    - Kamba
                    - Kikuyu
                    - Hausa
                    - Igbo
                    - Yoruba
                    - Pidgin
                    - Zulu
                    - Tswana
                    - Afrikaans
                    - Xhosa
                    - Nyankole
                    - Ganda
                    - Lugbara
                  example: English
                is_speaker_diarization:
                  type: boolean
                  enum:
                    - true
                    - false
                  example: false
                prompt:
                  type: string
                  example: Nipe maneno yaliyokwenye hii audio
                temperature:
                  type: number
                  example: 0.1
                  default: 0.1
              required:
                - files
                - model
                - language
                - is_speaker_diarization
      responses:
        '200':
          description: Audio files transcribed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpeechToTextResponseDataDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                badRequest:
                  value:
                    success: false
                    message: Invalid input provided
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    success: false
                    message: Unauthorized access
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                forbidden:
                  value:
                    success: false
                    message: You do not have permission to access this resource
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  value:
                    success: false
                    message: Resource does not exist
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                tooManyRequests:
                  value:
                    success: false
                    message: Rate limit exceeded. Please try again later.
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                serverError:
                  value:
                    success: false
                    message: Internal server error
components:
  schemas:
    SpeechToTextResponseDataDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Audio transcribed succesfully
        data:
          $ref: '#/components/schemas/SpeechToTextResponseData'
      required:
        - success
        - message
        - data
    ErrorResponse:
      required:
        - success
        - message
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: An error occurred
    SpeechToTextResponseData:
      type: object
      properties:
        transcriptions:
          type: object
          example:
            - filename: innocent.wav
              transcript: Hello, my name is Innocent Charles, welcome to Pawa AI
      required:
        - transcriptions
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````