1. Tasks
  2. Transcribe Task

Tasks

Transcribe Task

This task transcribes an audio file to text. Provided with a Stubber fileuuid, this task will transcribe the file and make the resulting text available in the data. This can be used for eg. voice notes in Whatsapp, or the voice note field in Stubber.

The rest of this document assumes familiarity with adding a task to a stub. See tasks documentation

Basic usage

loading...

Parameters

files

required
array
The files that should be transcribed. The supported formats are those that are supported by the whisper models, as can be seen here. It can also be seen that the file size limit is 25MB.

Default: null


model

required
string
The model that should be used for the transcription. Only whisper model versions are allowed at the moment. Only the whisper-1 model is supported at the moment. The latest information can be found here

Default: whisper-1


disable_model_response

optional
boolean
By default, the model will respond with the _update_from_transcribe_task feedback action. This can be disabled by setting this parameter to true.

Default: false


Result

loading...

Properties

request

object
The files that were used in the task, this is returned as a sanity check to make sure that properties like the fileuuid, filename and contentType are as expected.


response

object or array
The response is either an object or array, depending on the amount of files. If only a single file is supplied in the files parameter of the task, the response will be an object with the text property. If multiple files are supplied, the response will be an array with an object containing a text property for each file supplied.


Examples

Single voice note and disable model response

The task definition:

loading...
Result
loading...

Using multiple files

You can also pass multiple files to the transcribe task. With the Stubber voicenote field, you can record multiple voice notes in a single field, or you can add multiple voice notes fields, and pass the first file of each field as an item in the files array. The latter approach is applied here.

The task definition:

loading...
Result
loading...