Questions tagged [audio]
Sound and programming audio hardware, and the various audio formats or containers. For questions specific to sounds playback, use [audio-player] or [playback], and for questions specific to sounds recording, use [audio-recording] or [voice-recording].
34,858
questions
0
votes
0
answers
19
views
Styles applied to audio element work in firefox and safari, but not in chrome
I created an audio player using HTML/CSS/JS, here is a codepen containing it - https://codepen.io/terramsc/pen/YzerzYw?editors=1100
HTML:
<div id="player">
<div id="color-...
0
votes
1
answer
19
views
how can I count the number of people speek in an audio file
I'm working in an audio project. My goal is to count the number of people who spokes in an audio file. We can consider that we already removed the noise from that audio.(for example if there is two ...
0
votes
0
answers
14
views
Adding music to `VideoClip` doesn't work - moviepy
I am concatenating 1 ImageClip with 2 VideoClips and my goal is to add the music to the concatenated video, but the music might be different length as the video, so I use subclip to cut the music, and ...
-1
votes
0
answers
7
views
ffmpeg: Safe Place To Cut AC3, AAC, and MP3 Audio
Does AC3, AAC, or MP3 audio have the equivalent of keyframes where it's safe to make cuts in the audio? I have several long audio file that I need to preserve the quality of but I need to make a few ...
0
votes
0
answers
12
views
How to set the gain of 16-bit PCM samples without using floating-point math?
I have an array of 16-bit PCM samples (for the purpose of this question, let's say that they are signed). I have to apply a value, ranging from 0 to 65535, as the gain (volume control) for the samples,...
0
votes
0
answers
11
views
How to detect if a MIC ONLY is connected
My app plays and records wildlife sounds. It can do both either using external or internal hardware.
Yet, if I have a MIC with MIC ONLY functionality plugged, my app tries to play sound through it, ...
0
votes
0
answers
17
views
Spectrum analyzer of sound from a microphone
I want to create a frequency sound analyzer, but I can’t understand at all how everything should happen, except that
I need to use DFT at some point. I took the libsoundio and FFTW libraries, rewrote ...
0
votes
1
answer
27
views
Custom audio Tensorflow model - how to run inference
I have an adapted tutorial from a Tensorflow model maker example written in Python and running on OSX.
I have successfully trained a model to listen for the different sounds my newborn makes (hunger, ...
0
votes
0
answers
27
views
Convert audio wav to midi using Melodia
Firstly I apologize that I'm not experienced in asking questions here so it might be a little messy.
using the following repo in GitHub: https://github.com/gcunhase/wav2midi2wav
Melodia keeps showing ...
0
votes
0
answers
10
views
Play audio based on scroll position
I'm trying to make this audio file play once the users scroll position is above 1500. The code works, as the console logs 'Hej' but it does not play the audio file
// Audio
let crowd = new Audio('../...
-1
votes
0
answers
12
views
Is there a cross-platform alternative to OpenAL available on Apple platforms?
So I am trying to build an old interactive application on the most recent version of Mac OS, and I was surprised to find that there doesn't seem to be any version of OpenAL on the system.
When I build ...
0
votes
0
answers
16
views
Implementing a real time speech recognition using web Media Recorder API in React for the Front-End and Python for back-end
What we're trying to implement?
we deployed an AI model to stream the audio from microphone and display the text of the speech to the user. something like this.
What technologies are used?
Python for ...
0
votes
0
answers
12
views
Python PyAudio Updating audio devices info in program when mic disconnected
Win10/ I have a loop where I listen to the background with a microphone. I have a function, which shows me my current system audio devices (I setup the function to show microphones only).
Here it is:
...
0
votes
0
answers
8
views
pydub - Invalid data found when processing input
I'm trying to learn how to transcribe an audio recording, but I'm not getting very far, pydub won't even accept my recorded data:
from pydub import AudioSegment
m4a_file = '{path_to_m4a}/test.m4a'
...
-1
votes
1
answer
32
views
How to set microphone input through code? [closed]
There are lots of ways of recording audio input or setting the input volume but Im trying to set the audio input.
I wanna make an application that takes an audio file and outputs it as the microphone ...
0
votes
0
answers
11
views
Glitch audio using web audio api
Similar to the Pure Data example here (https://www.youtube.com/watch?v=FLK854QyjE4) I'm trying to conceptualise how a file, such as a text file, might be read in Javascript and played back as glitch ...
1
vote
0
answers
10
views
Can't play cached audio file Android java
I want to download, cache and play an audio file from the network. I managed to download and save it to the context.getCacheDir(). Absolute path is "/data/user/0/org.kimp.mustep/cache/floor_01/...
0
votes
0
answers
13
views
putting new wav file on code and synthesize with previous wav file.(python)
I'm trying to put new wav. file in code A.
code A is a code that plays files which Invisible_beauty.wav and thank_you.wav together.
when code runs, Invisible_beauty.wav file runs first.
10 sec later, ...
0
votes
0
answers
7
views
Laggy audio waveform zooming
I'm trying to write an app, which will let the user to load an audio file, display it as a waveform and place markers, which will point where audio has to be sliced. I will also add that at most cases,...
0
votes
1
answer
26
views
What is a good algorithm to detect silence over a variety of recording environments?
My app processes samples from microphone audio streams. The task I'm asking about: programmatically make a good guess at what ranges of the audio stream samples should be considered signal versus ...
0
votes
1
answer
15
views
Random sound Player
I'm trying to make it so that every 3 minutes, a new song gets played... but its not working and i'm not sure why... heres my code,
window.onload = function(){
song();
setInterval(song, 180000);
}
...
0
votes
0
answers
22
views
Unable to play sound file in python
I'm developing a 2 player ship shooting game. Each time when the bullet of ship1 hits ship2, shiphit
sound plays. Games works properly until any of the player loss the game. Then Replay button popup ...
0
votes
1
answer
18
views
Sound when button switch scene
What I am trying to do is when I press the button, it makes a sound and switch scene but it is delay 2s or 3s when i press the button and then it makes a sound so when i press a button it switches ...
-1
votes
0
answers
13
views
Gstreamer: Is there plugins to mux G711 audio into h264 video to a file and also to demux it back to its respective component
The question is as above. Would like to know if there is a plugin within Gstreamer that can mux video and G711 (pcma, pcmu) audio to a file
I have tried with matroskamux but I could not get demux to ...
-1
votes
1
answer
30
views
SoX batch convert adding white noise
I'm trying to add white noise to hundreds of files. I find a command but don't know how to adapt it.
There is a source folder with files and an empty destination folder. Could someone help me with the ...
0
votes
0
answers
22
views
How to rename ALSA devices? [closed]
I have two devices which both have the same ID and name in alsa. I could change the ID with a udev rule but so far haven't had any luck with the device name. Here's the contents of /proc/asound/cards ...
-1
votes
0
answers
12
views
Playing mp3 file on ubuntu server terminal [closed]
I have an old laptop with working speakers and intend to use it as a server. I have successfully managed to install Ubuntu Server on it.
The laptop has no GUI, It only has a terminal, I use the ...
0
votes
0
answers
12
views
Raspberry Pi as a I²S slave
I am using a raspberry pi 3B+ as a I²S signal generator (simple sine wave via python script). The plan is to receive the signal with a STM32L476RGT6 board. In my used configuration the raspberry has ...
0
votes
1
answer
30
views
Java Sound API encodes my wav file wrong? (on macOS)
I'm trying to record sound from my microphone and simply dump it into a wav file.
I have tried code from several tutorials. When I write the AudioInputStream to a wav file my program does create the ...
0
votes
1
answer
17
views
Splitting two channels of a WAV file into separate stereo files using ffmpeg
When activating RAW audio on a GoPro camera, you will get a WAV file with 4 channels. Channels 1 and two are the left and the right channel of the audio. Actually, I have no idea what channels 3 and 4 ...
0
votes
2
answers
33
views
Which is the best approach for dynamic drawing in Android?
I want to make a waveform drawing for an audio recorder in Android. The usual one with lines/bars, like this one:
More importantly, I want it live, while the song is being recorded. My app already ...
0
votes
0
answers
44
views
Supported sample rates in Windows
I'm working on a music player on Windows, and I'm using the waveOutOpen (with friends) API. To specify the format of the audio data I fill out the WAVEFORMATEX structure, specifying the correct ...
0
votes
0
answers
12
views
Seamless audio file concatenator for a js project?
I am trying to join/concatenate multiple audio files in a JavaScript project, and have tried using libraries like Crunker & Howler, but when I join concatenate my audio files, there is a small ...
-1
votes
1
answer
30
views
How can I split audio file into two using ffmpeg?
The ffmpeg docs mentions that you can use the | to specify the timesteps to split the file. This command returns an error? Am I misusing it?
Command:
ffmpeg -i input.wav -f segment=timestamps="60|...
0
votes
0
answers
21
views
Audio playback drops the beginning of the sound when played in a loop
I am trying to play an audio file in a loop (this example repeats it 3 times). The audio file is very short. It is just someone saying "Hello, world".
import pygame
def wait_for_player():
...
0
votes
0
answers
14
views
Audio and Generated Video Keeps Desyncing Despite Audio Being 48000khz
So I'm writing a C++ program that will take a wav file, generate a visualization, and export the video out alongside the audio using ffmpeg (pipe). I've been able to get output out to ffmpeg just fine ...
0
votes
0
answers
3
views
I added music but it resets on scene change
I added some music to my game, but every time there is a scene change, the music resets from the beginning. How do I prevent this from happening?
0
votes
1
answer
35
views
Better optimization for changing audio's volume JavaSwing
Been testing a new system for increasing/decreasing the audio within my JavaSwing application using a fade in and fade out effect. This works on one hand though by doing my own research, it's not as ...
0
votes
0
answers
12
views
Detect if assistance app is speaking on Android
I am building android Kotlin test app to check if Assistance app is speaking but not run.
audioManager.isMusicActive
Is there ways to check it?
val context = ApplicationProvider.getApplicationContext&...
0
votes
0
answers
10
views
How to stream recorded audio data to a remote server?
I want to implement a very basic recording chat app that users can speak.
I want that by the time a user start to speak, everyone hears him - chunk by chunk, not by the time he finished the record and ...
0
votes
0
answers
13
views
how to make audio player from local storage with DJANGO FORMS
so i want make audio player, the song it's form my local storage. i was new in django, so i have no idea to make it. i want make it using FORMS not models.
here's my form.py :
from django import forms
...
0
votes
0
answers
16
views
Can't rename .wav file after playsound. WinError 32, file in use
I am building a simple .wav audio file renamer that iterates over each file and plays them via playsound module before asking if the file should be renamed. It plays each file just fine, but I get &...
-1
votes
0
answers
30
views
Using ThinkDsp add a chirp background
Add a chirping sound to the background using thinkdsp in Python.
How can I merge them?Please I need to help you
wave1= thinkdsp.read_wave("/content/sample_data/sound.wav")
#required files ...
0
votes
0
answers
6
views
Hi! i am trying to save audio files in google collab
Im trying to edit and save audio fiels using Python, however its creating the folder structure but not creating the files itself; currently I can only work in google collab...
Please can you see below ...
0
votes
0
answers
14
views
Change an audio file frequency into 40k sound frequency
I'm trying to change my audio file frequency in Javascript and after a lot of struggle I came to one solution, files are given below but I face one limitation here that it can only convert frequency ...
0
votes
0
answers
22
views
How To Play Sound When I Click In The Button Which I Created Using Tkinter Using Python
I want to play sound when i click the button which i have created by python tkinter to determine that the button has been clicked or not. if button has been clicked it will play sound and if button ...
0
votes
0
answers
28
views
Python DB(A) measurement with measurement microphone (using pyaudio?)
I'm currently working on developing an acoustic application. Within this application, I like to display the DB(A) value. I'm using a measurement microphone (USB mic) and have all the specifications to ...
0
votes
0
answers
16
views
Simple bash tool to execute command on vocal input
I am trying to record mouse positions and events for later playback (linux - Ubuntu 20.04).
Right now this happens at regular intervals - every 2 seconds I record where the mouse is with xdotools and ...
0
votes
1
answer
25
views
Concat stream audio buffers into one file and store it
I was using the Google Cloud Speech to recognize streaming audios (from microphone) on the node server. At the same time I would like to store the streamed audio into a file. Since the streaming ...
0
votes
2
answers
43
views
How to record data under HDF5 file correctly
I am getting Type Error: Object dtype dtype('O') has no native HDF5 equivalent.
Here is my python code;
dtype for mel_train, mfcc_train, and y_train are all float32.
Array shapes are: mfcc_train: (...