Questions tagged [audio-worklet]

Use this tag for questions about performing custom audio processing within Audio Worklets, which are part of the Web Audio API. You may want to tag [web-audio-api], too.

Audio Worklets are worklets (a “lightweight” version of a ) for audio processing. They are part of the . Audio Worklets replace the deprecated nodes which run on the browser’s main thread, often causing audio processing to be too slow.

For further information, see these articles and documentation links:

58 questions
6
votes
2 answers

(Next JS 10.2) Audio Worklet Support

Our application is built on top of Next, and we are currently in the process of migrating our audio recording engine to Audio Worklet API from Script Processor. (with backwards compatibility of course) Part of the transition is also upgrading to…
4
votes
3 answers

How to integrate own library with WebPack which needs to span WebWorkers and AudioWorklets

Goal I am the author of a JavaScript library which can be consumed through AMD or ESM within various runtime environments (Browser, Node.js, Dev Servers). My library needs to spawn WebWorkers and AudioWorklets using the file it is contained. The…
Danielku15
  • 1,490
  • 1
  • 13
  • 29
4
votes
0 answers

Remove a worklet after use

My program creates a lot of worklets from code generated at runtime. They are only used for a short amount of time. Is there a way to remove or unregister old, unused worklets to regain memory? Or is this done automatically by…
dogefromage
  • 153
  • 8
4
votes
1 answer

How to fix “cracking” audio when using Audio Worklets?

I’m trying to understand how AudioWorklet is working and made some tests. So far, I have a huge “cracking” problem when I let the browser play the sound in the background and do something else (e.g. opening a CPU-heavy application like Photoshop or…
3
votes
2 answers

AudioWorklet playback cut in half on iPhone devices and Safari

I have implemented a simple audio recorder that uses AudioWorkletAPI. The playback works great on Chrome, but on Safari or iPhone devices (including Chrome on iPhone) half of the audio is missing. For example: only the first 20% and last 30% of the…
slaninero
  • 31
  • 1
3
votes
2 answers

How can I import a module into an AudioWorkletProcessor that is changed elsewhere?

I'm trying to change a value that is used by an AudioWorkletProcessor from another module, but from the context of the AudioWorkletProcessor, the value doesn't change and just stays the same. But from the module that modifies the data, when queried…
korri123
  • 347
  • 4
  • 10
2
votes
1 answer

How to package npm module with AudioWorklet?

I've built an AudioWorklet that imports an npm module. This works during runtime but fails when compiled. My understanding (but new to Worklets and Web Workers) is that the AudioWorklet code needs to be self-contained and can't pull the import in…
dvoutt
  • 930
  • 2
  • 9
  • 23
2
votes
0 answers

Javascript Audio Streaming via Audio Worklet Float 32 Array convert to audio file

I am using AudioWorkletProcessor, I need to store all the audio stream data into a single file and play it at the end. Below is my AudioWorkletProcessor code: class RecorderProcessor extends AudioWorkletProcessor { // 0. Determine the buffer size…
Feroz Siddiqui
  • 3,840
  • 6
  • 34
  • 69
2
votes
0 answers

Audio Worklet - How to capture microphone streams

I am trying to capture live microphone streams from my desktop, When converting float 32 bits to Int16 Array all values are coming 0. Not sure what i have done wrong here. how can i capture the live microphone stream in audio worklet? Below is…
Feroz Siddiqui
  • 3,840
  • 6
  • 34
  • 69
2
votes
2 answers

Implementing an AudioWorklet in Safari

I have been exploring some of the samples which are listed here: Google Chrome Labs - Audio Worklet. They have helped me get most of the way to implementing my own WASM based AudioWorklet. It soon came to my attention that Safari doesn't support…
2
votes
0 answers

Set AudioWorkletProcessor input to Float32Array

I have been trying to extract input from one AudioWorkletProcessor using postMessage, then insert that input into another AudioWorkletProcessor. I managed to get the Float32Array into the second AudioWorkletProcessor process method but RingBuffer…
2
votes
0 answers

Recording microphone audio with AudioWorklet problem: data spills over between recordings (Chrome only)

I'm developing a web app that uses AudioWorklet to record audio. See example here: https://engagelab.uio.no/oslospell/#/debug I believe I clear all buffers (this.audioData in the main thread) between recordings, but somehow: On Chrome/PC, a new…
2
votes
1 answer

Using FFMPEG filters directly in Web Audio API AudioWorklet

I am trying to leverage the vast numbers of audio filters that FFMPEG has and see if I can use them directly in a custom AudioWorklet so I dont have to reinvent the wheel for each and every filter. One option I came across was to convert the…
2
votes
0 answers

Connect to AudioWorklet instead of ScriptProcessor when recording

I need to convert my ScriptProcessor logic to an AudioWorklet. The ScriptProcessor process is very easy and only a few lines of code, but I'm having a hard time converting it over to an AudioWorklet. Here is my current process (the stream comes from…
2
votes
1 answer

Send AudioBuffer to Speaker

Here's what I want to do: Send microphone audio to AudioWorketProcessor (works) Send results from AudioWorkletProcessor to a server using WebSockets (works) Receive back the data over WebSockets (works) Send data to the computer's speakers (how to…
Len White
  • 892
  • 13
  • 25
1
2 3 4