Struggling to turn a curl command with file upload to node red flow

curl -X 'POST' \
  'http://localhost:9000/asr?task=transcribe&output=json' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'audio_file=@signal-2022-12-11-160613.ogg;type=video/ogg'

How can I turn this into a node red flow using the http request node? The file can come from a file node.
Just putting the binary buffer in payload does not solve the issue and in the response message it says that field audio_file is missing.

So I guess I somehow have to tell the http request node that this binary buffer from the file node is "audio_file"

My Use Case: I'm trying to get a transcription for an audio file via a whisper web service: GitHub - ahmetoner/whisper-asr-webservice: OpenAI Whisper ASR Webservice API

Have you searched the forum? It has been covered many times.

This answer is a good example...

Hi,

thank you, I found other topics but the solution didn't work (they were splitting the message in multipart headers manually). Your solution from the pdf file works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.