n8n-nodes-local-ai-stack-dev 1.2.0 → 1.2.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceStudioStt.node.d.ts","sourceRoot":"","sources":["../../nodes/VoiceStudioStt.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEnF,qBAAa,cAAe,YAAW,SAAS;IAC9C,WAAW,EAAE,oBAAoB,CAyC/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"VoiceStudioStt.node.d.ts","sourceRoot":"","sources":["../../nodes/VoiceStudioStt.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEnF,qBAAa,cAAe,YAAW,SAAS;IAC9C,WAAW,EAAE,oBAAoB,CAyC/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA2DxE"}
|
|
@@ -47,6 +47,7 @@ class VoiceStudioStt {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
async execute() {
|
|
50
|
+
var _a;
|
|
50
51
|
const items = this.getInputData();
|
|
51
52
|
const returnData = [];
|
|
52
53
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -55,10 +56,11 @@ class VoiceStudioStt {
|
|
|
55
56
|
const binaryPropertyName = this.getNodeParameter("audioBinary", i);
|
|
56
57
|
// Get binary data
|
|
57
58
|
this.helpers.assertBinaryData(i, binaryPropertyName);
|
|
58
|
-
const binaryData = items[i].binary[binaryPropertyName];
|
|
59
59
|
const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
60
|
-
// Get
|
|
61
|
-
const
|
|
60
|
+
// Get binary data metadata (may be null in some cases)
|
|
61
|
+
const binaryData = (_a = items[i].binary) === null || _a === void 0 ? void 0 : _a[binaryPropertyName];
|
|
62
|
+
const fileName = (binaryData === null || binaryData === void 0 ? void 0 : binaryData.fileName) || "audio.wav";
|
|
63
|
+
const mimeType = (binaryData === null || binaryData === void 0 ? void 0 : binaryData.mimeType) || "audio/wav";
|
|
62
64
|
// Get language parameter (optional)
|
|
63
65
|
const languageRaw = this.getNodeParameter("language", i, "");
|
|
64
66
|
const language = languageRaw.trim();
|
|
@@ -67,7 +69,7 @@ class VoiceStudioStt {
|
|
|
67
69
|
const formData = new FormData();
|
|
68
70
|
formData.append("audio_file", buffer, {
|
|
69
71
|
filename: fileName,
|
|
70
|
-
contentType:
|
|
72
|
+
contentType: mimeType,
|
|
71
73
|
});
|
|
72
74
|
if (language) {
|
|
73
75
|
formData.append("language", language);
|
package/package.json
CHANGED