WebGL and Microphone

Hello @gfoot I download and run it on WebGL platform but I cannot see the things happening as your build file.

I am not getting the init actually…

please help me out…

hey @gfoot do you have this code on github somewhere? i think the library may need to get tweaked because it’s breaking. i don’t mind working on it a bit.

hey @gfoot would you mind sharing your work on github? the link mentioned above is dead. just as @dakume mentioned a few people would be interested in developing a solution for mic input in webgl and it seems like a good starting point.

Hello everyone,
Can you tell me where do i find the MicrophoneWebGL.unitypackage.
Because above links are showing.
“This site can’t be reached”

1 Like

Hello gfoot,
Can you tell me where do i find the MicrophoneWebGL.unitypackage.
Because above links are showing.
“This site can’t be reached”

Bah must’ve switched phone providers and lost the web storage.

Okay starting over… WebGL plugins…

I have a few more tweaks to go, but it’s basically working. I still need to incorporate supporting multiple microphones and multiple sample rates in the WebGL plugin.

The HTML5 media API is a beast. When you just want the raw wave data it gives you blobs. When you have a blob you need to run it through a request to extract the bytes. Or you can bypass that and get the direct float data and you have to handle the timing manually.

There’s another nice things like needing to run in HTTPS if you don’t want to always see the Microphone access prompt.

Anyway, I’m improving this over time. WIP demo: Unity WebGL Player | WordDetection

I have a C# interface that mirrors the regular Microphone API and uses the WebGL jslib when needed.

2 Likes

I am building a very small API C# interface to the WebGL JS AudioCapture Device for Unity3d to replace the missing microphone. It is in testing but the result is looking very pleasing right now. It has testing modes to show what is happening, and will be just bringing the data back into the standard Unity engine as a set of buffers being recorded, pointer to where the next buffer is going to, and buffer status information. This can be used by application programmers or applied to Audio Source for games. I want to sell it to fund important future motherboard GPU hardware improvements.

How big of demand is there for this? I am going to use it for my own testing of some AI I have worked on for years and in school. Just using Unity3D to model it. Are there people out there willing to pay for a functional testable, “Unity3d WebGL Microphone Asset”. I would probably version different Asset Products according to what their functionality is. I can get it ready for simple use as a (dll/js script) nuget package as an asset and get it on the Unity Asset store if anyone thinks it would be useful.

Here is some of the Test Debug Info it outputs as a visual output to verify functionality, i.e. Integration Test.

1 Like

dead URL :frowning:

@ :
Still not in build?
Microphone still not working in the last version of Unity… :frowning:

Sorry, but it is still not supported by Unity.

You might give this Unity Asset Store - The Best Assets for Game Making a go for your microphone needs.

1 Like

:frowning:

Found this which is free :
https://github.com/tgraupmann/UnityWebGLMicrophone

It detects my microphones from the webGL player but didn’t success to use it yet…

I am actually trying to use it with this :

Wondering if someone made it works?

It isn’t dead. I just downloaded it again. no issues grabbing it.

And individually both of those other components you listed work “okay” on my builds here.
Perhaps if you were a bit more explicit with your intentions people could be more helpful.
There are some notes that the audio_analyzer is not “real-time ready” and other notes to indicate a code hook is required to get the mic working as you might expect. Perhaps it is one of those caveats. Probably a new question is appropriate at that point.

The support for getUserMedia is spotty at best at the moment. - that possibly needs love https://stackoverflow.com/questions/28991835/firefox-navigator-getusermedia-is-not-a-function/28991938

Short answer. No. No native support yet

I just tried another project to build to WebGL and getting the dreaded error CS0103: The name `Microphone’ does not exist in the current context two and half years later.

Is this likely to be in soon?
WebAudio supports it no?

ah…I see. Still at “The Microphone class is not supported in WebGL.”

@Schubkraft Opened 2015, asking in 2019. WebGL Microphone support? Upcoming?

5 Likes

This looks like a good alternative for now:

Clearly…

Sorry Unity Team but as a User who switched from another Big Engine, i can not understand points like this.
In 5 Years you didn’t provide mic support for WebGL… wow

5 Likes

Any news? Would be very useful for a project I am working on right now.