UNPKG

n8n-nodes-elevenlabs-langfix

Version:

Complete implementation of ElevenLabs AI voice generation into n8n workflows.

103 lines 3.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ElevenLabs = void 0; const listSearch_1 = require("./methods/listSearch"); const loadOptions_1 = require("./methods/loadOptions"); const history_1 = require("./resources/history"); const speech_1 = require("./resources/speech"); const user_1 = require("./resources/user"); const voice_1 = require("./resources/voice"); const debugRequest_1 = require("./methods/debugRequest"); class ElevenLabs { constructor() { this.description = { displayName: 'ElevenLabs', name: 'elevenLabs', icon: 'file:elevenlabs.svg', group: ['transform'], version: 1, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'Generate natural-sounding speech using ElevenLabs AI', defaults: { name: 'ElevenLabs', }, inputs: ['main'], outputs: ['main'], credentials: [ { name: 'elevenLabsApi', required: true, }, ], requestDefaults: { method: 'POST', baseURL: 'https://api.elevenlabs.io/v1', headers: { 'Content-Type': 'application/json', }, }, properties: [ { displayName: 'Resource', name: 'resource', type: 'options', noDataExpression: true, options: [ { name: 'Speech', value: 'speech', description: 'Generate speech from text or clone voices', }, { name: 'Voice', value: 'voice', description: 'Manage and create voices', }, { name: 'History', value: 'history', description: 'Access generation history', }, { name: 'User', value: 'user', description: 'Get user information and subscription', }, ], default: 'speech', routing: { send: { preSend: [debugRequest_1.debugRequest], }, }, }, { displayName: 'API Key Notice', name: 'apiKeyNotice', type: 'notice', default: 'You need an API key from ElevenLabs to use this node. Get it from your <a href="https://elevenlabs.io/app" target="_blank">ElevenLabs dashboard</a>.', displayOptions: { show: { resource: [ 'speech', 'voice', 'history', 'user', ], }, }, }, ...speech_1.SpeechOperations, ...voice_1.VoiceOperations, ...history_1.HistoryOperations, ...user_1.UserOperations, ], }; this.methods = { listSearch: listSearch_1.listSearch, loadOptions: loadOptions_1.loadOptions, }; } } exports.ElevenLabs = ElevenLabs; //# sourceMappingURL=ElevenLabs.node.js.map