ardasen commited on
Commit
382707c
·
1 Parent(s): cc71b15

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +5 -2
server.js CHANGED
@@ -21,8 +21,11 @@ app.post("/reverse-proxy-whisper", async (req, res) => {
21
  // Create a new form data object
22
  const form = new FormData();
23
 
24
- // Add the uploaded audio file to the form data
25
- form.append("file", req.body);
 
 
 
26
 
27
  // Set other fields as needed (e.g., model)
28
  form.append("model", "whisper-1");
 
21
  // Create a new form data object
22
  const form = new FormData();
23
 
24
+ // Append the uploaded audio file to the form data
25
+ form.append("file", req.body, {
26
+ filename: "audio.m4a", // Set the filename
27
+ contentType: "audio/m4a", // Set the content type
28
+ });
29
 
30
  // Set other fields as needed (e.g., model)
31
  form.append("model", "whisper-1");