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
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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.
|
|
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
|
-
|
|
86
|
-
headers: formData.getHeaders(),
|
|
87
|
+
formData: formData,
|
|
87
88
|
json: true,
|
|
88
89
|
});
|
|
89
90
|
returnData.push({ json: response });
|
package/package.json
CHANGED