Audio recorder (audio)
Allows the learner to use a microphone to record their voice as an answer to the Question.
The multiple choice Question is referenced by its type
in the code, which is "audio"
.
- Read the authoring documentation for a description of what this Question does.
- See this Question type in action in this demo (go to Question 2).
Examples
{
"response_id": "60001",
"type": "audio",
"stimulus": "Talk about yourself."
}
Attributes
-
type string
Defines the Question type to be rendered.
Must be set to
"audio"
in this case. -
is_math boolean
Indicates whether this Question contains math content.
When set to
true
it will render LaTeX or MathML content with MathJax.You would want to use this when including math expressions in this Question type.
Default:
false
-
metadata object
Object containing additional information about the Question.
-
metadata.distractor_rationale string
Used to display individual response feedback/rationale to the learner.
-
metadata.rubric_reference string
A unique identifier for the rubric to be used with the Question - defaults to course rubric if assigned in Activity
-
metadata.sample_answer string
A sample answer to be displayed on the Learnosity Reports API. HTML is supported.
-
metadata.acknowledgements string
References for any text passages, documents, images etc. used in the Question.
-
stimulus string
The Question prompt shown to the learner. This can include text, tables, images, resources, and LaTeX entered via the math editor.
-
stimulus_review string
Alternative content which will override the stimulus in review mode.
This is intended as a field that contains an alternative/abbreviated version of the Question's stimulus, that will only show in review mode. This means that the content in this field is not visible to the learner, and it is also not possible to preview it using the Author Site. HTML and simple Features are supported.
-
instructor_stimulus string
Additional notes for the educator that appears above the stimulus.
For example, the content entered in this field could be used as notes during an assessment and could contain extra instructions that must be read out to the learners.
This content will be shown when the
showInstructorStimulus
initialization option is set totrue
. HTML and simple Features are supported. -
ui_style object
Object used to control different aspects of the UI.
-
ui_style.fontsize string
Controls the size of base font for this question. Options are among 'small', 'normal', 'large', 'xlarge' and 'xxlarge'.
Default: "normal"
-
ui_style.download_link boolean
Controls whether a link to download the audio asset is shown in the UI.
-
ui_style.pause boolean
Controls whether the pause button is shown in the UI during audio playback .
Default:
true
-
ui_style.pause_recording boolean
Controls whether the pause button is shown in the UI during audio recording.
Default:
true
-
ui_style.play boolean
Controls whether the play button is shown in the UI audio playback.
You would want to use this to replace the play button with your own custom button.
Default:
true
-
ui_style.play_bubble boolean
Controls whether a tooltip panel appears during playback with the audio waveform, elapsed time, pause and play buttons, etc.
Note Only available when the
ui_style.type
audio player type is set to"button"
.Default:
true
-
ui_style.progress_bar boolean
Controls whether a visual indicator is shown to the learner, displaying how much time they have left for recording. In playback mode, it will show the playback progress.
Default:
true
-
ui_style.record_bubble boolean
Controls whether a tooltip panel appears during recording with the audio level indicator, elapsed time, pause and play recording buttons, etc.
Note Only available when the
ui_style.type
audio player type is set to"button"
.Default:
true
-
ui_style.seek boolean
Controls whether the learner is able to change the playback position by clicking on the progress bar.
Note Only available when the
ui_style.play
andui_style.progress_bar
options are set totrue
.Default:
true
-
ui_style.start_recording boolean
Controls whether the record button is shown.
You would want to use this to replace the record button with your own custom button.
Default:
true
-
ui_style.stop_recording boolean
Controls whether the pause button is shown.
Default:
true
-
ui_style.timer boolean
Controls whether the length of the recording will be shown.
Default:
true
-
ui_style.type string
Selects the type of audio recorder and player presentation to use.
Default:
"block"
Possible values
"block"
"button"
-
ui_style.volume_control boolean
Controls whether the volume control is shown.
Default:
true
-
ui_style.volume_meter boolean
Controls whether the volume meter is shown for audio playback.
Note Only available when the
ui_style.play
is set totrue
and theui_style.type
is set to"block"
.Default:
true
-
ui_style.waveform boolean
Controls whether a visual audio wave image will be shown on playback.
Note Only available when the
ui_style.play
is set totrue
.Default:
true
-
ui_style.responsive_layout boolean
Controls whether the audio Question type will be scaled responsively, based on the size of its container.
Default:
true
-
validation object
In this section, configure the correct answer(s) for the question.
-
validation.max_score number
The highest score a marker can award to this question response.
-
validation.min_score_if_attempted number
Positive value indicating the minimum score if a learner attempted the Question.
Default:
0
-
validation.unscored boolean
When enabled, this option will remove all scoring from the question. This is useful for creating practice questions.
Default:
false
-
description string
Deprecated See stimulus_review.
Description of the question and its context to be displayed. It supports HTML entities. -
counter object
Configuration options for showing a message and a countdown timer until the recording begins.
See below for configurable attributes for each object.
-
counter.length number
Sets the number of seconds before the recording starts.
Default:
5
-
counter.template string
Sets a custom message for the countdown.
If custom message is not provided then default message is used.
The dynamic countdown number placeholder can be added to the string as
{num}
.Default:
"Beginning in {num} seconds..."
-
max_length number
The maximum length of the audio recording, in seconds.
Maximum length: 3600 (one hour).
Default:
600
(10 minutes) -
overwrite_warning boolean
Controls whether a warning is shown to the learner when re-recording audio.
Default:
true
-
recording_cue boolean
Controls whether a beep audio cue is played before the recording starts.
Default:
true
-
show_download_link boolean
A link to download the student's recorded audio file will appear in review state.
Default:
false
-
silence_stop_duration number
Sets the duration of audio silence detection, in seconds, before the recording is stopped automatically.
Setting this value to
0
will disable the silence detection.Default:
0
Response format
The data returned in the response format for this Question has information about the recorded audio file, which the learner has recorded in response to the Question.
Response format examples
{
"location": "0034/questionresponse/2019/265/0034_testing_user_01__4cbd3128-e3ab-412a-ab8f-aaf2ef96ed0d.v0",
"type": "audio+png",
"length": 3065,
"created": "2019-09-23T04:12:35.678Z",
"apiVersion": "v2.173.0",
"revision": 1,
"uris": {
"mp3": "https://.../....mp3",
"png": "https://.../....png"
}
}
Response attributes
-
location string
The unique key of the recorded audio file.
-
type string
Informs the scoring engine about what kind of data to expect in the values entered by the learner.
Must be set to
"array"
. -
length number
The length of the recorded audio file, in seconds.
-
apiVersion string
The version of the Questions API that returned this response.
-
revision numeric
Keeps track of the number of Question attempts and submissions, meaning, how many times the learner answered the Question and submitted it.
-
uris object
Universal Resource Indicators (links) for the recorded MP3 audio file and PNG graphic file of the waveform.