Audio Emotion API

Reprocess an audio file based on audio id.

The three speech-analysis flags are optional and default to "leave whatever is stored alone", so existing callers are unaffected. Supplying them is how media uploaded with speech analysis skipped gets analyzed later (#840).

language is optional too. Without it the language is detected from the audio, as before; with it the audio is processed in that language. It is checked before anything is charged, so an unsupported code is refused with 422 invalid_language and costs nothing. It is only used by a request that starts a run (a failed audio, or reprocess=true); on a request that does not, it is ignored. For a standalone audio it applies to this run only: a later reprocess that omits it auto-detects again. For a video's companion audio the choice is also recorded on the video, so a later reprocess of the video re-sends it; a later audio reprocess that omits language re-detects the audio but leaves the video's recorded language alone.

multilingual and expected_languages are the language hints (expected_languages is the set of languages the audio may contain, up to 5; see the field descriptions). They are checked with language, before anything is charged: an invalid one is refused with 422 invalid_language and costs nothing. Unlike language they are not sticky: a request that starts a run and omits them runs without a hint, and clears the audio's stored ones. For a video's companion audio, a request that names any of language, multilingual or expected_languages also replaces the video's hints with the audio's resulting ones, so naming only language clears the video's hints; a request that names none leaves the video's alone.

put/v1/audios/{audio_id}

Request

  • Base URL
    https://api.imentiv.ai (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer

Path parameters

audio_idstring required

Unique identifier of the audio to reprocess

Request body application/x-www-form-urlencoded

callback_urlstring nullable

The callback url to notify audio reprocessing is completed. Give a valid URL. Must be an https URL on a publicly reachable host.

reprocessboolean

Set to 'True' to reprocess an already completed audio; defaults to 'False'.

transcriptionboolean nullable

Turn speech-to-text on or off for this run. Omit to keep the current setting.

diarizationboolean nullable

Turn speaker diarization on or off for this run. Omit to keep the current setting.

text_emotionboolean nullable

Turn transcript emotion analysis on or off for this run. Requires transcription (or an already-applied transcript). Omit to keep the current setting.

languagestring nullable

Language of the audio as a language code such as hu or pt-BR (a region is ignored, so zh-yue becomes zh: send yue for Cantonese). Use it when automatic detection got the language wrong. Omit to auto-detect. A later reprocess of this audio that omits it auto-detects the audio again. For a video's companion audio the choice is also recorded on the video, so a later reprocess of the video re-sends it, and omitting it here does not clear that. Unsupported codes are refused with 422 invalid_language. With expected_languages it must be one of them.

multilingualboolean nullable

Opt in to mixed-language transcription: the speech may switch language, and each stretch is transcribed in the language it is spoken in. Once the audio completes, the lines that are not in its main language are also translated into the main language and billed as a translation, on top of transcription (auto_translation reports it). This is input only; the languages actually detected are reported separately. Omitted means no hint: the audio is analysed again without one, and any stored hint is cleared.

expected_languagesstring nullable

Comma-separated codes of the languages the audio may contain, the main one included (e.g. en,ja), 1 to 5 after duplicates are removed. Case and whitespace are ignored, a region is dropped (pt-BR is pt) and an alias maps to the Whisper spelling (iw is he); Cantonese is yue. Language detection is restricted to the set, with or without multilingual. If language is also sent it must be one of them (422 invalid_language otherwise). If language is omitted, detection still runs, restricted to the set. An unknown code, or more than 5, is refused with 422 invalid_language before anything is charged. Omitted means no hint: the audio is analysed again without one, and any stored hint is cleared.

Response

Successful Response

idstring required
statusstring required
messagestring required

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      request property list-of-types was widened by adding types null to media type application/x-www-form-urlencoded