create_speech: Create Speech

View source: R/functions.R

create_speechR Documentation

Create Speech

Description

Generates audio from the input text.

Usage

create_speech(
  input,
  model,
  voice,
  response_format = NULL,
  speed = NULL,
  return_response = F
)

Arguments

input

(string) The text to generate audio for. The maximum length is 4096 characters. Required

model

(string) One of the available TTS models: tts-1 or tts-1-hd Required

voice

(string) The voice to use when generating the audio. Supported voices are alloy, echo, fable, onyx, nova, and shimmer. Required

response_format

(string) The format to audio in. Supported formats are mp3, opus, aac, and flac.

speed

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

return_response

(boolean) Whether to return the API response or parse the contents of the response. Defaults to FALSE (parse the response).

See Also

Open AI Documentation


samterfa/openai documentation built on Oct. 9, 2024, 5:18 p.m.