object Audio
- Alphabetic
- By Inheritance
- Audio
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def createSpeech(model: Model, input: Input, voice: Voice, responseFormat: Optional[ResponseFormat] = Optional.Absent, speed: Optional[Speed] = Optional.Absent): ZIO[Audio, OpenAIFailure, Chunk[Byte]]
Generates audio from the input text.
Generates audio from the input text.
- model
One of the available [TTS models](/docs/models/tts):
tts-1ortts-1-hd- input
The text to generate audio for. The maximum length is 4096 characters.
- voice
The voice to use when generating the audio. Supported voices are
alloy,echo,fable,onyx,nova, andshimmer. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).- responseFormat
The format to audio in. Supported formats are
mp3,opus,aac, andflac.- speed
The speed of the generated audio. Select a value from
0.25to4.0.1.0is the default.
- def createSpeech(body: CreateSpeechRequest): ZIO[Audio, OpenAIFailure, Chunk[Byte]]
Generates audio from the input text.
- def createTranscription(file: File, model: Model, language: Optional[String] = Optional.Absent, prompt: Optional[String] = Optional.Absent, responseFormat: Optional[ResponseFormat] = Optional.Absent, temperature: Optional[Double] = Optional.Absent, timestampGranularities[]: Optional[Chunk[TimestampGranularities[]Item]] = Optional.Absent): ZIO[Audio, OpenAIFailure, CreateTranscriptionResponse]
Transcribes audio into the input language.
Transcribes audio into the input language.
- file
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
- model
ID of the model to use. Only
whisper-1is currently available.- language
The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.
- prompt
An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.
- responseFormat
The format of the transcript output, in one of these options:
json,text,srt,verbose_json, orvtt.- temperature
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
- timestampGranularities[]
The timestamp granularities to populate for this transcription. Any of these options:
word, orsegment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
- def createTranscription(body: CreateTranscriptionRequest): ZIO[Audio, OpenAIFailure, CreateTranscriptionResponse]
Transcribes audio into the input language.
- def createTranslation(file: File, model: Model, prompt: Optional[String] = Optional.Absent, responseFormat: Optional[String] = Optional.Absent, temperature: Optional[Double] = Optional.Absent): ZIO[Audio, OpenAIFailure, CreateTranslationResponse]
Translates audio into English.
Translates audio into English.
- file
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
- model
ID of the model to use. Only
whisper-1is currently available.- prompt
An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.
- responseFormat
The format of the transcript output, in one of these options:
json,text,srt,verbose_json, orvtt.- temperature
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
- def createTranslation(body: CreateTranslationRequest): ZIO[Audio, OpenAIFailure, CreateTranslationResponse]
Translates audio into English.
- def default: ZLayer[Any, Throwable, Audio]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def live: ZLayer[Client, Nothing, Audio]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])