Integrate a microphone in the Django app

475 views
Skip to first unread message

מוריה יצחקי

unread,
May 24, 2021, 7:40:12 AM5/24/21
to Django users
Hello everyone
I want to allow my app to receive input from a microphone
I would be happy for help on how to do this in the visual section as well: how to put a microphone that allows you to type from the user in HTML and how to convert the audio to the text in Python
Will really really help me
thank you very much

Nick Sarbicki

unread,
May 24, 2021, 8:17:46 AM5/24/21
to Django users
Hi,

This isn't really a Django problem to solve, it's more general than that. First you need the client to record and send an audio file of their mic recording. This is likely something you want to do in JavaScript, as it is something that they will have to do on their machine - the server does not have access to their microphone. I believe you want this: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

After that, converting audio to text is a hard problem. However luckily it has been solved by several third parties (e.g. Google). So you can rely on a third party package to do the conversion for you e.g. https://github.com/Uberi/speech_recognition#readme

- Nick


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2be50a50-946c-4cbd-8041-70848cc52bcen%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages