Button for recording and uploading an audio file

To add a button to the task for recording and uploading an audio file, use the {{field type="file" sources="RECORDER" fileType="AUDIO" name="<output field name>"}} component. For example:

{{field type="file" name="result" sources="RECORDER" fileType="AUDIO" label="Record audio"}}

For a complete list of parameters, see the table.

Add a field with the file type in the output data description. For example:

{
  "result": {
    "type": "file",
    "required": true
  }
}

Create tasks for mobile devices if you want to use the button for recording and uploading audio files, because these devices have a built-in voice recorder. Set the Client = Mobile Toloka filter in the pool or choose a preset group of mobile users.

Full list of parameters

Parameter

Description

Required

Default value

type

Field type: file — Button for file upload.

yes

no

name

Attribute for the output data field. Contains the output field name.

yes

no

sources
File source: RECORDER — Built-in voice recorder in the device. yes no
fileType
File type: AUDIO — Audio recording. yes no
label

The button label. For example, label="Click me".

no

Depending on the interface language, it could be “Загрузить файл” (Russian), “Upload file” (English), “Dosya yükle” (Turkish), or “Unggah file” (Indonesian).

validation-show

The position of popup hints (displayed if the response didn't pass validation). The position is relative to the input field.

Supported values:

  • Above the input field: "top-left", "top-center", "top-right".

  • Below the input field: "bottom-left", "bottom-center", "bottom-right".

  • To the left of the input field: "left-top", "left-center", "left-bottom".

  • To the right of the input field: "right-top", "right-center", "right-bottom".

  • Don't display the message ("false").

no

"top-left"