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
Parameters
required array of objects
files An array of file objects 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.
Show child attributes
required string
fileuuid The unique identifier of the file that should be transcribed.
required string
model 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
optional boolean
disable_model_response 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
Properties
object
request 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.
object or array
response 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:
Result
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: