sttp.openai.requests.audio.speech
Members list
Type members
Classlikes
object ResponseFormat
Attributes
- Companion
- class
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ResponseFormat.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
object SpeechModel
Attributes
- Companion
- class
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SpeechModel.type
case class SpeechRequestBody(model: SpeechModel, input: String, voice: Voice, responseFormat: Option[ResponseFormat], speed: Option[Float])
Represents the request body for generating speech from text.
Represents the request body for generating speech from text.
Value parameters
- input
-
The text to generate audio for. The maximum length is 4096 characters.
- model
-
One of the available TTS models: tts-1 or tts-1-hd.
- responseFormat
-
The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm. Defaults to mp3.
- speed
-
The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.
- voice
-
The voice to use when generating the audio. Supported voices are alloy, ash, coral, echo, fable, onyx, nova, sage, and shimmer. Previews of the voices are available in the Text to speech guide https://platform.openai.com/docs/guides/text-to-speech#voice-options.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
object SpeechRequestBody
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SpeechRequestBody.type
In this article