@marcmeese/n8n-nodes-communityapi-ai-client 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +290 -0
- package/dist/config/endpoints.d.ts +84 -0
- package/dist/config/endpoints.js +162 -0
- package/dist/config/endpoints.js.map +1 -0
- package/dist/credentials/CommunityAPIAIServer.credentials.d.ts +9 -0
- package/dist/credentials/CommunityAPIAIServer.credentials.js +36 -0
- package/dist/credentials/CommunityAPIAIServer.credentials.js.map +1 -0
- package/dist/credentials/marcmeeselogo.png +0 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/AdvancedVoice/AdvancedVoice.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/AdvancedVoice/AdvancedVoice.node.js +191 -0
- package/dist/nodes/CommunityAPIAIServer/AdvancedVoice/AdvancedVoice.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/AdvancedVoice/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/AudioDatasetCreator/AudioDatasetCreator.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/AudioDatasetCreator/AudioDatasetCreator.node.js +186 -0
- package/dist/nodes/CommunityAPIAIServer/AudioDatasetCreator/AudioDatasetCreator.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/AudioDatasetCreator/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageModifyFaceswapDetailer/ComfyuiImageModifyFaceswapDetailer.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageModifyFaceswapDetailer/ComfyuiImageModifyFaceswapDetailer.node.js +142 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageModifyFaceswapDetailer/ComfyuiImageModifyFaceswapDetailer.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageModifyFaceswapDetailer/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleFluxMagnific/ComfyuiImageUpscaleFluxMagnific.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleFluxMagnific/ComfyuiImageUpscaleFluxMagnific.node.js +160 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleFluxMagnific/ComfyuiImageUpscaleFluxMagnific.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleFluxMagnific/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSdxlClarity/ComfyuiImageUpscaleSdxlClarity.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSdxlClarity/ComfyuiImageUpscaleSdxlClarity.node.js +160 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSdxlClarity/ComfyuiImageUpscaleSdxlClarity.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSdxlClarity/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSeedvr2/ComfyuiImageUpscaleSeedvr2.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSeedvr2/ComfyuiImageUpscaleSeedvr2.node.js +170 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSeedvr2/ComfyuiImageUpscaleSeedvr2.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleSeedvr2/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleStablesr/ComfyuiImageUpscaleStablesr.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleStablesr/ComfyuiImageUpscaleStablesr.node.js +170 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleStablesr/ComfyuiImageUpscaleStablesr.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/ComfyuiImageUpscaleStablesr/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/DownloadJob/DownloadJob.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/DownloadJob/DownloadJob.node.js +147 -0
- package/dist/nodes/CommunityAPIAIServer/DownloadJob/DownloadJob.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/DownloadJob/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsSTS/ElevenLabsSTS.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsSTS/ElevenLabsSTS.node.js +266 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsSTS/ElevenLabsSTS.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsSTS/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsTTS/ElevenLabsTTS.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsTTS/ElevenLabsTTS.node.js +285 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsTTS/ElevenLabsTTS.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/ElevenLabsTTS/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/GetJob/GetJob.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/GetJob/GetJob.node.js +51 -0
- package/dist/nodes/CommunityAPIAIServer/GetJob/GetJob.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/GetJob/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/GetUserInfo/GetUserInfo.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/GetUserInfo/GetUserInfo.node.js +41 -0
- package/dist/nodes/CommunityAPIAIServer/GetUserInfo/GetUserInfo.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/GetUserInfo/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/GptVision/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/MultimediaTranscriber/MultimediaTranscriber.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/MultimediaTranscriber/MultimediaTranscriber.node.js +157 -0
- package/dist/nodes/CommunityAPIAIServer/MultimediaTranscriber/MultimediaTranscriber.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/MultimediaTranscriber/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/Soundstorm/Soundstorm.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/Soundstorm/Soundstorm.node.js +191 -0
- package/dist/nodes/CommunityAPIAIServer/Soundstorm/Soundstorm.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/Soundstorm/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/TopazVideoUpscale/TopazVideoUpscale.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/TopazVideoUpscale/TopazVideoUpscale.node.js +163 -0
- package/dist/nodes/CommunityAPIAIServer/TopazVideoUpscale/TopazVideoUpscale.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/TopazVideoUpscale/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFile/UploadFile.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFile/UploadFile.node.js +115 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFile/UploadFile.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFile/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFiles/UploadFiles.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFiles/UploadFiles.node.js +132 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFiles/UploadFiles.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/UploadFiles/marcmeeselogo.png +0 -0
- package/dist/nodes/CommunityAPIAIServer/WebpageScraper/WebpageScraper.node.d.ts +6 -0
- package/dist/nodes/CommunityAPIAIServer/WebpageScraper/WebpageScraper.node.js +147 -0
- package/dist/nodes/CommunityAPIAIServer/WebpageScraper/WebpageScraper.node.js.map +1 -0
- package/dist/nodes/CommunityAPIAIServer/WebpageScraper/marcmeeselogo.png +0 -0
- package/dist/utils/fileUploads.d.ts +37 -0
- package/dist/utils/fileUploads.js +166 -0
- package/dist/utils/fileUploads.js.map +1 -0
- package/dist/utils/inputProcessing.d.ts +29 -0
- package/dist/utils/inputProcessing.js +147 -0
- package/dist/utils/inputProcessing.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mGAAsF;AAA7E,wIAAA,oBAAoB,OAAA;AAC7B,4FAA0E;AAC1E,kFAAgE;AAChE,0FAAwE;AACxE,4FAA0E;AAC1E,4FAA0E;AAC1E,gHAA8F;AAC9F,4GAA0F;AAC1F,oIAAkH;AAClH,kIAAgH;AAChH,4HAA0G;AAC1G,0HAAwG;AACxG,0IAAwH;AACxH,wGAAsF;AACtF,gGAA8E;AAC9E,0FAAwE;AACxE,gGAA8E;AAC9E,gGAA8E;AAC9E,kGAAgF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
+
export declare class AdvancedVoice implements INodeType {
|
|
4
|
+
description: INodeTypeDescription;
|
|
5
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdvancedVoice = void 0;
|
|
4
|
+
const endpoints_1 = require("../../../config/endpoints");
|
|
5
|
+
class AdvancedVoice {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: '(AI) Advanced Voice',
|
|
9
|
+
name: 'aiToolsAdvancedVoice',
|
|
10
|
+
icon: 'file:marcmeeselogo.png',
|
|
11
|
+
group: ['transform'],
|
|
12
|
+
version: 1,
|
|
13
|
+
description: 'Create advanced voice synthesis using AI models',
|
|
14
|
+
defaults: { name: 'AdvancedVoice' },
|
|
15
|
+
inputs: ['main'],
|
|
16
|
+
outputs: ['main'],
|
|
17
|
+
credentials: [
|
|
18
|
+
{
|
|
19
|
+
name: 'CommunityAPIAIServer',
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
properties: [
|
|
24
|
+
{
|
|
25
|
+
displayName: 'Scripts',
|
|
26
|
+
name: 'scripts',
|
|
27
|
+
type: 'string',
|
|
28
|
+
typeOptions: {
|
|
29
|
+
multipleValues: true,
|
|
30
|
+
},
|
|
31
|
+
required: true,
|
|
32
|
+
default: [],
|
|
33
|
+
description: "Scripts to be used for voice synthesis",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Instruction',
|
|
37
|
+
name: 'instruction',
|
|
38
|
+
type: 'string',
|
|
39
|
+
required: true,
|
|
40
|
+
default: 'Speak in a happy and energetic tone.',
|
|
41
|
+
description: 'Instruction on how to speak for the voice synthesis',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
displayName: 'Language',
|
|
45
|
+
name: 'language',
|
|
46
|
+
type: 'options',
|
|
47
|
+
required: true,
|
|
48
|
+
options: [
|
|
49
|
+
{ name: 'German', value: 'german' },
|
|
50
|
+
{ name: 'English', value: 'english' },
|
|
51
|
+
],
|
|
52
|
+
default: 'german',
|
|
53
|
+
description: 'The language in which the scripts are written.',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Gender',
|
|
57
|
+
name: 'gender',
|
|
58
|
+
type: 'options',
|
|
59
|
+
required: true,
|
|
60
|
+
options: [
|
|
61
|
+
{ name: 'Male', value: 'male' },
|
|
62
|
+
{ name: 'Female', value: 'female' }
|
|
63
|
+
],
|
|
64
|
+
default: 'male',
|
|
65
|
+
description: 'The gender of the voice to be used for synthesis.',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Target format',
|
|
69
|
+
name: 'target_format',
|
|
70
|
+
type: 'options',
|
|
71
|
+
required: true,
|
|
72
|
+
options: [
|
|
73
|
+
{ name: 'mp3', value: 'mp3' },
|
|
74
|
+
{ name: 'wav', value: 'wav' },
|
|
75
|
+
],
|
|
76
|
+
default: 'mp3',
|
|
77
|
+
description: 'Target audio format for the output files.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
displayName: 'Speed',
|
|
81
|
+
name: 'speed',
|
|
82
|
+
type: 'number',
|
|
83
|
+
required: false,
|
|
84
|
+
default: 1.0,
|
|
85
|
+
description: 'Speed of the voice synthesis (must be > 0)',
|
|
86
|
+
typeOptions: {
|
|
87
|
+
minValue: 0.1,
|
|
88
|
+
maxValue: 8.0,
|
|
89
|
+
numberPrecision: 2,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
displayName: 'Callback URL',
|
|
94
|
+
name: 'callback_url',
|
|
95
|
+
type: 'string',
|
|
96
|
+
required: false,
|
|
97
|
+
default: '',
|
|
98
|
+
description: 'Eine optionale URL, die aufgerufen wird, wenn der Job abgeschlossen ist',
|
|
99
|
+
typeOptions: {
|
|
100
|
+
alwaysOpenEditWindow: true,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
displayName: 'Callback Data',
|
|
105
|
+
name: 'callback_payload',
|
|
106
|
+
type: 'fixedCollection',
|
|
107
|
+
placeholder: 'Add Callback Data',
|
|
108
|
+
description: 'Custom data that will be returned with the job completion notification',
|
|
109
|
+
default: {},
|
|
110
|
+
typeOptions: {
|
|
111
|
+
multipleValues: true,
|
|
112
|
+
},
|
|
113
|
+
options: [
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Parameters',
|
|
116
|
+
name: 'parameters',
|
|
117
|
+
values: [
|
|
118
|
+
{
|
|
119
|
+
displayName: 'Key',
|
|
120
|
+
name: 'key',
|
|
121
|
+
type: 'string',
|
|
122
|
+
default: '',
|
|
123
|
+
description: 'Parameter key',
|
|
124
|
+
required: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
displayName: 'Value',
|
|
128
|
+
name: 'value',
|
|
129
|
+
type: 'string',
|
|
130
|
+
default: '',
|
|
131
|
+
description: 'Parameter value (can be mapped from previous nodes)',
|
|
132
|
+
required: true,
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
async execute() {
|
|
142
|
+
const items = this.getInputData();
|
|
143
|
+
const returnData = [];
|
|
144
|
+
for (let i = 0; i < items.length; i++) {
|
|
145
|
+
const scripts = this.getNodeParameter('scripts', i);
|
|
146
|
+
const instruction = this.getNodeParameter('instruction', i);
|
|
147
|
+
const language = this.getNodeParameter('language', i);
|
|
148
|
+
const gender = this.getNodeParameter('gender', i);
|
|
149
|
+
const targetFormat = this.getNodeParameter('target_format', i);
|
|
150
|
+
const speed = this.getNodeParameter('speed', i);
|
|
151
|
+
const callbackUrl = this.getNodeParameter('callback_url', i);
|
|
152
|
+
const callbackPayloadRaw = this.getNodeParameter('callback_payload', i);
|
|
153
|
+
// Job erstellen mit file_id
|
|
154
|
+
const formData = {
|
|
155
|
+
scripts: scripts,
|
|
156
|
+
instruction: instruction,
|
|
157
|
+
language: language,
|
|
158
|
+
gender: gender,
|
|
159
|
+
target_format: targetFormat,
|
|
160
|
+
speed: speed
|
|
161
|
+
};
|
|
162
|
+
if (callbackUrl) {
|
|
163
|
+
formData['callback_url'] = callbackUrl;
|
|
164
|
+
}
|
|
165
|
+
// Callback Payload von fixedCollection in JSON umwandeln
|
|
166
|
+
if (callbackPayloadRaw && callbackPayloadRaw.parameters) {
|
|
167
|
+
const callbackPayload = {};
|
|
168
|
+
// Jedes Key-Value Paar aus der fixedCollection in ein Objekt umwandeln
|
|
169
|
+
for (const param of callbackPayloadRaw.parameters) {
|
|
170
|
+
if (param.key && param.value !== undefined) {
|
|
171
|
+
callbackPayload[param.key] = param.value;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// Nur hinzufügen wenn es tatsächlich Daten gibt
|
|
175
|
+
if (Object.keys(callbackPayload).length > 0) {
|
|
176
|
+
formData['callback_payload'] = JSON.stringify(callbackPayload);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
const response = await this.helpers.requestWithAuthentication.call(this, 'CommunityAPIAIServer', {
|
|
180
|
+
method: 'POST',
|
|
181
|
+
url: endpoints_1.EndpointBuilder.getAdvancedVoiceUrl(),
|
|
182
|
+
formData: formData,
|
|
183
|
+
json: true
|
|
184
|
+
});
|
|
185
|
+
returnData.push({ json: response });
|
|
186
|
+
}
|
|
187
|
+
return this.prepareOutputData(returnData);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.AdvancedVoice = AdvancedVoice;
|
|
191
|
+
//# sourceMappingURL=AdvancedVoice.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdvancedVoice.node.js","sourceRoot":"","sources":["../../../../src/nodes/CommunityAPIAIServer/AdvancedVoice/AdvancedVoice.node.ts"],"names":[],"mappings":";;;AAOA,yDAA+E;AAE/E,MAAa,aAAa;IAA1B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,wBAAwB;YAC9B,KAAK,EAAE,C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C,UAAU,CAAC,CAAC;IAC3C,CAAC;CACD;AAnMD,sCAmMC"}
|
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
+
export declare class AudioDatasetCreator implements INodeType {
|
|
4
|
+
description: INodeTypeDescription;
|
|
5
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AudioDatasetCreator = void 0;
|
|
4
|
+
const endpoints_1 = require("../../../config/endpoints");
|
|
5
|
+
const inputProcessing_1 = require("../../../utils/inputProcessing");
|
|
6
|
+
class AudioDatasetCreator {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.description = {
|
|
9
|
+
displayName: '(AI) Audio-Dataset-Creator',
|
|
10
|
+
name: 'aiToolsAudioDatasetCreator',
|
|
11
|
+
icon: 'file:marcmeeselogo.png',
|
|
12
|
+
group: ['transform'],
|
|
13
|
+
version: 1,
|
|
14
|
+
description: 'Erstellt TTS-Training-Datasets aus Audio- und Video-Dateien',
|
|
15
|
+
defaults: { name: 'AudioDatasetCreator' },
|
|
16
|
+
inputs: ['main'],
|
|
17
|
+
outputs: ['main'],
|
|
18
|
+
credentials: [
|
|
19
|
+
{
|
|
20
|
+
name: 'CommunityAPIAIServer',
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
properties: [
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Input Media Paths',
|
|
27
|
+
name: 'input_multimedia',
|
|
28
|
+
type: 'string',
|
|
29
|
+
typeOptions: {
|
|
30
|
+
multipleValues: true,
|
|
31
|
+
},
|
|
32
|
+
required: true,
|
|
33
|
+
default: [],
|
|
34
|
+
description: (0, inputProcessing_1.getInputDescription)('Audio- oder Video', true),
|
|
35
|
+
placeholder: 'UUID, https://example.com/podcast.mp3, oder /path/to/video.mp4',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Use WhisperX',
|
|
39
|
+
name: 'use_x',
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
required: true,
|
|
42
|
+
default: true,
|
|
43
|
+
description: 'Ob WhisperX (erweiterte Engine) für die Transkription verwendet werden soll',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Minimum Segment Length',
|
|
47
|
+
name: 'min_segment_length',
|
|
48
|
+
type: 'number',
|
|
49
|
+
required: true,
|
|
50
|
+
default: 2.0,
|
|
51
|
+
description: 'Minimale Länge der Audio-Segmente in Sekunden',
|
|
52
|
+
typeOptions: {
|
|
53
|
+
minValue: 0.1,
|
|
54
|
+
maxValue: 30,
|
|
55
|
+
numberPrecision: 1,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Maximum Segment Length',
|
|
60
|
+
name: 'max_segment_length',
|
|
61
|
+
type: 'number',
|
|
62
|
+
required: true,
|
|
63
|
+
default: 10.0,
|
|
64
|
+
description: 'Maximale Länge der Audio-Segmente in Sekunden',
|
|
65
|
+
typeOptions: {
|
|
66
|
+
minValue: 1,
|
|
67
|
+
maxValue: 30,
|
|
68
|
+
numberPrecision: 1,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Minimum Text Length',
|
|
73
|
+
name: 'min_text_length',
|
|
74
|
+
type: 'number',
|
|
75
|
+
required: true,
|
|
76
|
+
default: 10,
|
|
77
|
+
description: 'Minimale Textlänge in Zeichen pro Segment',
|
|
78
|
+
typeOptions: {
|
|
79
|
+
minValue: 1,
|
|
80
|
+
maxValue: 500,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
displayName: 'Callback URL',
|
|
85
|
+
name: 'callback_url',
|
|
86
|
+
type: 'string',
|
|
87
|
+
required: false,
|
|
88
|
+
default: '',
|
|
89
|
+
description: 'Eine optionale URL, die aufgerufen wird, wenn der Job abgeschlossen ist',
|
|
90
|
+
typeOptions: {
|
|
91
|
+
alwaysOpenEditWindow: true,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Callback Data',
|
|
96
|
+
name: 'callback_payload',
|
|
97
|
+
type: 'fixedCollection',
|
|
98
|
+
placeholder: 'Add Callback Data',
|
|
99
|
+
description: 'Custom data that will be returned with the job completion notification',
|
|
100
|
+
default: {},
|
|
101
|
+
typeOptions: {
|
|
102
|
+
multipleValues: true,
|
|
103
|
+
},
|
|
104
|
+
options: [
|
|
105
|
+
{
|
|
106
|
+
displayName: 'Parameters',
|
|
107
|
+
name: 'parameters',
|
|
108
|
+
values: [
|
|
109
|
+
{
|
|
110
|
+
displayName: 'Key',
|
|
111
|
+
name: 'key',
|
|
112
|
+
type: 'string',
|
|
113
|
+
default: '',
|
|
114
|
+
description: 'Parameter key',
|
|
115
|
+
required: true,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
displayName: 'Value',
|
|
119
|
+
name: 'value',
|
|
120
|
+
type: 'string',
|
|
121
|
+
default: '',
|
|
122
|
+
description: 'Parameter value (can be mapped from previous nodes)',
|
|
123
|
+
required: true,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
async execute() {
|
|
133
|
+
const items = this.getInputData();
|
|
134
|
+
const returnData = [];
|
|
135
|
+
for (let i = 0; i < items.length; i++) {
|
|
136
|
+
const inputMediaPaths = this.getNodeParameter('input_multimedia', i);
|
|
137
|
+
const useX = this.getNodeParameter('use_x', i);
|
|
138
|
+
const minSegmentLength = this.getNodeParameter('min_segment_length', i);
|
|
139
|
+
const maxSegmentLength = this.getNodeParameter('max_segment_length', i);
|
|
140
|
+
const minTextLength = this.getNodeParameter('min_text_length', i);
|
|
141
|
+
const callbackUrl = this.getNodeParameter('callback_url', i);
|
|
142
|
+
const callbackPayloadRaw = this.getNodeParameter('callback_payload', i);
|
|
143
|
+
// Definiere gültige Dateierweiterungen für Multimedia
|
|
144
|
+
const validExtensions = [...endpoints_1.SUPPORTED_FORMATS.AUDIO, ...endpoints_1.SUPPORTED_FORMATS.VIDEO];
|
|
145
|
+
// Eingabe intelligent verarbeiten mit inputProcessing Utils
|
|
146
|
+
const processedInputMediaPaths = await (0, inputProcessing_1.processMediaInputs)(this, inputMediaPaths, validExtensions);
|
|
147
|
+
// Debug-Information loggen
|
|
148
|
+
(0, inputProcessing_1.logInputsProcessing)(inputMediaPaths, processedInputMediaPaths);
|
|
149
|
+
// Job erstellen
|
|
150
|
+
const formData = {
|
|
151
|
+
input_multimedia: processedInputMediaPaths,
|
|
152
|
+
use_x: useX,
|
|
153
|
+
min_segment_length: minSegmentLength,
|
|
154
|
+
max_segment_length: maxSegmentLength,
|
|
155
|
+
min_text_length: minTextLength
|
|
156
|
+
};
|
|
157
|
+
if (callbackUrl) {
|
|
158
|
+
formData['callback_url'] = callbackUrl;
|
|
159
|
+
}
|
|
160
|
+
// Callback Payload von fixedCollection in JSON umwandeln
|
|
161
|
+
if (callbackPayloadRaw && callbackPayloadRaw.parameters) {
|
|
162
|
+
const callbackPayload = {};
|
|
163
|
+
// Jedes Key-Value Paar aus der fixedCollection in ein Objekt umwandeln
|
|
164
|
+
for (const param of callbackPayloadRaw.parameters) {
|
|
165
|
+
if (param.key && param.value !== undefined) {
|
|
166
|
+
callbackPayload[param.key] = param.value;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// Nur hinzufügen wenn es tatsächlich Daten gibt
|
|
170
|
+
if (Object.keys(callbackPayload).length > 0) {
|
|
171
|
+
formData['callback_payload'] = JSON.stringify(callbackPayload);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const response = await this.helpers.requestWithAuthentication.call(this, 'CommunityAPIAIServer', {
|
|
175
|
+
method: 'POST',
|
|
176
|
+
url: endpoints_1.EndpointBuilder.getAudioDatasetCreatorUrl(),
|
|
177
|
+
form: formData,
|
|
178
|
+
json: true
|
|
179
|
+
});
|
|
180
|
+
returnData.push({ json: response });
|
|
181
|
+
}
|
|
182
|
+
return this.prepareOutputData(returnData);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
exports.AudioDatasetCreator = AudioDatasetCreator;
|
|
186
|
+
//# sourceMappingURL=AudioDatasetCreator.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioDatasetCreator.node.js","sourceRoot":"","sources":["../../../../src/nodes/CommunityAPIAIServer/AudioDatasetCreator/AudioDatasetCreator.node.ts"],"names":[],"mappings":";;;AAOA,yDAA+E;AAC/E,oEAIwC;AAExC,MAAa,mBAAmB;IAAhC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,4BAA4B;YAClC,IAAI,EAAE,wBAAwB;YAC9B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,6DAA6D;YAC1E,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE;YACzC,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,sBAAsB;oBAC5B,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,mBAAmB;oBAChC,IAAI,EAAE,kBAAkB;oBACxB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;wBACZ,cAAc,EAAE,IAAI;qBACpB;oBACD,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,IAAA,qCAAmB,EAAC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ACF,CAAC;gBAED,gDAAgD;gBAChD,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC7C,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBAChE,CAAC;YACF,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CACjE,IAAI,EACJ,sBAAsB,EACtB;gBACC,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,2BAAe,CAAC,yBAAyB,EAAE;gBAChD,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,IAAI;aACV,CACD,CAAC;YAEF,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAuB,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;CACD;AAhMD,kDAgMC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
+
export declare class ComfyuiImageModifyFaceswapDetailer implements INodeType {
|
|
4
|
+
description: INodeTypeDescription;
|
|
5
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComfyuiImageModifyFaceswapDetailer = void 0;
|
|
4
|
+
const endpoints_1 = require("../../../config/endpoints");
|
|
5
|
+
const inputProcessing_1 = require("../../../utils/inputProcessing");
|
|
6
|
+
class ComfyuiImageModifyFaceswapDetailer {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.description = {
|
|
9
|
+
displayName: '(AI) Faceswap Detailer',
|
|
10
|
+
name: 'aiToolsComfyuiImageModifyFaceswapDetailer',
|
|
11
|
+
icon: 'file:marcmeeselogo.png',
|
|
12
|
+
group: ['transform'],
|
|
13
|
+
version: 1,
|
|
14
|
+
description: 'Modify images using ComfyUI Faceswap Detailer',
|
|
15
|
+
defaults: { name: 'ComfyuiImageModifyFaceswapDetailer' },
|
|
16
|
+
inputs: ['main'],
|
|
17
|
+
outputs: ['main'],
|
|
18
|
+
credentials: [
|
|
19
|
+
{
|
|
20
|
+
name: 'CommunityAPIAIServer',
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
properties: [
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Input Image Paths',
|
|
27
|
+
name: 'input_images',
|
|
28
|
+
type: 'string',
|
|
29
|
+
typeOptions: {
|
|
30
|
+
multipleValues: true,
|
|
31
|
+
},
|
|
32
|
+
required: true,
|
|
33
|
+
default: [],
|
|
34
|
+
description: (0, inputProcessing_1.getInputDescription)('Bild', true),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Input Face Image',
|
|
38
|
+
name: 'input_face_image',
|
|
39
|
+
type: 'string',
|
|
40
|
+
required: true,
|
|
41
|
+
default: "",
|
|
42
|
+
description: (0, inputProcessing_1.getInputDescription)('Gesichts-Bild', false),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Callback URL',
|
|
46
|
+
name: 'callback_url',
|
|
47
|
+
type: 'string',
|
|
48
|
+
required: false,
|
|
49
|
+
default: '',
|
|
50
|
+
description: 'Eine optionale URL, die aufgerufen wird, wenn der Job abgeschlossen ist',
|
|
51
|
+
typeOptions: {
|
|
52
|
+
alwaysOpenEditWindow: true,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Callback Data',
|
|
57
|
+
name: 'callback_payload',
|
|
58
|
+
type: 'fixedCollection',
|
|
59
|
+
placeholder: 'Add Callback Data',
|
|
60
|
+
description: 'Custom data that will be returned with the job completion notification',
|
|
61
|
+
default: {},
|
|
62
|
+
typeOptions: {
|
|
63
|
+
multipleValues: true,
|
|
64
|
+
},
|
|
65
|
+
options: [
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Parameters',
|
|
68
|
+
name: 'parameters',
|
|
69
|
+
values: [
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Key',
|
|
72
|
+
name: 'key',
|
|
73
|
+
type: 'string',
|
|
74
|
+
default: '',
|
|
75
|
+
description: 'Parameter key',
|
|
76
|
+
required: true,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Value',
|
|
80
|
+
name: 'value',
|
|
81
|
+
type: 'string',
|
|
82
|
+
default: '',
|
|
83
|
+
description: 'Parameter value (can be mapped from previous nodes)',
|
|
84
|
+
required: true,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async execute() {
|
|
94
|
+
const items = this.getInputData();
|
|
95
|
+
const returnData = [];
|
|
96
|
+
for (let i = 0; i < items.length; i++) {
|
|
97
|
+
const inputImagePaths = this.getNodeParameter('input_images', i);
|
|
98
|
+
const inputFaceImage = this.getNodeParameter('input_face_image', i);
|
|
99
|
+
const callbackUrl = this.getNodeParameter('callback_url', i);
|
|
100
|
+
const callbackPayloadRaw = this.getNodeParameter('callback_payload', i);
|
|
101
|
+
const validExtensions = [...endpoints_1.SUPPORTED_FORMATS.IMAGE];
|
|
102
|
+
// Eingabe intelligent verarbeiten mit inputProcessing Utils
|
|
103
|
+
const processedInputImagePaths = await (0, inputProcessing_1.processMediaInputs)(this, inputImagePaths, validExtensions);
|
|
104
|
+
const processedInputFaceImage = await (0, inputProcessing_1.processMediaInput)(this, inputFaceImage, validExtensions);
|
|
105
|
+
// Debug-Informationen loggen
|
|
106
|
+
(0, inputProcessing_1.logInputsProcessing)(inputImagePaths, processedInputImagePaths);
|
|
107
|
+
(0, inputProcessing_1.logInputProcessing)(inputFaceImage, processedInputFaceImage);
|
|
108
|
+
// Job erstellen
|
|
109
|
+
const formData = {
|
|
110
|
+
input_images: processedInputImagePaths,
|
|
111
|
+
input_face_image: processedInputFaceImage,
|
|
112
|
+
};
|
|
113
|
+
if (callbackUrl) {
|
|
114
|
+
formData['callback_url'] = callbackUrl;
|
|
115
|
+
}
|
|
116
|
+
// Callback Payload von fixedCollection in JSON umwandeln
|
|
117
|
+
if (callbackPayloadRaw && callbackPayloadRaw.parameters) {
|
|
118
|
+
const callbackPayload = {};
|
|
119
|
+
// Jedes Key-Value Paar aus der fixedCollection in ein Objekt umwandeln
|
|
120
|
+
for (const param of callbackPayloadRaw.parameters) {
|
|
121
|
+
if (param.key && param.value !== undefined) {
|
|
122
|
+
callbackPayload[param.key] = param.value;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Nur hinzufügen wenn es tatsächlich Daten gibt
|
|
126
|
+
if (Object.keys(callbackPayload).length > 0) {
|
|
127
|
+
formData['callback_payload'] = JSON.stringify(callbackPayload);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const response = await this.helpers.requestWithAuthentication.call(this, 'CommunityAPIAIServer', {
|
|
131
|
+
method: 'POST',
|
|
132
|
+
url: endpoints_1.EndpointBuilder.getComfyuiImageModifyFaceswapDetailerUrl(),
|
|
133
|
+
form: formData,
|
|
134
|
+
json: true
|
|
135
|
+
});
|
|
136
|
+
returnData.push({ json: response });
|
|
137
|
+
}
|
|
138
|
+
return this.prepareOutputData(returnData);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
exports.ComfyuiImageModifyFaceswapDetailer = ComfyuiImageModifyFaceswapDetailer;
|
|
142
|
+
//# sourceMappingURL=ComfyuiImageModifyFaceswapDetailer.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComfyuiImageModifyFaceswapDetailer.node.js","sourceRoot":"","sources":["../../../../src/nodes/CommunityAPIAIServer/ComfyuiImageModifyFaceswapDetailer/ComfyuiImageModifyFaceswapDetailer.node.ts"],"names":[],"mappings":";;;AAOA,yDAA+E;AAC/E,oEAMwC;AAExC,MAAa,kCAAkC;IAA/C;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,2CAA2C;YACjD,IAAI,EAAE,wBAAwB;YAC9B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,EAAE,IAAI,EAAE,oCAAoC,EAAE;YACxD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,sBAAsB;oBAC5B,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,mBAAmB;oBAChC,IAAI,EAAE,cAAc;oBACpB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;wBACZ,cAAc,EAAE,IAAI;qBACpB;oBACD,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,IAAA,qCAAmB,EAAC,MAAM,EAAE,IAAI,CAAC;iBAC9C;gBACD;oBACC,WAAW,EAAE,kBAAkB;oBAC/B,IAAI,EAAE,kBAAkB;oBACxB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,IAAA,qCAAmB,EAAC,eAAe,EAAE,KAAK,CAAC;iBACxD;gBACD;oBACC,WAAW,EAAE,cAAc;oBAC3B,IAAI,EAAE,cAAc;oBACpB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,yEAAyE;oBACtF,WAAW,EA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AChE,CAAC;YACF,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CACjE,IAAI,EACJ,sBAAsB,EACtB;gBACC,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,2BAAe,CAAC,wCAAwC,EAAE;gBAC/D,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,IAAI;aACV,CACD,CAAC;YAEF,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAuB,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;CACD;AApJD,gFAoJC"}
|
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
+
export declare class ComfyuiImageUpscaleFluxMagnific implements INodeType {
|
|
4
|
+
description: INodeTypeDescription;
|
|
5
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
6
|
+
}
|