Adviov
Adviov

Reputation: 480

Capture, modify and then output audio in electron

I'm trying to capture, modify and finally output audio in node with Electron (Mac OSX). These are the steps:

  1. Capture the audio before it's output, possibly via CoreAudio.
  2. Modify the audio stream/buffer via the Web Audio API.
  3. Output the modified buffer to the sound device.

I've tried node-core-audio. However, the most I can achieve is a rapid glitching sound. Other than this a I haven't been able to find a good solution I/O of audio.

How can I achieve this without sacrificing sound quality?

Upvotes: 11

Views: 6068

Answers (1)

John Code
John Code

Reputation: 685

I'm not sure what you want to accomplish, but on MacOS, this is not yet possible. I came accross the problem of recording system sound on MacOS, and I found a solution. Finally! Using Soundflower and Javascript with electron, I finally could record system audio. Though it is not exactly what you want, I modified this audio stream by adding it with video stream from the System, then displayed it to the user. Here is my solution to the issue IN this detailed blog post I think it is better than posting all the long steps here on stackoverflow.

Upvotes: 3

Related Questions