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

# Generate Speech to Text Transcription



## OpenAPI

````yaml /api-reference/openapi.json post /v1/realtime/stt
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/realtime/stt:
    post:
      summary: Generates an speech to text transcription (not streamed).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RtSttRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                    description: The generated text of the speech audio list.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    RtSttRequest:
      type: object
      required:
        - audioBase64
      properties:
        audioBase64:
          type: string
          description: >-
            The audio base64 string that contains the audio data. Audio data
            should be of type WAV.
          example: GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH ...
        language:
          type: string
          enum:
            - ar
            - en
          default: ar
        isEosEnabled:
          type: boolean
          description: Whether to enable End of Speech detection or not.
          default: false
        eosThreshold:
          type: number
          description: The threshold value for End of Speech detection.
          default: 0.3
        model:
          type: string
          enum:
            - s2
            - s3
          description: The STT model to use for transcription.
          default: s2
          example: s2
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````