{
  "name": "Clone voices from text to speech with Zyphra Zonos API",
  "nodes": [
    {
      "id": "76f2c278-c769-443f-8aa5-541713323b51",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -560,
        60
      ]
    },
    {
      "id": "0772d98e-7cd8-487d-a3db-26c3d6d50304",
      "name": "Set Clone Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -340,
        60
      ]
    },
    {
      "id": "b3dc1528-90d7-4397-83e6-18c5f2dbf495",
      "name": "Read Sample Voice",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        40,
        60
      ]
    },
    {
      "id": "86e0f9bf-ccec-4bb1-b9ce-7d1b94fdfcca",
      "name": "Check File Loaded",
      "type": "n8n-nodes-base.if",
      "position": [
        560,
        -80
      ]
    },
    {
      "id": "2980ae94-30e3-4065-8d2c-b607c73c3c5f",
      "name": "Call Zyphra Clone API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        980,
        -120
      ]
    },
    {
      "id": "0f896518-98ce-4176-8977-1f0380b54469",
      "name": "Save Cloned Audio",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1440,
        0
      ]
    },
    {
      "id": "02f1b766-953a-4834-8d93-4cc596ffe77c",
      "name": "Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1660,
        0
      ]
    },
    {
      "id": "7da98d65-08e3-4d6e-9957-ead2c8f1133f",
      "name": "File Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        860,
        480
      ]
    },
    {
      "id": "44006f98-4241-436d-b8cf-1c586271a35a",
      "name": "API Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1100,
        480
      ]
    },
    {
      "id": "e2c14808-e209-4daf-93dd-9c7049261e60",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1880,
        100
      ]
    },
    {
      "id": "8268fd4a-fd84-4462-9ad1-9af8152d0cf3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -1200
      ],
      "parameters": {
        "width": 780,
        "height": 340,
        "content": "🎙️ VOICE CLONING WORKFLOW - ZONOS API\n═══════════════════════════════════════\nThis workflow clones voices using Zyphra's Zonos API\n📋 Input: Text + sample voice file + parameters  \n🎵 Output: Generated "
      }
    },
    {
      "id": "cdbb775f-8408-43a9-89b1-1039315c6678",
      "name": "Base64 convertor",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        -80
      ]
    },
    {
      "id": "88b0131c-f93b-4593-9c88-ed4f91b74c88",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -740
      ],
      "parameters": {
        "width": 780,
        "height": 1020,
        "content": "📥 REQUIRED WEBHOOK PARAMETERS\n══════════════════════════════\n✅ text: Text to synthesize\n✅ sample_voice_path: Path to your voice sample file  \n✅ output_path: Where to save generated audio\n\n🔧 OPTIONAL P"
      }
    },
    {
      "id": "3be24130-054d-4435-9aac-d5ad9c7b92d0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -380
      ],
      "parameters": {
        "width": 480,
        "height": 460,
        "content": "🔐 API KEY CONFIGURATION REQUIRED!\n═══════════════════════════════════\n1️⃣ Register account at: playground.zyphra.com  \n2️⃣ Get API key from: playground.zyphra.com/settings/api-keys\n3️⃣ Add key to \"Cal"
      }
    },
    {
      "id": "08780e5a-4663-4a0d-aeff-69f4059495ce",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -280
      ],
      "parameters": {
        "width": 740,
        "height": 560,
        "content": "📁 FILE HANDLING PROCESS\n════════════════════════\n1. Read sample voice from specified path\n2. Convert audio file to base64 format\n3. Validate file loaded successfully  \n\n⚠️ IMPORTANT: Ensure sample voi"
      }
    },
    {
      "id": "223743b2-aeb2-45cc-8094-9bef48fc815e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        180
      ],
      "parameters": {
        "width": 480,
        "height": 480,
        "content": "🚨 ERROR HANDLING & RESPONSES\n═════════════════════════════\n✅ SUCCESS: Returns success message + filename\n❌ FILE_NOT_FOUND: Sample voice file missing/unreadable\n❌ API_ERROR: Zyphra API request failed\n❌"
      }
    },
    {
      "id": "939714c2-9feb-4ccb-b3b6-fd133c65c56a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        -220
      ],
      "parameters": {
        "width": 660,
        "height": 540,
        "content": "🎵 OUTPUT DETAILS\n═════════════════\n📍 Location: [output_path]/cloned_voice_[timestamp].webm\n📊 Format: Specified by mime_type parameter\n🕐 Filename: Auto-generated with timestamp\n📝 Response: JSON with su"
      }
    },
    {
      "id": "0a90485e-417a-415e-a9a4-f128aea6b9f1",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -440
      ],
      "parameters": {
        "width": 700,
        "height": 440,
        "content": "POST http://localhost:5678/webhook-test/voice-clone\nContent-Type: application/json\n\n{\n  \"text\": \"Hello there, kupo! This voice sounds just like the sample!\",\n  \"speaking_rate\": 18,\n  \"sample_voice_pat"
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Set Clone Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Base64 convertor": {
      "main": [
        [
          {
            "node": "Check File Loaded",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Response": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check File Loaded": {
      "main": [
        [
          {
            "node": "Call Zyphra Clone API",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "File Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Sample Voice": {
      "main": [
        [
          {
            "node": "Base64 convertor",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "File Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Cloned Audio": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API Error Response": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Error Response": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Clone Parameters": {
      "main": [
        [
          {
            "node": "Read Sample Voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Zyphra Clone API": {
      "main": [
        [
          {
            "node": "Save Cloned Audio",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "API Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}