Skip to content
Get started

Clone a voice

voices.clone_(**kwargs) -> VoiceCloneResponse { id, cartesia_voice_id, created_at, 2 more }
POST/voices/clone

Clone a voice from an audio recording. Send audio as a base64-encoded string. The cloned voice will be available in GET /voices.

ParametersExpand Collapse
audio: String

Base64-encoded audio data (max ~7.5MB decoded)

maxLength10000000
content_type: :"audio/webm" | :"audio/wav" | :"audio/mpeg" | 3 more

MIME type of the audio

One of the following:
:"audio/webm"
:"audio/wav"
:"audio/mpeg"
:"audio/ogg"
:"audio/mp4"
:"video/webm"
language: :en | :fr | :es | 5 more

Language of the voice

One of the following:
:en
:fr
:es
:de
:it
:pt
:ru
:zh
name: String

Name for the cloned voice

minLength1
ReturnsExpand Collapse
class VoiceCloneResponse { id, cartesia_voice_id, created_at, 2 more }
id: String
cartesia_voice_id: String
created_at: String
language: String
name: String

Clone a voice

require "revox"

revox = Revox::Client.new(api_key: "My API Key")

response = revox.voices.clone_(audio: "audio", content_type: :"audio/webm", language: :en, name: "x")

puts(response)
{
  "id": "id",
  "cartesiaVoiceId": "cartesiaVoiceId",
  "createdAt": "createdAt",
  "language": "language",
  "name": "name"
}
Returns Examples
{
  "id": "id",
  "cartesiaVoiceId": "cartesiaVoiceId",
  "createdAt": "createdAt",
  "language": "language",
  "name": "name"
}