When submitting a response or fetching a score, each one has an associated type. Each type determines what
significance the response or score may have and, in some cases, also determines the structure of the
associated metadata. See below for details on each type of response or score, what it means, and how its
corresponding metadata is structured.
The following is a list of recognized response types. The enum value of the response type must be included
in every uploaded response.
Type |
Enum Value |
Data Structure |
Description |
Recorded Response |
recordedResponse |
{
"filename": "example.wav",
"duration": 4.2
}
-
• filename: The name of the file. (This corresponds to the filename
passed when uploading the recording.)
- • duration: The length of the audio file in seconds.
|
The response to any question where the subject answers by recording their voice.
Each recorded question must have a corresponding uploaded recording.
|
Text |
textField |
{
"value": "example text"
}
|
The response to any question involving a single line or multiline text field. |
Number |
numberField |
{
"value": 123.4
}
|
The response to any question involving a number field or a number picker. |
Date |
dateField |
{
"value": "2022-01-15"
}
- • value: An ISO-8601 compliant date string
|
The response to any question asking for a specific date. |
Time |
timeField |
{
"value": "13:30:00"
}
- • value: An ISO-8601 compliant time string in 24-hour format
|
The response to any question asking for a time of day. |
Date-Time |
dateTimeField |
{
"value": "2022-01-15T13:30:00Z"
}
-
• value: An ISO-8601 compliant datetime string with time zone
marker
|
The response to any question asking for a specific date and time. The time zone marker must be present,
either as an hour offset value or as “Z” denoting UTC time.
|
Multiple Choice |
multipleChoice |
{
"value": 3
}
- • value: The index (or indices) of the chosen option
|
The response to any question which gives a number of preset options for the subject to choose from. The
value can either be a single value or an array of values if the corresponsing question allows for
selecting multiple options.
|
Range Choice |
rangeChoice |
{
"value": 0.5
}
- • value: The chosen value within a given range
|
The response to any question where the answer must fall within a specified range. (i.e. A slider.)
|
The following is a list of all recognized non-verbal score types. These types will be present when fetching
scores via the Canary Speech API.
Type |
Enum Value |
Data Structure |
Description |
None |
none |
{
"value": 50
}
- • value: The static score value
|
No calculation was involved with this score. It is either a static value or a value taken directly from
a response.
|
Sum |
sum |
{
"value": 89
}
- • value: The calculated score value
|
This score is a summed value from one or more responses and/or one or more other scores. The value will
always be numeric.
|
Count |
count |
{
"value": 4
}
- • value: The calculated score value
|
This score references one or more responses and/or one or more other scores and counts how many of them
give a non-empty and non-falsey score. (i.e. Any value other than null, false, 0, empty strings, or
empty lists.) The value will always be numeric.
|
Concatenation |
concat |
{
"value": [1, 2, 3]
}
- • value: The calculated score value
|
This score references one or more responses and/or one or more other scores and concatenates their
values together. If all inputs are lists, the output will be a single list; if all inputs are maps, the
output will be a single map; otherwise, the output will be all inputs converted to a string (if
necessary) and concatenated to a single string.
|
Average |
average |
{
"value": 11.5
}
- • value: The calculated score value
|
This score sums the values of one or more response and/or one or more other scores, then performs a
numerical average on the sum. The value will always be numeric.
|
Mean, Median, and Mode |
mmm |
{
"value": {
"mean": 21.2,
"median": 24,
"mode": 17
}
}
-
• value: A map containing the calculated mean, median, and mode
values
|
This score derives statistical mean, median, and mode values from a collection of one or more responses
and/or one or more other scores.
|
Standard Deviation |
stddev |
{
"value": {
"average": 30,
"stddev": 1.2
}
}
-
• value: A map containing the calculated average and standard
deviation values
|
This score derives the statistical average and standard deviation from a collection of one or more
responses and/or one or more other scores.
|
Statistics |
stddev |
{
"value": {
"min": 0,
"max": 100,
"count": 23,
"sum": 426,
"mean": 18.5,
"median": 23,
"mode": 17,
"stddev": 6.5
}
}
- • value: The calculated statistical values (See description)
|
This score takes a collection of one or more responses and/or one or more other scores and calculates
the minimum/maximum values, length (count) and sum of the collection as well as deriving the statistical
mean, median, mode, and standard deviation.
|
In addition to calculated non-verbal scores, there are also scores based on vocal processing. The enum value
and structure of these scores vary depending on the target model used to process the audio files. The most
common ones are:
If your vocal score type isn't in this list, you may need to consult your personalized information packet
for the desired labels and values.