Module audio

Source
Expand description

Module for audio processing, including transcription, translation, and speech synthesis. This module defines the structures and methods for handling audio-based requests and responses. It includes functionality for audio transcription, translation, and speech synthesis. The module facilitates the creation, serialization, and deserialization of requests and responses related to these audio operations.

Features include:

  • AudioTranscriptionRequest: Handles requests for audio file transcription using specified models.
  • AudioTranscriptionResponse: Returns the transcription text along with optional headers.
  • AudioTranslationRequest: Manages requests for translating audio content using specific models.
  • AudioTranslationResponse: Delivers translated text and optional response headers.
  • AudioSpeechRequest: Manages requests for generating speech from text using designated voice models.
  • AudioSpeechResponse: Provides the success status of the speech synthesis operation and optional headers.

Constants for model and voice identifiers are also defined to standardize the references used across requests.

Structs§

AudioSpeechRequest
Represents a request for text-to-speech synthesis.
AudioSpeechResponse
Represents the response from a text-to-speech synthesis request.
AudioTranscriptionRequest
Represents a request for audio transcription.
AudioTranscriptionResponse
Represents the response from an audio transcription request.
AudioTranslationRequest
Represents a request for audio translation.
AudioTranslationResponse
Represents the response from an audio translation request.

Constants§

TTS_1
Constant for the TTS-1 model identifier.
TTS_1_HD
Constant for the TTS-1 HD model identifier.
VOICE_ALLOY
Constant for the Alloy voice model.
VOICE_ECHO
Constant for the Echo voice model.
VOICE_FABLE
Constant for the Fable voice model.
VOICE_NOVA
Constant for the Nova voice model.
VOICE_ONYX
Constant for the Onyx voice model.
VOICE_SHIMMER
Constant for the Shimmer voice model.
WHISPER_1