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

# Analyze Single File

> For the best results, use audio files with a sample rate of 16 kHz and 16 bits per sample.

You can start using our API with the command line following these steps:

1. Send a POST request with **audio file link** and **corresponding configuration** in JSON.
2. [Send a GET request to fetch results](/api-reference/get-analysis-result) using the **result\_id** from the response.
3. *Optional*: Configure a **webhook** to receive the results.

After configuring the body of the request, please refer to the code snippets rendered dynamically on the right side of the page.


## OpenAPI

````yaml post /api/v1/offline/processing
openapi: 3.1.0
info:
  title: M-Path
  description: Automatic Speech Recognition and Voice Emotion Recognition
  version: dev
servers: []
security: []
paths:
  /api/v1/offline/processing:
    post:
      tags:
        - Processing
      summary: Analyze Single File
      description: >-
        For the best results, use audio files with a sample rate of 16 kHz and
        16 bits per sample.
      operationId: analyze_single_file
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pipeline'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultId'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Pipeline:
      type: object
      description: Main configuration for audio processing
      required:
        - config
        - audio
      properties:
        config:
          $ref: '#/components/schemas/RecognitionConfig'
        audio:
          $ref: '#/components/schemas/RecognitionAudio'
        call_data:
          $ref: '#/components/schemas/RecognitionMeta'
          default: {}
      example:
        config:
          language_code: en-US
          insights:
            summary:
              prompt_customization: Focus on key points and action items
            sentiment: {}
            topics: {}
        audio:
          uri: https://example.com/audio.wav
    ResultId:
      type: object
      properties:
        result_id:
          type: string
          title: Result ID
          description: Identifier to retrieve the analysis results
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    RecognitionConfig:
      type: object
      description: Configuration for audio processing pipeline
      properties:
        language_code:
          type: string
          enum:
            - en-US
            - he-IL
            - hi-IN
            - es-ES
            - fr-FR
            - de-DE
            - it-IT
          title: Language Code
          default: en-US
          description: Primary language of the audio file
        transcript_model:
          type: string
          enum:
            - openai_whisper
          title: Transcript Model
          default: openai_whisper
          description: Speech-to-text model to use for transcription
        emotions_model:
          type: string
          enum:
            - emotions
            - null
          title: Emotions Model
          default: emotions
          description: Model to use for emotion detection. Set to null to disable
        emotions_alignment:
          type: boolean
          title: Emotions Alignment
          default: false
          description: Enable temporal alignment of emotions with speech
        emotions_diarization:
          type: boolean
          title: Emotions Diarization
          default: false
          description: Enable speaker-based emotion diarization
        channels:
          type: integer
          enum:
            - 1
            - 2
          title: Channels
          default: 2
          description: Number of audio channels (1 for mono, 2 for stereo)
        insights:
          type: object
          description: Configure which insights to generate and their options
          properties:
            agent_actions:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for agent actions analysis
                  default: ''
            csat:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for CSAT analysis
                  default: ''
            customer_requests:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for customer requests analysis
                  default: ''
            division:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for conversation division analysis
                  default: ''
            keywords:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for keywords extraction
                  default: ''
            label:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for labeling
                  default: ''
                labels:
                  type: array
                  items:
                    type: string
                  description: List of labels to classify the conversation
            problems:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for problems detection
                  default: ''
            questions:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for questions analysis
                  default: ''
            sentiment:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for sentiment analysis
                  default: ''
            summary:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for summary generation
                  default: ''
            topics:
              type: object
              properties:
                prompt_customization:
                  type: string
                  description: Custom prompt for topics extraction
                  default: ''
          default: {}
        webhook:
          type: string
          format: uri
          title: Webhook
          description: URL to receive processing results when complete
          nullable: true
          default: null
    RecognitionAudio:
      type: object
      description: Audio file information
      required:
        - uri
      properties:
        uri:
          type: string
          format: uri
          title: URI
          description: Publicly accessible URL to the audio file
    RecognitionMeta:
      type: object
      description: Optional metadata about the call
      properties:
        id:
          type: string
          title: ID
          description: Your internal identifier for this call
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: When the call occurred
        speakers:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Speaker identifier
              label:
                type: string
                description: Display name for the speaker
              role:
                type: string
                enum:
                  - agent
                  - customer
                description: Role of the speaker
            required:
              - id
              - role
          description: Information about speakers in the call
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          type: string
        type:
          type: string
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````