n8n-nodes-local-ai-stack-dev 1.2.1 → 1.2.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.
@@ -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;CA2DxE"}
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;CAkExE"}
@@ -47,26 +47,30 @@ class VoiceStudioStt {
47
47
  };
48
48
  }
49
49
  async execute() {
50
- var _a;
51
50
  const items = this.getInputData();
52
51
  const returnData = [];
53
52
  for (let i = 0; i < items.length; i++) {
54
53
  try {
55
54
  const serverUrl = this.getNodeParameter("serverUrl", i);
56
55
  const binaryPropertyName = this.getNodeParameter("audioBinary", i);
56
+ // Verify binary data exists
57
+ const item = items[i];
58
+ if (!item.binary || !item.binary[binaryPropertyName]) {
59
+ throw new Error(`No binary data found for property "${binaryPropertyName}"`);
60
+ }
57
61
  // Get binary data
58
- this.helpers.assertBinaryData(i, binaryPropertyName);
62
+ const binaryData = item.binary[binaryPropertyName];
59
63
  const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
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";
64
+ // Extract metadata with safe defaults
65
+ const fileName = binaryData.fileName || binaryData.fileExtension ? `audio.${binaryData.fileExtension}` : "audio.wav";
66
+ const mimeType = binaryData.mimeType || "audio/wav";
64
67
  // Get language parameter (optional)
65
68
  const languageRaw = this.getNodeParameter("language", i, "");
66
69
  const language = languageRaw.trim();
67
70
  // Prepare FormData
68
71
  const FormData = require("form-data");
69
72
  const formData = new FormData();
73
+ // Append buffer as file with explicit options object
70
74
  formData.append("audio_file", buffer, {
71
75
  filename: fileName,
72
76
  contentType: mimeType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-local-ai-stack-dev",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "n8n custom nodes for AI services including image captionning, OCR, face detection, and more AI-powered features",
5
5
  "keywords": [
6
6
  "n8n",