The challenge
We have a set of audio recordings and we need to obtain a transcription of each recording. We ask performers to listen to the recordings and type what they hear. Here’s what it might look like:
{
"vars": {
"validString": {
"type": "condition.all",
"conditions": [
{
"type": "condition.schema",
"schema": {
"type": "string",
"pattern": "^[a-zA-Z\\*\\s]{1,}$"
}
}
],
"hint": "Use only lowercase letters and spaces"
}
},
"view": {
"type": "view.list",
"items": [
{
"type": "view.audio",
"validation": {
"type": "condition.played-fully",
"hint": "You didn't listen to the recording"
},
"url": {
"type": "data.input",
"path": "audio"
}
},
{
"type": "view.text"
},
{
"type": "field.text",
"label": "Transcription text",
"data": {
"type": "data.output",
"path": "result_unformat"
},
"validation": {
"$ref": "vars.validString"
}
}
]
},
"plugins": [
{
"type": "plugin.trigger",
"onChangeOf": {
"type": "data.output",
"path": "result_unformat"
},
"action": {
"type": "action.set",
"data": {
"type": "data.output",
"path": "result"
},
"payload": {
"type": "helper.text-transform",
"transformation": "lowercase",
"data": {
"type": "helper.replace",
"data": {
"type": "data.output",
"path": "result_unformat"
},
"find": "/(\\s{2,})/",
"replace": " "
}
}
}
},
{
"type": "plugin.toloka",
"layout": {
"kind": "scroll",
"taskWidth": 900
}
},
{
"type": "plugin.hotkeys",
"q": {
"type": "action.play-pause",
"view": {
"$ref": "view.items.0"
}
}
}
]
}