---
title: "Classify emotion and speaking style"
method: POST
path: "/v1/audio/affect"
---

# Classify emotion and speaking style

`POST /v1/audio/affect`

## Request

- Base URL: `https://speech-api.oruk.ai`
- URL: `https://speech-api.oruk.ai/v1/audio/affect`
- Auth: HTTP bearer

## Headers

- `X-Request-ID` string

## Response `200`

Speech result and measured usage

- SpeechResult
  - `id` string, required
  - `object` 'speech.result', required
  - `task` 'transcription' | 'emotion' | 'style' | 'affect' | 'analysis' | 'proficiency', required
  - `model` string, required
  - `text` string, nullable
  - `tagged_text` string, nullable: Model-specific annotated transcript, not XML or word-level affect alignment. Resonance analysis may append unpaired <|label|> tags after a segment to annotate that segment. Use the structured segment emotions/styles arrays and start/end times for timed labels.
  - `language` string, nullable
  - `duration` number, required
  - `emotions` Score[], required
    - `label` string, required
    - `score` number, required
  - `styles` Score[], required
    - `label` string, required
    - `score` number, required
  - `segments` Segment[], required
    - `id` integer, required
    - `start` number, required
    - `end` number, required
    - `text` string, nullable
    - `tagged_text` string, nullable: Model-specific annotated transcript, not XML or word-level affect alignment. Resonance analysis may append unpaired <|label|> tags after a segment to annotate that segment. Use the structured segment emotions/styles arrays and start/end times for timed labels.
    - `words` Word[]
      - `word` string, required
      - `start` number, required
      - `end` number, required
      - `confidence` number, nullable: Optional transcription confidence from 0 to 1 when returned. Null or absent means unavailable, not zero or a transcription failure; unrelated to emotion/style scores. Word timings may be present without confidence.
    - `emotions` Score[], required
      - `label` string, required
      - `score` number, required
    - `styles` Score[], required
      - `label` string, required
      - `score` number, required
    - `speaker` string, nullable: Speaker label (speaker_0, speaker_1, ...) when the request set diarize=true; labels are stable within one response only.
    - `scores` object: All unfiltered sigmoid scores for the requested task, keyed by label, including below-threshold labels. Present only with include_logits=true; scores do not need to sum to one.
    - `raw_logits` object: Actual finite model outputs before sigmoid, keyed by the same labels as scores. Values are unbounded and may be negative. Present only with include_logits=true.
  - `diarized` boolean: True when segments are speaker turns (diarize=true).
  - `speakers` string[]: Speaker labels in order of first appearance; empty unless diarized.
  - `usage` Usage, required: Measured audio duration and reference cost metadata. Subscription usage draws from shared plan minutes, with additional minutes at the plan’s overage rate. Reference amounts are not the subscription invoice.
    - `audio_seconds` number, required
    - `billable_seconds` number, required
    - `rate_per_minute_usd` string, required
    - `estimated_cost_usd` string, required
    - `pricing_version` string, required
    - `billing_unit` 'audio_second' | 'request': Reference unit returned by the inference API. Subscription billing uses audio minutes regardless of this field.
    - `rate_per_request_usd` string, nullable: Reference cost metadata when billing_unit is 'request'; subscription charges are based on audio minutes.

## Other responses

- `default`: Stable error envelope

---

[API](https://skmtc.dev/oruk/apis/oruk-speech-api.md) · [All operations](https://skmtc.dev/oruk/apis/oruk-speech-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oruk/apis/oruk-speech-api/revisions/c668cecab401?raw)
