Descripciones en inglés
private-cartesia-voice-clones.{userId}
Progress of your Cartesia voice clones: one event per status change of a clone created via POST /voices/cartesia/clones (or in the web dashboard). Key permission: voices.read.
Parámetros del canal
Complete sus valores: aparecen en el nombre del canal, en el código de abajo y en la consola. No se envían a ninguna parte ni terminan en la URL de la página.
is the numeric id of the key owner, returned by GET /user.
Nombre del canal al que suscribirse
private-cartesia-voice-clones.{userId}
El nombre todavía contiene marcadores entre llaves. Así no puede suscribirse: el servidor autoriza los canales por nombre exacto.
import Pusher from 'pusher-js';
const pusher = new Pusher('7c4dd881d8116ac76fe89aff71d8c2ff', {
wsHost: 'ws.lumean.app',
wsPort: 443, wssPort: 443,
forceTLS: true,
enabledTransports: ['ws', 'wss'],
cluster: '',
channelAuthorization: {
endpoint: 'https://api.lumean.app/api/public/broadcasting/auth',
headers: { 'X-API-KEY': 'YOUR_API_KEY' },
},
});
const channel = pusher.subscribe('private-cartesia-voice-clones.{userId}');
channel.bind('voice_clone.updated', (data) => {
console.log(data);
});import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
window.Pusher = Pusher;
const echo = new Echo({
broadcaster: 'pusher',
key: '7c4dd881d8116ac76fe89aff71d8c2ff',
wsHost: 'ws.lumean.app',
wsPort: 443, wssPort: 443,
forceTLS: true,
enabledTransports: ['ws', 'wss'],
cluster: '',
authEndpoint: 'https://api.lumean.app/api/public/broadcasting/auth',
auth: { headers: { 'X-API-KEY': 'YOUR_API_KEY' } },
});
echo.private('cartesia-voice-clones.{userId}')
// el punto inicial es para Laravel Echo; pusher-js no lo lleva
.listen('.voice_clone.updated', (e) => {
console.log(e);
});# pip install websocket-client requests
import json, requests, websocket
APP_KEY = "7c4dd881d8116ac76fe89aff71d8c2ff"
WS_URL = "wss://ws.lumean.app:443/app/" + APP_KEY + "?protocol=7&client=python&version=1.0"
CHANNEL = "private-cartesia-voice-clones.{userId}"
ws = websocket.create_connection(WS_URL)
# 1. obtener socket_id del evento pusher:connection_established
hello = json.loads(ws.recv())
socket_id = json.loads(hello["data"])["socket_id"]
# 2. autorizar la suscripción privada con su clave API
auth = requests.post("https://api.lumean.app/api/public/broadcasting/auth",
headers={"X-API-KEY": "YOUR_API_KEY"},
data={"socket_id": socket_id, "channel_name": CHANNEL},
).json()["auth"]
# 3. suscribirse y escuchar eventos
ws.send(json.dumps({"event": "pusher:subscribe",
"data": {"auth": auth, "channel": CHANNEL}}))
while True:
print(ws.recv())Ejemplo de payload
Canal: private-cartesia-voice-clones.{userId}
Es un evento de ejemplo; no hay conexión. Para suscribirse necesita su clave API.
.voice_clone.updated
{
"voice_clone": {
"id": "<uuid>",
"provider": "cartesia",
"display_name": "string",
"language": "ru",
"description": "string",
"status": "pending",
"voice_id": "string",
"attempts": 1,
"error": {
"reason": "string",
"message": "string"
},
"created_at": "<date-time>",
"completed_at": "<date-time>",
"failed_at": "<date-time>",
"banned_at": "<date-time>",
"ban_reason": "string"
}
}Eventos del canal: 1
Cada evento tiene su propia ancla, una tabla completa del payload con descripciones y enums, y una forma de ejemplo. Los nombres se muestran en notación de Laravel Echo, con el punto inicial.
.voice_clone.updated
Echo: .voice_clone.updated · pusher-js: voice_clone.updated
A Cartesia voice clone was created or changed status (pending → cloning → ready or failed; archived after deletion; review — awaiting a moderator: the sample sounds like a public artist, after approval it moves to pending, otherwise to banned). voice_id appears only once the clone is ready — put it into tts_settings.voice_id of a Cartesia template.
Campos del payload
voice_cloneobligatorioobject
Clone status. banned — a moderator blocked the clone: it is not accepted for new orders and cannot be deleted; the reason is in ban_reason.
The Cartesia voice id — the value for tts_settings.voice_id of a template. Present only once the clone is ready, otherwise null.
errorobligatorioobject | null
processing_error, max_retries, network, timeout, dispatch_failed
Why a moderator blocked the clone, or null.
Ejemplo de payload
{
"voice_clone": {
"id": "<uuid>",
"provider": "cartesia",
"display_name": "string",
"language": "ru",
"description": "string",
"status": "pending",
"voice_id": "string",
"attempts": 1,
"error": {
"reason": "string",
"message": "string"
},
"created_at": "<date-time>",
"completed_at": "<date-time>",
"failed_at": "<date-time>",
"banned_at": "<date-time>",
"ban_reason": "string"
}
}Ejemplo de la forma del evento. Los valores son ilustrativos.
Todos los canales y parámetros de conexión·POST /broadcasting/auth
Esta página para IA
versión de la API 1.0.0