Taking audio as a input from user

Hello,
I am working on speech emotion recognition project. How to build a website where I can take audio as a input from user and send that audio back to the model in Google colab. There is a option for upload but how to record in website.

Welcome to the Forum, @deepthishivakumar202 !

There is no built-in answer to this specific problem. However, if you are willing to search this Forum, and the Docs, you can find bits and pieces that solve individual parts of the problem, such as

  • recording audio from the browser to a Media Object
  • creating database tables
  • saving a Media Object to a database table row
  • communicating to and from Google colab.

Python is a very good language for knitting your resulting parts together into a cohesive implementation of your overall goal.

Good hunting!

2 Likes

I cannot tell you about the last step (communicating with Google Colab), but the recording of audio requires javascript. Luckily, Anvil has some really neat ways to ignore javascript as much as possible.

Here’s an example app that records your voice and returns a Blob Media which can be passed on to a server or be downloaded.

https://anvil.works/build#clone:NV7GUHARUFVJB6CL=BHA7FFWJUUILD4Z6XJFTWWSL

After that, you can try passing this blob media to Google Colabs through their API services. I have not used it so you will have to figure out that part on your own