{
  "name": "Whisper Spoken LID",
  "description": "Spoken language identification over fixed-length windows of an audio track, using the language detection of OpenAI Whisper. Consecutive windows with the same most probable language become one TimeFrame.",
  "app_version": "v1.0",
  "mmif_version": "1.2.0",
  "analyzer_version": "20250625",
  "app_license": "Apache 2.0",
  "analyzer_license": "MIT",
  "identifier": "http://apps.clams.ai/whisper-spoken-lid/v1.0",
  "url": "https://github.com/clamsproject/app-whisper-spoken-lid",
  "input": [
    [
      {
        "@type": "http://clams.ai/vocabulary/type/AudioDocument/v2",
        "required": true
      },
      {
        "@type": "http://clams.ai/vocabulary/type/VideoDocument/v2",
        "required": true
      }
    ]
  ],
  "output": [
    {
      "@type": "http://clams.ai/vocabulary/type/TimeFrame/v6",
      "description": "Each TimeFrame covers consecutive windows whose most probable language is `label`, a whisper language code. `labelset` lists all language codes of the whisper model in use. `scores` lists, in time order, the probability whisper gave `label` in each of those windows, one float in [0, 1] per window. Window i starts at `start` + i * `windowMs`; the last window ends at `end` and can be shorter. The probabilities are not calibrated.",
      "properties": {
        "timeUnit": "milliseconds",
        "document": "*",
        "labelset": "*",
        "label": "*",
        "scores": "*"
      }
    }
  ],
  "parameters": [
    {
      "name": "model",
      "description": "Whisper model size.",
      "type": "string",
      "choices": [
        "tiny",
        "base",
        "small",
        "medium",
        "large",
        "turbo"
      ],
      "default": "tiny",
      "multivalued": false
    },
    {
      "name": "windowMs",
      "description": "Window length in milliseconds, at most 30000.",
      "type": "integer",
      "default": 30000,
      "multivalued": false
    },
    {
      "name": "minLastWindowMs",
      "description": "Shortest final window to keep, in milliseconds. 0 keeps any final window.",
      "type": "integer",
      "default": 0,
      "multivalued": false
    },
    {
      "name": "mergeWindows",
      "description": "Join consecutive windows with the same most probable language into one TimeFrame. When false, each window becomes its own TimeFrame.",
      "type": "boolean",
      "default": true,
      "multivalued": false
    },
    {
      "name": "batchSize",
      "description": "Number of windows passed to the model at once.",
      "type": "integer",
      "default": 1,
      "multivalued": false
    },
    {
      "name": "pretty",
      "description": "The JSON body of the HTTP response will be re-formatted with 2-space indentation",
      "type": "boolean",
      "default": false,
      "multivalued": false
    },
    {
      "name": "runningTime",
      "description": "The running time of the app will be recorded in the view metadata",
      "type": "boolean",
      "default": true,
      "multivalued": false
    },
    {
      "name": "hwFetch",
      "description": "The hardware information (architecture, GPU and vRAM) will be recorded in the view metadata",
      "type": "boolean",
      "default": false,
      "multivalued": false
    },
    {
      "name": "tfSamplingMode",
      "description": "Sampling mode for TimeFrame annotations. Has no effect when the app does not process TimeFrames. \"representatives\" uses all representative timepoints if present, otherwise skips the TimeFrame. \"single\" uses the middle representative if present, otherwise extracts an image from the midpoint of the start/end interval (midpoint is calculated by floor division of the sum of start and end). \"all\" uses all target timepoints if present, otherwise extracts all images from the time interval.",
      "type": "string",
      "choices": [
        "representatives",
        "single",
        "all"
      ],
      "default": "representatives",
      "multivalued": false
    }
  ],
  "est_gpu_mem_min": 1500,
  "est_gpu_mem_typ": 1500
}