n8n-nodes-speechall 0.1.2
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 +21 -0
- package/README.md +165 -0
- package/dist/credentials/SpeechallApi.credentials.d.ts +13 -0
- package/dist/credentials/SpeechallApi.credentials.js +43 -0
- package/dist/credentials/SpeechallApi.credentials.js.map +1 -0
- package/dist/nodes/Speechall/Speechall.node.d.ts +11 -0
- package/dist/nodes/Speechall/Speechall.node.js +79 -0
- package/dist/nodes/Speechall/Speechall.node.js.map +1 -0
- package/dist/nodes/Speechall/Speechall.node.json +18 -0
- package/dist/nodes/Speechall/descriptions/SpeechToText.description.d.ts +2 -0
- package/dist/nodes/Speechall/descriptions/SpeechToText.description.js +154 -0
- package/dist/nodes/Speechall/descriptions/SpeechToText.description.js.map +1 -0
- package/dist/nodes/Speechall/generated/speechall-openapi.d.ts +528 -0
- package/dist/nodes/Speechall/generated/speechall-openapi.js +3 -0
- package/dist/nodes/Speechall/generated/speechall-openapi.js.map +1 -0
- package/dist/nodes/Speechall/helpers/binary.d.ts +8 -0
- package/dist/nodes/Speechall/helpers/binary.js +29 -0
- package/dist/nodes/Speechall/helpers/binary.js.map +1 -0
- package/dist/nodes/Speechall/helpers/fields.d.ts +11 -0
- package/dist/nodes/Speechall/helpers/fields.js +344 -0
- package/dist/nodes/Speechall/helpers/fields.js.map +1 -0
- package/dist/nodes/Speechall/helpers/models.d.ts +13 -0
- package/dist/nodes/Speechall/helpers/models.js +148 -0
- package/dist/nodes/Speechall/helpers/models.js.map +1 -0
- package/dist/nodes/Speechall/helpers/normalize.d.ts +14 -0
- package/dist/nodes/Speechall/helpers/normalize.js +109 -0
- package/dist/nodes/Speechall/helpers/normalize.js.map +1 -0
- package/dist/nodes/Speechall/helpers/replacementRules.d.ts +4 -0
- package/dist/nodes/Speechall/helpers/replacementRules.js +130 -0
- package/dist/nodes/Speechall/helpers/replacementRules.js.map +1 -0
- package/dist/nodes/Speechall/helpers/types.d.ts +74 -0
- package/dist/nodes/Speechall/helpers/types.js +5 -0
- package/dist/nodes/Speechall/helpers/types.js.map +1 -0
- package/dist/nodes/Speechall/loadOptions/getSpeechToTextModels.d.ts +2 -0
- package/dist/nodes/Speechall/loadOptions/getSpeechToTextModels.js +13 -0
- package/dist/nodes/Speechall/loadOptions/getSpeechToTextModels.js.map +1 -0
- package/dist/nodes/Speechall/operations/listModels.operation.d.ts +2 -0
- package/dist/nodes/Speechall/operations/listModels.operation.js +30 -0
- package/dist/nodes/Speechall/operations/listModels.operation.js.map +1 -0
- package/dist/nodes/Speechall/operations/transcribeFile.operation.d.ts +2 -0
- package/dist/nodes/Speechall/operations/transcribeFile.operation.js +149 -0
- package/dist/nodes/Speechall/operations/transcribeFile.operation.js.map +1 -0
- package/dist/nodes/Speechall/operations/transcribeRemoteUrl.operation.d.ts +2 -0
- package/dist/nodes/Speechall/operations/transcribeRemoteUrl.operation.js +132 -0
- package/dist/nodes/Speechall/operations/transcribeRemoteUrl.operation.js.map +1 -0
- package/dist/nodes/Speechall/speechall.dark.svg +7 -0
- package/dist/nodes/Speechall/speechall.svg +7 -0
- package/dist/nodes/Speechall/transport/errors.d.ts +12 -0
- package/dist/nodes/Speechall/transport/errors.js +151 -0
- package/dist/nodes/Speechall/transport/errors.js.map +1 -0
- package/dist/nodes/Speechall/transport/speechallApiRequest.d.ts +15 -0
- package/dist/nodes/Speechall/transport/speechallApiRequest.js +81 -0
- package/dist/nodes/Speechall/transport/speechallApiRequest.js.map +1 -0
- package/dist/package.json +68 -0
- package/examples/google-drive-audio-to-transcript.json +71 -0
- package/examples/meeting-recording-to-diarized-transcript.json +59 -0
- package/examples/remote-podcast-url-to-srt.json +66 -0
- package/examples/webhook-audio-upload-to-json-transcript.json +64 -0
- package/package.json +68 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildNodeApiError = buildNodeApiError;
|
|
4
|
+
exports.toNodeOperationError = toNodeOperationError;
|
|
5
|
+
exports.getErrorMessage = getErrorMessage;
|
|
6
|
+
exports.validateTimeout = validateTimeout;
|
|
7
|
+
exports.validateTemperature = validateTemperature;
|
|
8
|
+
exports.validateSpeakersExpected = validateSpeakersExpected;
|
|
9
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
10
|
+
function buildNodeApiError(context, response) {
|
|
11
|
+
const statusCode = response.statusCode;
|
|
12
|
+
const body = sanitizeErrorBody(response.body);
|
|
13
|
+
const retryAfter = getHeader(response.headers, 'retry-after');
|
|
14
|
+
const message = getApiMessage(body);
|
|
15
|
+
const code = isObject(body) ? body.code : undefined;
|
|
16
|
+
const description = [message, typeof code === 'string' ? `Code: ${code}` : undefined]
|
|
17
|
+
.filter(Boolean)
|
|
18
|
+
.join(' ');
|
|
19
|
+
const errorResponse = {
|
|
20
|
+
...(isObject(body) ? body : { body: String(body !== null && body !== void 0 ? body : '') }),
|
|
21
|
+
...(retryAfter ? { retryAfter } : {}),
|
|
22
|
+
};
|
|
23
|
+
return new n8n_workflow_1.NodeApiError(context.getNode(), errorResponse, {
|
|
24
|
+
message: getStatusMessage(statusCode),
|
|
25
|
+
description,
|
|
26
|
+
httpCode: statusCode ? String(statusCode) : undefined,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function toNodeOperationError(context, error, itemIndex) {
|
|
30
|
+
var _a;
|
|
31
|
+
if (error instanceof n8n_workflow_1.NodeApiError) {
|
|
32
|
+
return error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof n8n_workflow_1.NodeOperationError) {
|
|
35
|
+
error.context = { ...((_a = error.context) !== null && _a !== void 0 ? _a : {}), itemIndex };
|
|
36
|
+
return error;
|
|
37
|
+
}
|
|
38
|
+
return new n8n_workflow_1.NodeOperationError(context.getNode(), getErrorMessage(error), { itemIndex });
|
|
39
|
+
}
|
|
40
|
+
function getErrorMessage(error) {
|
|
41
|
+
if (error instanceof Error) {
|
|
42
|
+
return error.message;
|
|
43
|
+
}
|
|
44
|
+
if (typeof error === 'string') {
|
|
45
|
+
return error;
|
|
46
|
+
}
|
|
47
|
+
return 'Unknown error';
|
|
48
|
+
}
|
|
49
|
+
function validateTimeout(context, timeoutSeconds) {
|
|
50
|
+
if (!Number.isFinite(timeoutSeconds) || timeoutSeconds < 1 || timeoutSeconds > 900) {
|
|
51
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Request Timeout (Seconds) must be between 1 and 900');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function validateTemperature(context, temperature) {
|
|
55
|
+
if (temperature === undefined) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (!Number.isFinite(temperature) || temperature < 0 || temperature > 1) {
|
|
59
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Temperature must be between 0 and 1');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function validateSpeakersExpected(context, speakersExpected) {
|
|
63
|
+
if (speakersExpected === undefined) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!Number.isInteger(speakersExpected) || speakersExpected < 1 || speakersExpected > 10) {
|
|
67
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Speakers Expected must be between 1 and 10');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function getStatusMessage(statusCode) {
|
|
71
|
+
switch (statusCode) {
|
|
72
|
+
case 400:
|
|
73
|
+
return 'Bad Speechall request';
|
|
74
|
+
case 401:
|
|
75
|
+
return 'Invalid or missing Speechall API key';
|
|
76
|
+
case 402:
|
|
77
|
+
return 'Speechall account has no available credit';
|
|
78
|
+
case 404:
|
|
79
|
+
return 'Speechall resource not found';
|
|
80
|
+
case 429:
|
|
81
|
+
return 'Speechall rate limit exceeded';
|
|
82
|
+
case 500:
|
|
83
|
+
return 'Speechall server error';
|
|
84
|
+
case 503:
|
|
85
|
+
return 'Speechall service unavailable';
|
|
86
|
+
case 504:
|
|
87
|
+
return 'Speechall upstream provider timed out';
|
|
88
|
+
default:
|
|
89
|
+
return statusCode
|
|
90
|
+
? `Speechall API request failed with status ${statusCode}`
|
|
91
|
+
: 'Speechall API request failed';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function getApiMessage(body) {
|
|
95
|
+
var _a;
|
|
96
|
+
if (!isObject(body)) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
const message = (_a = body.message) !== null && _a !== void 0 ? _a : body.error;
|
|
100
|
+
if (typeof message === 'string') {
|
|
101
|
+
return message;
|
|
102
|
+
}
|
|
103
|
+
if (isObject(message) && typeof message.message === 'string') {
|
|
104
|
+
return message.message;
|
|
105
|
+
}
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
function sanitizeErrorBody(body) {
|
|
109
|
+
if (!isObject(body)) {
|
|
110
|
+
return body;
|
|
111
|
+
}
|
|
112
|
+
const sanitized = {};
|
|
113
|
+
for (const [key, value] of Object.entries(body)) {
|
|
114
|
+
if (key.toLowerCase().includes('authorization') || key.toLowerCase().includes('apikey')) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (typeof value === 'string' && isSensitiveUrl(value)) {
|
|
118
|
+
sanitized[key] = sanitizeUrl(value);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
sanitized[key] = value;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return sanitized;
|
|
125
|
+
}
|
|
126
|
+
function isSensitiveUrl(value) {
|
|
127
|
+
try {
|
|
128
|
+
const url = new URL(value);
|
|
129
|
+
return url.search.length > 0 || url.hash.length > 0;
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function sanitizeUrl(value) {
|
|
136
|
+
const url = new URL(value);
|
|
137
|
+
url.search = '';
|
|
138
|
+
url.hash = '';
|
|
139
|
+
return url.toString();
|
|
140
|
+
}
|
|
141
|
+
function getHeader(headers, name) {
|
|
142
|
+
if (!headers) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
const entry = Object.entries(headers).find(([key]) => key.toLowerCase() === name.toLowerCase());
|
|
146
|
+
return typeof (entry === null || entry === void 0 ? void 0 : entry[1]) === 'string' ? entry[1] : undefined;
|
|
147
|
+
}
|
|
148
|
+
function isObject(value) {
|
|
149
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../nodes/Speechall/transport/errors.ts"],"names":[],"mappings":";;AAQA,8CA2BC;AAED,oDAcC;AAED,0CAQC;AAED,0CAOC;AAED,kDAUC;AAED,4DAUC;AAxFD,+CAAgE;AAEhE,SAAgB,iBAAiB,CAChC,OAAkD,EAClD,QAIC;IAED,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACvC,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACpD,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SACnF,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEZ,MAAM,aAAa,GAAG;QACrB,GAAG,CAAC,QAAQ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AAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions, IHttpRequestMethods, ILoadOptionsFunctions } from 'n8n-workflow';
|
|
2
|
+
export interface SpeechallApiResponse<T = unknown> {
|
|
3
|
+
statusCode: number;
|
|
4
|
+
headers: IDataObject;
|
|
5
|
+
body: T;
|
|
6
|
+
rawBody?: string | Buffer;
|
|
7
|
+
}
|
|
8
|
+
export declare function speechallApiRequest<T>(this: IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, endpoint: string, options?: {
|
|
9
|
+
qs?: IDataObject;
|
|
10
|
+
body?: unknown;
|
|
11
|
+
headers?: IDataObject;
|
|
12
|
+
timeoutMs?: number;
|
|
13
|
+
json?: boolean;
|
|
14
|
+
encoding?: 'json' | 'text' | 'arraybuffer';
|
|
15
|
+
}): Promise<SpeechallApiResponse<T>>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.speechallApiRequest = speechallApiRequest;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const normalize_1 = require("../helpers/normalize");
|
|
6
|
+
const types_1 = require("../helpers/types");
|
|
7
|
+
const errors_1 = require("./errors");
|
|
8
|
+
async function speechallApiRequest(method, endpoint, options = {}) {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const requestOptions = {
|
|
11
|
+
baseURL: types_1.SPEECHALL_API_BASE_URL,
|
|
12
|
+
url: endpoint,
|
|
13
|
+
method,
|
|
14
|
+
qs: options.qs,
|
|
15
|
+
arrayFormat: 'repeat',
|
|
16
|
+
body: options.body,
|
|
17
|
+
headers: {
|
|
18
|
+
Accept: 'application/json, text/plain, */*',
|
|
19
|
+
'User-Agent': 'n8n-nodes-speechall',
|
|
20
|
+
'X-Speechall-Client': 'n8n-nodes-speechall',
|
|
21
|
+
...((_a = options.headers) !== null && _a !== void 0 ? _a : {}),
|
|
22
|
+
},
|
|
23
|
+
timeout: options.timeoutMs,
|
|
24
|
+
json: (_b = options.json) !== null && _b !== void 0 ? _b : options.encoding === 'json',
|
|
25
|
+
returnFullResponse: true,
|
|
26
|
+
};
|
|
27
|
+
if (options.encoding) {
|
|
28
|
+
requestOptions.encoding = options.encoding;
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'speechallApi', requestOptions));
|
|
32
|
+
const contentType = getHeader(response.headers, 'content-type');
|
|
33
|
+
const rawBody = typeof response.body === 'string' || Buffer.isBuffer(response.body)
|
|
34
|
+
? response.body
|
|
35
|
+
: undefined;
|
|
36
|
+
const body = (options.encoding === 'text' ? response.body : (0, normalize_1.parseSpeechallBody)(response.body, contentType));
|
|
37
|
+
return {
|
|
38
|
+
statusCode: response.statusCode,
|
|
39
|
+
headers: response.headers,
|
|
40
|
+
body,
|
|
41
|
+
rawBody,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const response = extractErrorResponse(error);
|
|
46
|
+
if (response) {
|
|
47
|
+
throw (0, errors_1.buildNodeApiError)(this, response);
|
|
48
|
+
}
|
|
49
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error instanceof Error ? error : String(error));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function extractErrorResponse(error) {
|
|
53
|
+
var _a;
|
|
54
|
+
if (typeof error !== 'object' || error === null) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
const candidate = error;
|
|
58
|
+
if (candidate.response) {
|
|
59
|
+
return {
|
|
60
|
+
statusCode: candidate.response.statusCode,
|
|
61
|
+
headers: candidate.response.headers,
|
|
62
|
+
body: (_a = candidate.response.body) !== null && _a !== void 0 ? _a : candidate.response.data,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (candidate.statusCode || candidate.body) {
|
|
66
|
+
return {
|
|
67
|
+
statusCode: candidate.statusCode,
|
|
68
|
+
headers: candidate.headers,
|
|
69
|
+
body: candidate.body,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
function getHeader(headers, name) {
|
|
75
|
+
if (!headers) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
const entry = Object.entries(headers).find(([key]) => key.toLowerCase() === name.toLowerCase());
|
|
79
|
+
return typeof (entry === null || entry === void 0 ? void 0 : entry[1]) === 'string' ? entry[1] : undefined;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=speechallApiRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speechallApiRequest.js","sourceRoot":"","sources":["../../../../nodes/Speechall/transport/speechallApiRequest.ts"],"names":[],"mappings":";;AAoBA,kDAoEC;AAjFD,+CAAkD;AAElD,oDAA0D;AAC1D,4CAA0D;AAC1D,qCAA6C;AAStC,KAAK,UAAU,mBAAmB,CAExC,MAA2B,EAC3B,QAAgB,EAChB,UAOI,EAAE;;IAEN,MAAM,cAAc,GAAwB;QAC3C,OAAO,EAAE,8BAAsB;QAC/B,GAAG,EAAE,QAAQ;QACb,MAAM;QACN,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,OAAO,CAAC,IAAmC;QACjD,OAAO,EAAE;YACR,MAAM,EAAE,mCAAmC;YAC3C,YAAY,EAAE,qBAAqB;YACnC,oBAAoB,EAAE,qBAAqB;YAC3C,GAAG,CAAC,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE,CAAC;SAC1B;QACD,OAAO,EAAE,OAAO,CAAC,SAAS;QAC1B,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,OAAO,CAAC,QAAQ,KAAK,MAAM;QACjD,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{
|
|
2
|
+
"name": "n8n-nodes-speechall",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Transcribe audio in n8n using Speechall",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/Speechall/speechall-n8n-node",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"n8n",
|
|
10
|
+
"speechall",
|
|
11
|
+
"transcription",
|
|
12
|
+
"speech-to-text",
|
|
13
|
+
"audio",
|
|
14
|
+
"subtitles",
|
|
15
|
+
"diarization"
|
|
16
|
+
],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Speechall"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/Speechall/speechall-n8n-node.git"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "n8n-node build",
|
|
26
|
+
"build:watch": "tsc --watch",
|
|
27
|
+
"dev": "n8n-node dev",
|
|
28
|
+
"lint": "n8n-node lint",
|
|
29
|
+
"lint:fix": "n8n-node lint --fix",
|
|
30
|
+
"release": "n8n-node release",
|
|
31
|
+
"prepublishOnly": "n8n-node prerelease",
|
|
32
|
+
"generate:openapi-types": "openapi-typescript https://raw.githubusercontent.com/Speechall/speechall-openapi/main/openapi.yaml -o nodes/Speechall/generated/speechall-openapi.ts",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"test:watch": "vitest"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"examples",
|
|
42
|
+
"!dist/**/*.tsbuildinfo"
|
|
43
|
+
],
|
|
44
|
+
"n8n": {
|
|
45
|
+
"n8nNodesApiVersion": 1,
|
|
46
|
+
"strict": true,
|
|
47
|
+
"credentials": [
|
|
48
|
+
"dist/credentials/SpeechallApi.credentials.js"
|
|
49
|
+
],
|
|
50
|
+
"nodes": [
|
|
51
|
+
"dist/nodes/Speechall/Speechall.node.js"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@n8n/node-cli": "0.35.1",
|
|
57
|
+
"@types/node": "^22.20.0",
|
|
58
|
+
"eslint": "9.29.0",
|
|
59
|
+
"openapi-typescript": "^7.13.0",
|
|
60
|
+
"prettier": "3.6.2",
|
|
61
|
+
"release-it": "^19.0.4",
|
|
62
|
+
"typescript": "5.9.2",
|
|
63
|
+
"vitest": "^4.1.9"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"n8n-workflow": "*"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Google Drive Audio to Transcript",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {},
|
|
6
|
+
"id": "manual-trigger",
|
|
7
|
+
"name": "Manual Trigger",
|
|
8
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
+
"typeVersion": 1,
|
|
10
|
+
"position": [0, 0]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"parameters": {
|
|
14
|
+
"operation": "download",
|
|
15
|
+
"fileId": "={{$json.fileId}}"
|
|
16
|
+
},
|
|
17
|
+
"id": "download-audio",
|
|
18
|
+
"name": "Download Audio",
|
|
19
|
+
"type": "n8n-nodes-base.googleDrive",
|
|
20
|
+
"typeVersion": 3,
|
|
21
|
+
"position": [220, 0]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"parameters": {
|
|
25
|
+
"resource": "speechToText",
|
|
26
|
+
"operation": "transcribeFile",
|
|
27
|
+
"binaryPropertyName": "data",
|
|
28
|
+
"modelSelectionMode": "manual",
|
|
29
|
+
"modelId": "openai.whisper-1",
|
|
30
|
+
"language": "en",
|
|
31
|
+
"outputFormat": "text"
|
|
32
|
+
},
|
|
33
|
+
"id": "speechall-transcribe",
|
|
34
|
+
"name": "Speechall Transcribe",
|
|
35
|
+
"type": "n8n-nodes-speechall.speechall",
|
|
36
|
+
"typeVersion": 1,
|
|
37
|
+
"position": [460, 0],
|
|
38
|
+
"credentials": {
|
|
39
|
+
"speechallApi": {
|
|
40
|
+
"id": "replace-me",
|
|
41
|
+
"name": "Speechall API"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"parameters": {
|
|
47
|
+
"title": "={{$json.name || 'Audio Transcript'}}",
|
|
48
|
+
"text": "={{$json.text}}"
|
|
49
|
+
},
|
|
50
|
+
"id": "create-doc",
|
|
51
|
+
"name": "Create Transcript Document",
|
|
52
|
+
"type": "n8n-nodes-base.googleDocs",
|
|
53
|
+
"typeVersion": 2,
|
|
54
|
+
"position": [700, 0]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"connections": {
|
|
58
|
+
"Manual Trigger": {
|
|
59
|
+
"main": [[{ "node": "Download Audio", "type": "main", "index": 0 }]]
|
|
60
|
+
},
|
|
61
|
+
"Download Audio": {
|
|
62
|
+
"main": [[{ "node": "Speechall Transcribe", "type": "main", "index": 0 }]]
|
|
63
|
+
},
|
|
64
|
+
"Speechall Transcribe": {
|
|
65
|
+
"main": [[{ "node": "Create Transcript Document", "type": "main", "index": 0 }]]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"active": false,
|
|
69
|
+
"settings": {},
|
|
70
|
+
"versionId": "example-google-drive-audio-to-transcript"
|
|
71
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Meeting Recording to Diarized Transcript",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {},
|
|
6
|
+
"id": "manual-trigger",
|
|
7
|
+
"name": "Manual Trigger",
|
|
8
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
+
"typeVersion": 1,
|
|
10
|
+
"position": [0, 0]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"parameters": {
|
|
14
|
+
"resource": "speechToText",
|
|
15
|
+
"operation": "transcribeFile",
|
|
16
|
+
"binaryPropertyName": "data",
|
|
17
|
+
"modelSelectionMode": "manual",
|
|
18
|
+
"modelId": "deepgram.nova-3",
|
|
19
|
+
"language": "auto",
|
|
20
|
+
"outputFormat": "json",
|
|
21
|
+
"diarization": true,
|
|
22
|
+
"speakersExpected": 4
|
|
23
|
+
},
|
|
24
|
+
"id": "speechall-diarized",
|
|
25
|
+
"name": "Speechall Diarized Transcript",
|
|
26
|
+
"type": "n8n-nodes-speechall.speechall",
|
|
27
|
+
"typeVersion": 1,
|
|
28
|
+
"position": [240, 0],
|
|
29
|
+
"credentials": {
|
|
30
|
+
"speechallApi": {
|
|
31
|
+
"id": "replace-me",
|
|
32
|
+
"name": "Speechall API"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"parameters": {
|
|
38
|
+
"channel": "meetings",
|
|
39
|
+
"text": "={{$json.text}}"
|
|
40
|
+
},
|
|
41
|
+
"id": "send-summary",
|
|
42
|
+
"name": "Send Transcript",
|
|
43
|
+
"type": "n8n-nodes-base.slack",
|
|
44
|
+
"typeVersion": 2,
|
|
45
|
+
"position": [480, 0]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"connections": {
|
|
49
|
+
"Manual Trigger": {
|
|
50
|
+
"main": [[{ "node": "Speechall Diarized Transcript", "type": "main", "index": 0 }]]
|
|
51
|
+
},
|
|
52
|
+
"Speechall Diarized Transcript": {
|
|
53
|
+
"main": [[{ "node": "Send Transcript", "type": "main", "index": 0 }]]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"active": false,
|
|
57
|
+
"settings": {},
|
|
58
|
+
"versionId": "example-meeting-recording-to-diarized-transcript"
|
|
59
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Remote Podcast URL to SRT",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {},
|
|
6
|
+
"id": "manual-trigger",
|
|
7
|
+
"name": "Manual Trigger",
|
|
8
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
+
"typeVersion": 1,
|
|
10
|
+
"position": [0, 0]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"parameters": {
|
|
14
|
+
"assignments": {
|
|
15
|
+
"assignments": [
|
|
16
|
+
{
|
|
17
|
+
"name": "fileUrl",
|
|
18
|
+
"value": "https://example.com/podcast.mp3",
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"id": "set-url",
|
|
25
|
+
"name": "Set Podcast URL",
|
|
26
|
+
"type": "n8n-nodes-base.set",
|
|
27
|
+
"typeVersion": 3,
|
|
28
|
+
"position": [220, 0]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"parameters": {
|
|
32
|
+
"resource": "speechToText",
|
|
33
|
+
"operation": "transcribeRemoteUrl",
|
|
34
|
+
"fileUrl": "={{$json.fileUrl}}",
|
|
35
|
+
"modelSelectionMode": "manual",
|
|
36
|
+
"modelId": "openai.whisper-1",
|
|
37
|
+
"language": "en",
|
|
38
|
+
"outputFormat": "srt",
|
|
39
|
+
"alsoReturnBinary": true,
|
|
40
|
+
"binaryOutputProperty": "transcript"
|
|
41
|
+
},
|
|
42
|
+
"id": "speechall-srt",
|
|
43
|
+
"name": "Speechall SRT",
|
|
44
|
+
"type": "n8n-nodes-speechall.speechall",
|
|
45
|
+
"typeVersion": 1,
|
|
46
|
+
"position": [460, 0],
|
|
47
|
+
"credentials": {
|
|
48
|
+
"speechallApi": {
|
|
49
|
+
"id": "replace-me",
|
|
50
|
+
"name": "Speechall API"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"connections": {
|
|
56
|
+
"Manual Trigger": {
|
|
57
|
+
"main": [[{ "node": "Set Podcast URL", "type": "main", "index": 0 }]]
|
|
58
|
+
},
|
|
59
|
+
"Set Podcast URL": {
|
|
60
|
+
"main": [[{ "node": "Speechall SRT", "type": "main", "index": 0 }]]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"active": false,
|
|
64
|
+
"settings": {},
|
|
65
|
+
"versionId": "example-remote-podcast-url-to-srt"
|
|
66
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Webhook Audio Upload to JSON Transcript",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {
|
|
6
|
+
"httpMethod": "POST",
|
|
7
|
+
"path": "speechall-upload",
|
|
8
|
+
"responseMode": "lastNode",
|
|
9
|
+
"options": {
|
|
10
|
+
"binaryData": true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"id": "webhook",
|
|
14
|
+
"name": "Webhook",
|
|
15
|
+
"type": "n8n-nodes-base.webhook",
|
|
16
|
+
"typeVersion": 2,
|
|
17
|
+
"position": [0, 0]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"parameters": {
|
|
21
|
+
"resource": "speechToText",
|
|
22
|
+
"operation": "transcribeFile",
|
|
23
|
+
"binaryPropertyName": "data",
|
|
24
|
+
"modelSelectionMode": "manual",
|
|
25
|
+
"modelId": "openai.whisper-1",
|
|
26
|
+
"language": "auto",
|
|
27
|
+
"outputFormat": "json"
|
|
28
|
+
},
|
|
29
|
+
"id": "speechall-transcribe",
|
|
30
|
+
"name": "Speechall Transcribe",
|
|
31
|
+
"type": "n8n-nodes-speechall.speechall",
|
|
32
|
+
"typeVersion": 1,
|
|
33
|
+
"position": [240, 0],
|
|
34
|
+
"credentials": {
|
|
35
|
+
"speechallApi": {
|
|
36
|
+
"id": "replace-me",
|
|
37
|
+
"name": "Speechall API"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"parameters": {
|
|
43
|
+
"respondWith": "json",
|
|
44
|
+
"responseBody": "={{$json}}"
|
|
45
|
+
},
|
|
46
|
+
"id": "respond",
|
|
47
|
+
"name": "Respond to Webhook",
|
|
48
|
+
"type": "n8n-nodes-base.respondToWebhook",
|
|
49
|
+
"typeVersion": 1,
|
|
50
|
+
"position": [480, 0]
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"connections": {
|
|
54
|
+
"Webhook": {
|
|
55
|
+
"main": [[{ "node": "Speechall Transcribe", "type": "main", "index": 0 }]]
|
|
56
|
+
},
|
|
57
|
+
"Speechall Transcribe": {
|
|
58
|
+
"main": [[{ "node": "Respond to Webhook", "type": "main", "index": 0 }]]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"active": false,
|
|
62
|
+
"settings": {},
|
|
63
|
+
"versionId": "example-webhook-audio-upload-to-json-transcript"
|
|
64
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-speechall",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Transcribe audio in n8n using Speechall",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/Speechall/speechall-n8n-node",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"n8n",
|
|
10
|
+
"speechall",
|
|
11
|
+
"transcription",
|
|
12
|
+
"speech-to-text",
|
|
13
|
+
"audio",
|
|
14
|
+
"subtitles",
|
|
15
|
+
"diarization"
|
|
16
|
+
],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Speechall"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/Speechall/speechall-n8n-node.git"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "n8n-node build",
|
|
26
|
+
"build:watch": "tsc --watch",
|
|
27
|
+
"dev": "n8n-node dev",
|
|
28
|
+
"lint": "n8n-node lint",
|
|
29
|
+
"lint:fix": "n8n-node lint --fix",
|
|
30
|
+
"release": "n8n-node release",
|
|
31
|
+
"prepublishOnly": "n8n-node prerelease",
|
|
32
|
+
"generate:openapi-types": "openapi-typescript https://raw.githubusercontent.com/Speechall/speechall-openapi/main/openapi.yaml -o nodes/Speechall/generated/speechall-openapi.ts",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"test:watch": "vitest"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"examples",
|
|
42
|
+
"!dist/**/*.tsbuildinfo"
|
|
43
|
+
],
|
|
44
|
+
"n8n": {
|
|
45
|
+
"n8nNodesApiVersion": 1,
|
|
46
|
+
"strict": true,
|
|
47
|
+
"credentials": [
|
|
48
|
+
"dist/credentials/SpeechallApi.credentials.js"
|
|
49
|
+
],
|
|
50
|
+
"nodes": [
|
|
51
|
+
"dist/nodes/Speechall/Speechall.node.js"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@n8n/node-cli": "0.35.1",
|
|
57
|
+
"@types/node": "^22.20.0",
|
|
58
|
+
"eslint": "9.29.0",
|
|
59
|
+
"openapi-typescript": "^7.13.0",
|
|
60
|
+
"prettier": "3.6.2",
|
|
61
|
+
"release-it": "^19.0.4",
|
|
62
|
+
"typescript": "5.9.2",
|
|
63
|
+
"vitest": "^4.1.9"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"n8n-workflow": "*"
|
|
67
|
+
}
|
|
68
|
+
}
|