Enhancements

Update a postprocessing dictionary by ID

Changed on

The terms list is replaced as a whole. Each entry has the format "replacement|pattern,pattern" (an empty replacement removes the matched word). Entries are cleaned up automatically (whitespace normalized, empty and duplicate entries dropped); entries without a pattern, with spaces in a pattern, or rejected by the captioning provider (e.g. an invalid regular expression) fail with invalid_value.

patch/enhancements/speech/postprocessing-dictionaries/{id}

Request

  • Base URL
    https://api.theo.live/v2
  • Auth
    HTTP basic

Path parameters

idstring required

Postprocessing dictionary ID

Request body

namestring

Name of the postprocessing dictionary

languagestring

IETF BCP 47 language tag (e.g. "en", "en-US")

termsstring[]

List of find/replace rules applied to the source-language transcript after speech recognition and before translation. One rule per entry in the format "replacement|pattern,pattern": every transcript word matching one of the comma-separated patterns is replaced by the replacement. A pattern matches an entire word, may be a regular expression and must not contain spaces; the replacement may contain spaces and may be empty to remove the matched word ("|basically,literally"). Entries are cleaned up automatically: whitespace is normalized, spaces around "|" and "," are removed, and empty or duplicate entries are dropped. Entries without a pattern or with spaces in a pattern are rejected. At most 1000 entries.

Example request

{
  "terms": [
    "OptiView|Optiview,Opti-view,Optivue",
    "New York|NewYork,Newyork",
    "|basically,literally",
    "Dolby|[D|d]olby"
  ]
}

Response

Updated postprocessing dictionary

Example response

{
  "data": {
    "terms": [
      "OptiView|Optiview,Opti-view,Optivue",
      "New York|NewYork,Newyork",
      "|basically,literally",
      "Dolby|[D|d]olby"
    ]
  }
}

Changes