SUBSCRIBE /models

SUB /models

Analyze a continuous media stream with Hume models.

Supports the following Hume models:

  • burst
  • face
  • facemesh
  • language
  • prosody

To learn more about what these models do and the science behind them please check out the Hume platform help pages.

Note that this endpoint has a timeout of one minute. To maintain a connection longer than a minute you will need to implement custom reconnect logic in your application.

Accepts one of the following messages.

SUBSCRIBE /models

Model predictions

Payload

  • burst object

    Response for the vocal burst emotion model.

    Hide burst attribute Show burst attribute
    • predictions array[object]
      Hide predictions attributes Show predictions attributes object
      • time object

        A time range with a beginning and end, measured in seconds.

        Hide time attributes Show time attributes
        • begin number

          Beginning of time range in seconds.

          Minimum value is 0.

        • end number

          End of time range in seconds.

          Minimum value is 0.

      • emotions array[object]

        A high-dimensional embedding in emotion space.

        Hide emotions attributes Show emotions attributes object
        • name string

          Name of the emotion being expressed.

        • score number

          Embedding value for the emotion being expressed.

  • face object

    Response for the facial expression emotion model.

    Hide face attribute Show face attribute
    • predictions array[object]
      Hide predictions attributes Show predictions attributes object
      • frame number

        Frame number

      • time number | null

        Time in seconds when face detection occurred.

      • bbox object

        A bounding box around a face.

        Hide bbox attributes Show bbox attributes
        • x number

          x-coordinate of bounding box top left corner.

          Minimum value is 0.

        • y number

          y-coordinate of bounding box top left corner.

          Minimum value is 0.

        • w number

          Bounding box width.

          Minimum value is 0.

        • h number

          Bounding box height.

          Minimum value is 0.

      • prob number

        The predicted probability that a detected face was actually a face.

      • face_id string

        Identifier for a face. Not that this defaults to unknown unless face identification is enabled in the face model configuration.

      • emotions array[object]

        A high-dimensional embedding in emotion space.

        Hide emotions attributes Show emotions attributes object
        • name string

          Name of the emotion being expressed.

        • score number

          Embedding value for the emotion being expressed.

      • facs array[object]

        A high-dimensional embedding in emotion space.

        Hide facs attributes Show facs attributes object
        • name string

          Name of the emotion being expressed.

        • score number

          Embedding value for the emotion being expressed.

      • descriptions array[object]

        A high-dimensional embedding in emotion space.

        Hide descriptions attributes Show descriptions attributes object
        • name string

          Name of the emotion being expressed.

        • score number

          Embedding value for the emotion being expressed.

  • facemesh object

    Response for the facemesh emotion model.

    Hide facemesh attribute Show facemesh attribute
    • predictions array[object]
      Hide predictions attribute Show predictions attribute object
      • emotions array[object]

        A high-dimensional embedding in emotion space.

        Hide emotions attributes Show emotions attributes object
        • name string

          Name of the emotion being expressed.

        • score number

          Embedding value for the emotion being expressed.

  • language object

    Response for the language emotion model.

    Hide language attribute Show language attribute
    • predictions array[object]
      Hide predictions attributes Show predictions attributes object
      • text string

        A segment of text (like a word or a sentence).

      • position object

        Position of a segment of text within a larger document, measured in characters. Uses zero-based indexing. The beginning index is inclusive and the end index is exclusive.

        Hide position attributes Show position attributes
        • begin number

          The index of the first character in the text segment, inclusive.

          Minimum value is 0.

        • end number

          The index of the last character in the text segment, exclusive.

          Minimum value is 0.

      • emotions array[object]

        A high-dimensional embedding in emotion space.

        Hide emotions attributes Show emotions attributes object
        • name string

          Name of the emotion being expressed.

        • score number

          Embedding value for the emotion being expressed.

      • sentiment array[object]

        Sentiment predictions returned as a distribution. This model predicts the probability that a given text could be interpreted as having each sentiment level from 1 (negative) to 9 (positive).

        Compared to returning one estimate of sentiment, this enables a more nuanced analysis of a text's meaning. For example, a text with very neutral sentiment would have an average rating of 5. But also a text that could be interpreted as having very positive sentiment or very negative sentiment would also have an average rating of 5. The average sentiment is less informative than the distribution over sentiment, so this API returns a value for each sentiment level.

        Hide sentiment attributes Show sentiment attributes object
        • name string

          Level of sentiment, ranging from 1 (negative) to 9 (positive)

        • score number

          Prediction for this level of sentiment

      • toxicity array[object]

        Toxicity predictions returned as probabilities that the text can be classified into the following categories: toxic, severe_toxic, obscene, threat, insult, and identity_hate.

        Hide toxicity attributes Show toxicity attributes object
        • name string

          Category of toxicity.

        • score number

          Prediction for this category of toxicity

  • prosody object

    Response for the speech prosody emotion model.

    Hide prosody attribute Show prosody attribute
    • predictions array[object]
      Hide predictions attributes Show predictions attributes object
      • time object

        A time range with a beginning and end, measured in seconds.

        Hide time attributes Show time attributes
        • begin number

          Beginning of time range in seconds.

          Minimum value is 0.

        • end number

          End of time range in seconds.

          Minimum value is 0.

      • emotions array[object]

        A high-dimensional embedding in emotion space.

        Hide emotions attributes Show emotions attributes object
        • name string

          Name of the emotion being expressed.

        • score number

          Embedding value for the emotion being expressed.

Payload example
{
  "burst": {
    "predictions": [
      {
        "time": {
          "begin": 42.0,
          "end": 42.0
        },
        "emotions": [
          {
            "name": "string",
            "score": 42.0
          }
        ]
      }
    ]
  },
  "face": {
    "predictions": [
      {
        "frame": 42.0,
        "time": 42.0,
        "bbox": {
          "x": 42.0,
          "y": 42.0,
          "w": 42.0,
          "h": 42.0
        },
        "prob": 42.0,
        "face_id": "string",
        "emotions": [
          {
            "name": "string",
            "score": 42.0
          }
        ],
        "facs": [
          {
            "name": "string",
            "score": 42.0
          }
        ],
        "descriptions": [
          {
            "name": "string",
            "score": 42.0
          }
        ]
      }
    ]
  },
  "facemesh": {
    "predictions": [
      {
        "emotions": [
          {
            "name": "string",
            "score": 42.0
          }
        ]
      }
    ]
  },
  "language": {
    "predictions": [
      {
        "text": "string",
        "position": {
          "begin": 42.0,
          "end": 42.0
        },
        "emotions": [
          {
            "name": "string",
            "score": 42.0
          }
        ],
        "sentiment": [
          {
            "name": "string",
            "score": 42.0
          }
        ],
        "toxicity": [
          {
            "name": "string",
            "score": 42.0
          }
        ]
      }
    ]
  },
  "prosody": {
    "predictions": [
      {
        "time": {
          "begin": 42.0,
          "end": 42.0
        },
        "emotions": [
          {
            "name": "string",
            "score": 42.0
          }
        ]
      }
    ]
  }
}

Error message

Payload

  • error string

    Error message text.

  • code string

    Unique identifier for the error.

Payload example
{
  "error": "string",
  "code": "string"
}

Warning message

Payload

  • warning string

    Warning message text.

  • code string

    Unique identifier for the error.

Payload example
{
  "warning": "string",
  "code": "string"
}