Record from microphone on a perspective client

Hi, I am looking to record user audio input on a perspective client.

I’ve done it on a vision client before (easy enough with a python script since it runs on the client side).

However with perspective, I don’t really know how to access the microphone via browser. There are certain websites that uses JS like this:
image

However, when this page is embeded in an iFrame, it gives me this error (audio recording not supported):
image

So I’m wondering i’m on the right track? Could I in theory access the microphone of the client with the latest version of ignition? We are trying to avoid creating a webapp just for this purpose :smiling_face_with_tear:

Thanks

1 Like

You will need to write a custom module to provide a component that implements the modern WebRTC interfaces for media.

If you did, I suspect you’d find a nice market for it here. (:

Ahh thanks, I’ve never written a module before but I would be glad to take on the challenge if I have the time, any advice on where to start? (IDE? Language?)

I have basic knowledge of Java but I doubt that would be enough :sweat_smile: More of a C/C++ and Python programmer meself

1 Like

https://docs.inductiveautomation.com/display/SE/Introduction

Jetbrains IntelliJ for the win. (I drug my heels for years, and regret it.)

I still use Java exclusively. Kotlin boosters around here will pitch it.

1 Like

just to bump up on any solution on recording voice on perspective app or webpage after 2 years.

Hi just to share what we ended up doing, I didn't get the module working in time, so what I did was firing up a seperate django server to run the WebRTC interface (complete with simple authentication to identify who record the audio).

That allowed me to record the audio, and write it into the database. Ignition then connects to the database to get the audio binary data and serve it using either WebDev or BlobServer.

1 Like