Participant activities

Voice responses

Understand recording duration, file retention, and upload policy.

Reviewed
On this page

Voice questions

Use a survey question of type voice to collect a recording. The app needs RECORD_AUDIO permission and an available microphone. The file and duration are linked through audio metadata. Recording and speech transcription are distinct features; a transcript is not guaranteed for every recording.

CODE
{
  "id": "demo-voice",
  "type": "voice",
  "label": "Describe something memorable from today.",
  "required": true,
  "minDurationMs": 30000,
  "maxDurationMs": 60000
}

The 30–60 second range is an example, not a universal study setting. If both minute and millisecond constraints are supplied, the model gives minute settings priority.

File storage policy

audioStorageBehavior
LOCAL_ONLYUse local files and skip audio uploads
FIREBASE_ONLYServer-oriented upload, with local path removal and file cleanup after success
BOTHRetain local files and upload them

The default is FIREBASE_ONLY when omitted. If the overall storage mode is local_only, submission treats audio as LOCAL_ONLY too. FIREBASE_ONLY is a historical policy name; the actual uploader follows the selected backend.

Upload and submission state

The server-only policy has a failure path that reports upload errors instead of completing submission successfully. Do not assume every voice survey can finish offline. Check retry behavior after connectivity returns and confirm that the local file still exists.

Metadata includes question ID, local/remote paths, durationMs, creation time, and upload state. Verify response-metadata storage separately from successful audio-file upload.

Research interface example

INSPIRE voice survey, an example from the research app dated May 11, 2026

Source: MD4BD presentation, September 17, 2026, page 14. The interface and study-specific recording limits are not defaults for every current study.

Documentation evidence

Working-tree baseline · source paths · HEAD 8213e6b7

  • plugins/survey/src/main/java/com/hdil/datacollection/survey/SurveyModels.kt
  • plugins/survey/src/main/java/com/hdil/datacollection/survey/AudioMeta.kt
  • plugins/survey/src/main/java/com/hdil/datacollection/survey/component/voice/AudioRecorder.kt
  • app/src/main/java/com/hdil/datacollection/ingest/SurveyResponseSubmitterImpl.kt
  • app/src/main/java/com/hdil/datacollection/ingest/SupabaseAudioUploader.kt
  • app/src/main/java/com/hdil/datacollection/di/RemoteDataSourceModule.kt
  • plugins/survey/src/main/java/com/hdil/datacollection/survey/component/voice/VoiceInputViewModel.kt
DTRAC AndroidYonsei University · Bongshin Lee’s research team