This is a specification to support recording background audio. As described in the feature post, we intend to release a first version of this feature in Collect v1.30 which would only include starting recording at the beginning of form entry and stopping when the form is exited. However, we are proposing a more comprehensive spec here so that the feature can be expanded on in the future.
Related: start-geopoint, audit, built-in audio recording
XLSForm
Add a new background-audio
type. The text in the name
column is chosen by the user and is the name of the field that has the audio recording. The only other column that can be used with this type is the parameters
column which accepts a key named quality
with values defined in the documentation. If the key is omitted, quality defaults to voice-only
. Specifying the external
quality results in a form conversion error.
type | name | parameters |
---|---|---|
background-audio | my_recording | quality=low |
XForms
Add a new bind attribute odk:background-audio
that applies to the binary
type. If set to true
for a binary
question, that question is automatically populated by the client with a background audio recording. Client behavior is undefined if an audio binary
question has the odk:background-audio
attribute set to true
and is bound to a body
element (XLSForm would never generate this). The XLSForm above would result in the following XForms output:
<bind nodeset="/data/my_recording" type="binary" odk:background-audio="true" odk:quality="low"/>
The odk:quality
attribute is considered for binary
fields with odk:background-audio
set to true
. Values voice-only
(default), normal
and low
are accepted and everything else is ignored.
There can be multiple binary
fields with the odk:background-audio
field set to true
but they will all be populated with the same filename.
Extensions
This design leaves the door open for additional XLSForm parameters/XForms bind attributes to configure recordings. Consider the following:
Type | name | parameters |
---|---|---|
background-audio | introduction | start=${intro}; end=${q1}; probability=.1 |
background-audio | conclusion | start=${q17}; end=${thanks} |
This might mean that for approximately one out of every 10 form filling sessions, the question with name intro
, the question named q1
, and all questions in between will be recorded. For all form filling sessions, the question named q17
, the question named thanks
and all questions in between will be recorded in a separate file.