Speech to Speech
Change the voice of your audio with AI
Orate provides a simple and unified API for changing the voice of your audio using various AI providers. The speech-to-speech functionality is accessible through the change
function.
Usage
The basic usage involves importing the change
function from Orate and your chosen provider. For example, to use ElevenLabs' speech-to-speech model, you can import the ElevenLabs
provider and use its sts
function:
model
The model
parameter is a function that returns a model instance. The model instance is a function that takes an audio file and returns a promise that resolves to the new audio.
audio
The audio
parameter is a File
object that contains the audio data to be changed.
Orate uses a File
object because it is supported by all major browsers and can be easily converted to other formats. Additionally, the various AI providers require the audio data to be in a specific format, and the File
object is the most convenient way to determine the audio format.