Packages

trait Audio extends AnyRef

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Audio
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def createSpeech(body: CreateSpeechRequest): ZIO[Any, OpenAIFailure, Chunk[Byte]]

    Generates audio from the input text.

  2. abstract def createTranscription(body: CreateTranscriptionRequest): ZIO[Any, OpenAIFailure, CreateTranscriptionResponse]

    Transcribes audio into the input language.

  3. abstract def createTranslation(body: CreateTranslationRequest): ZIO[Any, OpenAIFailure, CreateTranslationResponse]

    Translates audio into English.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. def createSpeech(model: Model, input: Input, voice: Voice, responseFormat: Optional[ResponseFormat] = Optional.Absent, speed: Optional[Speed] = Optional.Absent): ZIO[Any, 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-1 or tts-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, and shimmer. 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, and flac.

    speed

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

  7. 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[Any, 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-1 is 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, or vtt.

    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, or segment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.

  8. def createTranslation(file: File, model: Model, prompt: Optional[String] = Optional.Absent, responseFormat: Optional[String] = Optional.Absent, temperature: Optional[Double] = Optional.Absent): ZIO[Any, 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-1 is 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, or vtt.

    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.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped