client.audio.measure(...) -> AudioFileResponse
-
-
-
Send the audio as the
filepart and, to change the defaults, settings as a JSONconfigpart. The response holds every utterance found in the audio and every measurement taken, the same results a realtime session would stream for the same audio.The server detects when speech starts and stops. Each continuous stretch of speech is an utterance, listed in
utteranceswith its span in the audio.- During speech: a measurement is taken every
measurement_timer_msmilliseconds of speech, withtriggerset tointerval. - When speech ends: a final measurement is taken with
triggerset tospeech_ended, unless the previous measurement ended less than one second earlier. Every utterance gets at least one measurement, and audio that ends during speech ends the utterance. - Span: each measurement covers the most recent 10 seconds of the utterance, or the whole utterance if it is shorter, so consecutive measurements can overlap.
audio_start_msandaudio_end_msgive the span, counted from the start of the audio.
Limit Value Request size 25MB, the whole multipart body Audio format 16-bit PCM, 16 kHz, mono, as a WAV file or headerless samples The server does not convert audio, so send it in the format above.
- Too large: a request over the size limit is rejected with
audio_too_long. - Unsupported formats: MP3, FLAC, Ogg, MP4 or M4A, and RIFF files other than WAV, are rejected with
unsupported_media_type. Convert them before sending. - Wrong WAV format: a WAV file at another sample rate, channel count or sample format, one that uses the extensible WAV header, or one that is truncated or malformed is rejected with
audio_decode_failed. - Anything else is read as headerless samples rather than rejected, so check the format before sending. An empty file, or one with an odd number of bytes, is rejected with
audio_decode_failed.
- During speech: a measurement is taken every
-
-
-
from hume_expression_measurement import ExpressionMeasurementClient from hume_expression_measurement.environment import ExpressionMeasurementClientEnvironment client = ExpressionMeasurementClient( api_key="<value>", environment=ExpressionMeasurementClientEnvironment.PRODUCTION, ) client.audio.measure( file="example_file", )
-
-
-
file:
core.File— The audio, as 16-bit PCM at 16 kHz, mono: either a WAV file or the headerless little-endian samples. A WAV file at another sample rate, channel count or sample format is rejected rather than converted.
-
config:
typing.Optional[AudioFileConfig]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.video.measure(...) -> VideoFileResponse
-
-
-
Send one or more images, each as a
filepart, and, to change the defaults, settings as a JSONconfigpart. The response holds one result per image, in the order the parts were sent. An image with no faces is a normal result with an emptyfacesarray.The server detects the faces in each image and lists them in
faces. It measures the largest of them, up to the limit below, and lists those first, largest first.- A face is skipped, and is not listed, if its detection confidence is below
face.thresholdor its bounding box is underface.min_sizepixels on its shorter side. - Each measured face carries its bounding box, its detection confidence, a
face_id, and two sets of scores:expressionsfor emotional expressions such as amusement or interest, anddescriptionsfor visible facial actions such as a smile or a jaw drop. - The faces that were not measured follow, most confident first, up to 32 faces in all. Each carries its bounding box and detection confidence, with
face_id,expressionsanddescriptionsnull. face_idtracks a face across the images of one request. A face normally keeps its ID while it is measured, and can get it back after it leaves the view or is no longer among the largest faces. IDs do not identify a person.- Across requests: IDs start again from 0 in every request. To keep them consistent, set
return_face_stateand pass the returnedface_stateasface_statein the next request.
Limit Value Request size 25MB, the whole multipart body Image size 2MB Pixels per image 8,294,400 (the area of a 3840x2160 image) Faces measured per image 2 by default, the largest; contact support to raise it Faces listed per image 32 Every image is checked before any is measured. One bad image fails the whole request, which then returns no results:
- Not a JPEG: rejected with
unsupported_media_type. - Over the image size or pixel limit: rejected with
image_too_large. - Cannot be decoded: rejected with
image_decode_failed, possibly after earlier images were measured.
- A face is skipped, and is not listed, if its detection confidence is below
-
-
-
from hume_expression_measurement import ExpressionMeasurementClient from hume_expression_measurement.environment import ExpressionMeasurementClientEnvironment client = ExpressionMeasurementClient( api_key="<value>", environment=ExpressionMeasurementClientEnvironment.PRODUCTION, ) client.video.measure( file=["example_file"], )
-
-
-
file:
typing.List[core.File]— The images, one JPEG perfilepart. Results are numbered by the order of the parts.
-
config:
typing.Optional[VideoFileConfig]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.list(...) -> RunsPage
-
-
-
Your organization's runs, newest first, one page at a time. The filters combine.
-
-
-
from hume_expression_measurement import ExpressionMeasurementClient from hume_expression_measurement.environment import ExpressionMeasurementClientEnvironment client = ExpressionMeasurementClient( api_key="<value>", environment=ExpressionMeasurementClientEnvironment.PRODUCTION, ) client.runs.list()
-
-
-
page_size:
typing.Optional[int]— How many runs to return.
-
cursor:
typing.Optional[str]— Thenext_cursorof the previous page. Pass it back unchanged.
-
user_id:
typing.Optional[str]— Only runs made by this user.
-
status:
typing.Optional[RunStatus]— Only runs with this status.
-
mode:
typing.Optional[RunMode]— Only runs that reached the API this way.
-
endpoint:
typing.Optional[RunEndpoint]— Only runs that measured this kind of media.
-
started_before:
typing.Optional[datetime.datetime]— Only runs that started before this time, in RFC 3339 format.
-
started_after:
typing.Optional[datetime.datetime]— Only runs that started at or after this time, in RFC 3339 format. Consecutive time ranges that share a boundary neither skip a run nor return one twice.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.get(...) -> Run
-
-
-
The run's status, when it started and ended, what it received and stored, and the configuration it ran under.
-
-
-
from hume_expression_measurement import ExpressionMeasurementClient from hume_expression_measurement.environment import ExpressionMeasurementClientEnvironment client = ExpressionMeasurementClient( api_key="<value>", environment=ExpressionMeasurementClientEnvironment.PRODUCTION, ) client.runs.get( run_id="01926f3a-5b1c-7d2e-8f40-3a9b7c1d2e5f", )
-
-
-
run_id:
str— The run's ID: thesession_idof a realtime session or therun_idof a file response.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.runs.list_events(...) -> RunEventsPage
-
-
-
The problems the run reported, in order: frames it rejected and failures it hit. A run that went well has none. Only realtime sessions record them.
-
-
-
from hume_expression_measurement import ExpressionMeasurementClient from hume_expression_measurement.environment import ExpressionMeasurementClientEnvironment client = ExpressionMeasurementClient( api_key="<value>", environment=ExpressionMeasurementClientEnvironment.PRODUCTION, ) client.runs.list_events( run_id="01926f2c-6d92-7a41-9d26-5e8b0c3f71a9", )
-
-
-
run_id:
str— The run's ID: thesession_idof a realtime session or therun_idof a file response.
-
page_size:
typing.Optional[int]— How many entries to return.
-
cursor:
typing.Optional[str]— Thenext_cursorof the previous page. Pass it back unchanged.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-