Skip to main content
All CollectionsWrk Action LibraryOpenAI
Perform text to speech using OpenAI
Perform text to speech using OpenAI
Wrk Product avatar
Written by Wrk Product
Updated over a week ago

Convert a piece of text into an audio file.

Application

  • OpenAI GPT

Inputs (what you have)

Name

Description

Data Type

Required?

Example

Text

The text to generate audio for. The maximum length is 4096 characters.

Text (Long)

Yes

Voice

The voice to use when generating the audio. Previews of the voices are available here: https://platform.openai.com/docs/guides/text-to-speech/voice-options

Pre-defined choice list

Yes

Model

Defaults to using the tts-1 model optimized for speed

Pre-defined choice list

No

Output file format

Defaults to mp3 format output audio file

Pre-defined choice list

No

Speed

The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default

Number w/ decimals

No

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data library section. These variables in the Data library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

Name

Description

Data Type

Required?

Example

Audio file

The output audio file

File

Yes

Outcomes

Name

Description

Success

This status is selected if the speech is recorded successfully to text

Impossible to complete

This status is selected in the event of the following scenarios:

  • The text provided has more than 4096 characters

  • Voice, Model, Output file format, or Speed provided are not in the acceptable inputs

Requirements

  • N/A

Did this answer your question?