Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
Send Audio File with axios

How to send an audio file to an API with Axios?

I'm programming in JavaScript - React Native and I'm stuck on that part.

I want to know how I do this through a script running with node, not html.

var audioFile = fs.createReadStream("./Welcome.wav")
var form = new FormData();

form.append("file", audioFile);

axios.post('https://speech2text-vitor.herokuapp.com/name', 
    form,
    {
        headers: {
            "Content-Type": "multipart/form-data"
        }
    }
)
.then(result => {
    console.log(result.data)
})

Note: I'm running with nodejs

API in Python:


app = FastAPI()

@app.post("/name", )
async def post_name(file: UploadFile=File(...)):
    return file.filename
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!