AudioWorkletProcessor Help

I found another old post here where someone asked for help with an error " AudioWorkletProcessor is not defined"

They seemed to solve this issue but didn’t post the solution.

I am trying to setup audio recording via AudioWorkletProcessor so I can steam audio to an externa source.

but this line of code

class AudioRecorderWorklet extends AudioWorkletProcessor

give an error in playcanvas “Uncaught ReferenceError: AudioWorkletProcessor is not defined”

Sorry for creating a new thread for this but the other is pretty old and i did try to bump it.

Thanks in advance for any help or suggestions.

I found the solution for my issue was to remove the AudioWorkletProcessor file and to instead have its content stored in a string. I could then create an object URL using the string data and use that to add the module at runtime. this link was very useful Audio Worklet Example / Brian Slesinsky | Observable

1 Like