n8n-nodes-local-ai-stack-dev 1.2.2 → 1.2.3

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.
@@ -62,28 +62,29 @@ class VoiceStudioStt {
62
62
  const binaryData = item.binary[binaryPropertyName];
63
63
  const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
64
64
  // Extract metadata with safe defaults
65
- const fileName = binaryData.fileName || binaryData.fileExtension ? `audio.${binaryData.fileExtension}` : "audio.wav";
65
+ const fileName = binaryData.fileName || (binaryData.fileExtension ? `audio.${binaryData.fileExtension}` : "audio.wav");
66
66
  const mimeType = binaryData.mimeType || "audio/wav";
67
67
  // Get language parameter (optional)
68
68
  const languageRaw = this.getNodeParameter("language", i, "");
69
69
  const language = languageRaw.trim();
70
- // Prepare FormData
71
- const FormData = require("form-data");
72
- const formData = new FormData();
73
- // Append buffer as file with explicit options object
74
- formData.append("audio_file", buffer, {
75
- filename: fileName,
76
- contentType: mimeType,
77
- });
70
+ // Prepare FormData using n8n's approach
71
+ const formData = {
72
+ audio_file: {
73
+ value: buffer,
74
+ options: {
75
+ filename: fileName,
76
+ contentType: mimeType,
77
+ },
78
+ },
79
+ };
78
80
  if (language) {
79
- formData.append("language", language);
81
+ formData.language = language;
80
82
  }
81
83
  // Send multipart/form-data request
82
84
  const response = await this.helpers.request({
83
85
  method: "POST",
84
86
  uri: serverUrl,
85
- body: formData,
86
- headers: formData.getHeaders(),
87
+ formData: formData,
87
88
  json: true,
88
89
  });
89
90
  returnData.push({ json: response });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-local-ai-stack-dev",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
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",