AudioContext is a modular interface for audio processing for the WebAudio API.
Questions tagged [audiocontext]
277 questions
6
votes
1 answer
Safari 15 fails to decode audio data that previous versions decoded without problems
I'm using AudioContext to load an .mp3 file for a game. It used to work fine, but after Safari 15 came out I'm getting reports from people where the sound will not play. The sound used to work fine for them before they upgraded their browser.
On my…

Einar Egilsson
- 3,438
- 9
- 36
- 47
6
votes
2 answers
scriptNode.onaudioprocess is deprecated , any alternative?
I want to get the audio buffer while talking , I did this method to detect it , but I receive message this method onaudioprocess is deprecated and is not fired, is there any alternative for it with an example.
audioContext = new AudioContext({…

developer
- 125
- 1
- 11
6
votes
1 answer
The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page
I'm using the jspsych.js module, and when using it, I look at the console and I'm getting this error:
The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
and it takes me to this lines of…

javiera
- 85
- 1
- 1
- 5
6
votes
1 answer
Safari AudioContext suspended even with onclick creation
I'm having troubles creating an AudioContext with Safari (desktop and mobile). It seems that even with creation upon user interaction, it is still suspended.
My code:
const test = () => {
…

ffritz
- 2,180
- 1
- 28
- 64
6
votes
1 answer
How do I generate this tick sound in JavaScript?
On a.bestmetronome.com, they have a metronome that generates ticks based on noise.
However, I couldn't figure out how the "ticks" are generated. Although I was able to work out the "tick" generator out of Audacity:
;; Metronome tick by Steve…

El Ectric
- 152
- 1
- 3
- 15
6
votes
1 answer
How do I get buffers/raw data from AudioContext?
I am trying to record and save sound clips from the user microphone using the GetUserMedia() and AudioContext APIs.
I have been able to do this with the MediaRecorder API, but unfortunately, that's not supported by Safari/iOS, so I would like to do…

Adam D
- 1,962
- 2
- 21
- 37
5
votes
1 answer
The HTMLMediaElement passed to createMediaElementSource has a cross-origin resource, the node will output silence
I was testing changing audio gain of a video. I created a sample HTML page, and the video file is on the same directory as the HTML file. There was no web server; I just created the file on my local disk and opened it with FireFox. The code is…

Damn Vegetables
- 11,484
- 13
- 80
- 135
5
votes
1 answer
With wavesurfer.js, how can I create an AudioContext AFTER loading the waveform?
I have:
this.wavesurfer = WaveSurfer.create({
container: "#wavesurfer-player",
height: 60,
barWidth: 2,
barHeight: 1, // the height of the wave
barGap: null,
scrollParent: false
});
…

Shamoon
- 41,293
- 91
- 306
- 570
5
votes
0 answers
Get frequency (HTML5 AnalyserNode) from audio file recorded with Cordova Media plugin
I'm trying to write a small Cordova app (mainly on Android 6 for now) which records and saves an audio file using the Cordova Media-Plugin.
var media;
var mediaFile = "mediafile.wav"
[...]
media = new Media('file:///sdcard/' +…

pheuel
- 51
- 3
5
votes
1 answer
setTimeout returns error with Uncaught TypeError: Illegal invocation in AudioContext in Chrome
In Chrome I first create a continuous tone with the AudioContext:
var audioCtx = new (window.AudioContext || window.webkitAudioContext);
var oscillator = audioCtx.createOscillator();
var gainNode =…

Houshalter
- 2,508
- 1
- 18
- 20
4
votes
0 answers
Safari: AudioContext MediaElementAudioSourceNode does not respect playbackRate
I'm currently working on an application that uses the AudioContext api to control audio for both video clips and background audio. We would like to use the AudioContext (and therefore MediaElementAudioSourceNodes) so we can make adjustments to the…

dylanboxalot
- 129
- 1
- 6
4
votes
1 answer
JavaScript audio analyze phonetics
I'm able to analyze audio data using the AudioContext API in JavaScript and draw the waveform to a canvas.
The question is, after loading the audio data, I have about a 1024-long Uint8Array data points representing the wavelength (per frame), how do…

B''H Bi'ezras -- Boruch Hashem
- 3,665
- 3
- 33
- 83
4
votes
3 answers
Change Audio From Multple Audio Tracks Video
i have videos with multiple audio tracks. i want to play the video and want change audio tracks from video. Is there any way to make this in html or there is html supported player for this?

Vishal Upadhyay
- 63
- 1
- 8
4
votes
0 answers
Determine if there is a pause in speech using Web Audio API AudioContext
Trying to understand the Web Audio API better. We're using it to create an AudioContext and then sending audio to be transcribed. I want to be able to determine when there is a natural pause in speech or when the user stopped speaking.
Is there some…

islalobo
- 617
- 2
- 8
- 22