Questions tagged [audio]

11883 questions
0

votes
0

answer
4

Views

Delay minimacing due streaming audio to raspberry

I stream the audio from my laptop to my raspberry. At the Moment I use pacat to get the raw data, sox to convert to wav, ssh for transportation and vlc for playback. I used aplay previously, but it didn't change anything and I like vlc :). I think that the delay is produced by sox. And now I just wa...
Natinaum
0

votes
0

answer
15

Views

How can I switch routes and still play audio

I use Vue to play audio on a play page. I want the audio to still play after routing is switched. What should I do? I know that I can put the audio tag on the root page, that's one way to do it, but is there another way? It seems like it could be used for caching purposes, but I tried it and it didn...
DangoSky
0

votes
0

answer
7

Views

Edit audio element volume in userscript

I'm writing a userscript to try to decrease an overly loud audio element. How do I get access to an audio element that has been created, but not placed in the DOM anywhere? On the site itself, it has something akin to: function () { var audioElement = document.createElement('audio'); audioElement.se...
Ayjay
2

votes
1

answer
26

Views

How can I do FFT analysis of audio file in chrome without need for playback?

There isn't single one working example on whole internet of how to perform FFT analysis of a sound file/buffer/audiobuffer in browser without need for playback. Web audio API has been changed too much to be able to use this library https://github.com/corbanbrook/dsp.js any more for example. All oth...
okram
0

votes
0

answer
5

Views

AudioKit/DSP: Understanding the different between the size of uncompressed audio on disk vs. in memory

This is a more generic RTFM DSP question coming from someone very comfortable with audio production and software , but new to audio software development, regarding the difference in size between uncompressed (wav, caf, aiff) files (44.1 sample rate, 16 bit) on disk, vs. the actual float values of th...
Max
0

votes
0

answer
3

Views

play audio from TCP/IP server in UWP client on PI3

I'm trying to make an uwp app which will be a client and will run on PI3. The server is a C# Winforms app, that runs on my Windows 10 computer, which I've found here: https://www.codeproject.com/Articles/482735/TCP-Audio-Streamer-and-Player-Voice-Chat-over-IP. The server can stream audio from microp...
user3678813
1

votes
1

answer
1.3k

Views

Video editing with python : adding a background music to a video with sound

I would like to add a background music to a video file (.mp4) in python. I have looked the web and did some tricks with moviepy for python, but I did not found a single way to add background music to a video file that already contains music. Any ideas how to do that ? Edit following Anil_M's comment...
Jay D.
1

votes
3

answer
482

Views

SDL - How to play audio asynchronously in C++ without stopping code execution?

I am developing a clone of Asteroid in pure C++ and for that purpose, I need to add sounds to different events such as when a bullet is fired and when an explosion occurs. The issue however is that I don't have any experience with audio libraries. I am using Simple DirectMedia Layer (SDL) and wrote...
Parker Queen
0

votes
0

answer
2

Views

Google Speech Recognition API: returns null result

I use Google speech recognition API. When I'm trying to recognize relatively short words (like "yes" or "no") with duration between 0.25-0.5 seconds, Google API often returns NULL. I tried other input data formats and solution posted here (16-bit PCM, mono input audio file), but it hasn't improved t...
Sergey
2

votes
0

answer
8

Views

Difference between sampling rate, bit rate and bit depth

This is kind of a basic question which might sound too obvious to many of you , but I am getting confused so bad. Here is what a Quora user says. Now It is clear to me what a Sampling rate is - The number of samples you take of a sound signal (in one second) is it's sampling rate. Now my doubt here...
RC0993
0

votes
1

answer
28

Views

Implementing TPCircularBuffer in C++ Class

I am trying to implement a circular buffer in my class. If I initiate it in the init method, it works, but I wanna declare the buffer variable under private, so I can access it from anywhere inside the class: #import "AudioKit/TPCircularBuffer.h" class MyClass{ public: MyClass() { //.. } MyClass(in...
HTron
0

votes
1

answer
13

Views

How to create a javascript function which fades audio out on mouseout?

I have a really simple bit of javascript that starts audio playback on mouseover of an image, and stops audio playback on mouseout. How can I change the second function so that it fades the sound out gradually, rather than stopping it abruptly? I have looked at other similar questions but I'm unfo...
Edie Murray
1

votes
2

answer
6.3k

Views

API for capturing sound on Windows

I need a C++ API to enumerate input devices and capture sound for Windows Vista, Windows 7 and Windows 8. If there is no common API I can use OS specific API for different versions of Windows. I found some references on Microsoft site, but I don't know what to chose. What do you recommend?
Felics
0

votes
0

answer
14

Views

How to get Javascript to automatically play audio at a certain times of the day

I am building a wallboard system for a restaurant, and they would like to include an alarm that goes off at 3 different times throughout the day, every day, to remind the team to do certain tasks. I have most all of the wallboard built already using php and html, but I am having some trouble with th...
Rjoel98
0

votes
0

answer
6

Views

Karaoke playback synchronization (Android latency issue)

I am trying to implement simple Karaoke scenario: User can record his voice (without headphones) with simultaneous playback playing. Then he can apply some filters, add playback, mix it and save it to file. I use SuperpoweredRecorder along with SuperpoweredAdvancedAudioPlayer and then SuperpoweredDe...
Dev_IL
1

votes
1

answer
1k

Views

FFmpeg : Error occurred while encoding audio stream from ac3 to aac

I am using following command to encode my video to h264 and aac audio codec : ffmpeg -i sample.mp4 -codec:v libx264 -profile:v high -level:v 4.0 -codec:a libvo_aacenc -b:a 128k output_file.mp4 Following is a trace of the error i am getting at the console. Input #0, mpegts, from 'sample.mp4': Duratio...
akki_2891
1

votes
2

answer
448

Views

Android file chooser redirects audio files to /external

I am writing an app that requires the user to choose files of various types on their phone. I use this code to launch a file chooser intent: Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("file/*"); startActivityForResult(Intent.createChooser(intent, "Unhelpful text"), INTEGER...
ItsTimaiFool
1

votes
1

answer
224

Views

Normalise a wave file

I wish to normalise a 16 bit mono wave file. Is this the correct approach? import wave w = wave.open("s.wav", 'rb') data = [struct.unpack("
Baz
35

votes
4

answer
2k

Views

How do I play audio files synchronously in JavaScript?

I am working on a program to convert text into morse code audio. Say I type in sos. My program will turn this into the array [1, 1, 1, 0, 2, 2, 2, 0, 1, 1, 1]. Where s = dot dot dot (or 1,1,1), and o = dash dash dash (or 2,2,2). This part is quite easy. Next, I have two sound files: var dot = new Au...
Jozurcrunch
0

votes
0

answer
17

Views

Is there a simple way to play piano notes using Python?

Is there a simple package for playing piano notes in Python? Unfortunately, most of the packages listed in PythonMusic are outdated (broken links and incompatible with Python 3). e.g. import soundPackage as sp sp.emit(notes = ['C4','G4'], duration = 1.5, instrument = 'piano')
Miladiouss
2

votes
2

answer
140

Views

Reading a wav file with scipy and librosa in python

I am trying to load a .wav file in Python using the scipy folder. My final objective is to create the spectrogram of that audio file. The code for reading the file could be summarized as follows: import scipy.io.wavfile as wav (sig, rate) = wav.read(_wav_file_) For some .wav files I am receiving t...
Jose Ramon
7

votes
2

answer
203

Views

Run script based on sound VU level in vb.net

I'm designing an application to farm one of my games for me. However, The approach I'm going with is to listen for a sound or spike in sound levels before running a desired macro combination. The audio I'm looking to monitor is the current PC's audio output, not a microphone or external device. This...
John Kens
1

votes
1

answer
308

Views

AVPlayerLayer pauses currently playing audio

I have a ViewController which I add an AVPlayerLayer to have a video background. For that I use AVPlayerLayer and add it to the view's layer. If I have Spotify or anything else playing audio playing while opening that ViewController the PlayerLayer pauses it. How can I end this behavior? I create my...
Arbitur
1

votes
2

answer
1.6k

Views

Matlab Questions about Audioplayer GUI

I am quite new to Matlab and I am trying to make a program where there are 3 push buttons. Question 1: Button 1 will be linked to an audio file (.wav) So when I press it, Button 1 will "select" the first audio file. Button 2 will be linked to another audio file (.wav) So when I press it, Button 2 wi...
user4514279
1

votes
2

answer
947

Views

Playing an mp3 file in BlueJ

I'm trying to play an mp3 file in BlueJ following this Stack question answer: Playing .mp3 and .wav in Java? I have the exact same code except the file name. Here is my code: String bip = "Johnny.mp3"; Media hit = new Media(bip); MediaPlayer mediaPlayer = new MediaPlayer(hit); mediaPlayer.play();...
Rawand
1

votes
1

answer
569

Views

Same volume for all MP3 Files in JAVA

I am writing an Java based Music Player which also should automatically change the volume levels of all mp3 to the same. For example some mp3's are a bit louder than others and therefore I would like to have a player which automatically can adjust the volume levels to the same. So too quiet songs sh...
zFr3eak
1

votes
4

answer
838

Views

Play sound without latency iOS

I can't find method how i can play sound real with low latency. I try use AVFoundation audio player huge latency around 500ms So i try create system sound, and too without luck latency around 200ms it's not much but not useful for me. I need 50ms max. Be sure my sound sample is clear tone without si...
Dmitriy Pushkarev
1

votes
1

answer
758

Views

Button that Plays Sound in Android Studio not Playing

I am trying to make a simple button that plays a sound, but I am getting an error on (this, R.raw.shotgun). I have the raw folder and the sound file. I think the problem is with the this but I don't know why. Thanks. public class MainActivity extends AppCompatActivity { private Button button; @Overr...
LUKER
1

votes
2

answer
3k

Views

How to assign sounds to channels in Pygame?

I'm trying to play multiple sounds simultaneously in Pygame. I have a background music and I want a rain sound to play continuously and play ocasional thunder sounds. I have tried the following but my rain sound stops when thunder sound is playing. I have tried using channels but I don't know how to...
Sorade
1

votes
0

answer
11

Views

Is there a way to pan sound in QML?

I am currently developping a mobile app for iOS/Android in Qt 5.12 / QML. I am working on Windows 10 64 bit and I am using QTCreator 4.8. I am able to play audio easily thanks to the audio QML type, but I would like to pan it. The AudioEngine QML Type would be ideal for me, unfortunately I gave up b...
L. Chaumartin
1

votes
2

answer
2.6k

Views

How to play audio only from youtube videos using HTML and javascript

What I'm trying to do: Create a list of items which contains a link to play audio from a youtube video beside each item What I'm currently doing: I'm able to do this for a single item using the below: This creates a play button and works perfectly on a single item, however will not work with multipl...
user2372585
1

votes
1

answer
92

Views

Documentation of mp3transform [closed]

Is there any documentation of mp3transform? I'm trying to play .mp3 files, which AudioInputStream doesn't understand. I'm writing in Java. I think, that this library is not the best of every possibility. Do you recommend any different libraries for playing .mp3 files? I'm going to do some "serious"...
Bartosz Woźniak
1

votes
1

answer
1.5k

Views

How Can I Get A List of Available System Sounds in iOS?

I found this question, but it's a bit aged. It looks like that directory access is no longer available for the example app they recommend. The Apple documentation doesn't seem to have what I need, either. What I need is to be able to list the built-in sounds (not provide my own), and allow a user of...
1

votes
1

answer
1.8k

Views

Is there a way to play a music with <audio> in react?

I am creating a simple react app that requires playing music with a given url. I tried to test with a hard coded music url and use the tag to play the music just as we do in HTML. class Music extends React.Component { render() { return ( ) } } But this will not compile. What is the simplest way to...
Dawn17
1

votes
2

answer
726

Views

JHipster : Blob / ImageBlob / VideoBlob / AudioBlob datatype

JDL-Studio recognizes "ImageBlob" as a predefined datatype. By importing the JDL file an entity class with a byte-array attribute will be created as well as a front-end component to browse an image file and also some components to display the image. It's not the same with Video. I mean if you use "V...
Alireza
0

votes
0

answer
39

Views

Youtube live stream fails after 4.6 hours when uploaded from Wowza with 24-bit audio timestamp

We use Wowza to stream live video to AWS Elemental and Youtube using the rtmp protocol Now, whenever we are streaming the Audio goes down after 4 hours 40 minutes. However, we generally have 6-8 hours of a stream. The audio uses a 24-bit timestamp which translates to 4 hours 40 minutes. It is not an...
rahulg
1

votes
1

answer
62

Views

Error when installing a tap on audio engine input node

whenever the code reaches inputNode.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) {[weak self] (buffer:AVAudioPCMBuffer, when:AVAudioTime), app is crashing with following error Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition i...
mahdi
1

votes
1

answer
35

Views

Volume is outside the range

My console log is throwing the following error: Uncaught DOMException: Failed to set the 'volume' property on 'HTMLMediaElement': The volume provided (1.005) is outside the range [0, 1]. Can anyone explain this to me on how to fix this? Any help is appreciated! Thank you. Code: // Fade out/in functi...
code_secret
1

votes
1

answer
40

Views

Can .ts audio files be combined using cat command in append mode to get the .mp3 file

I have some .ts files as part of an hls audio stream. Can I use the cat command to append them and get the .mp3 file. I'm curious what ffmpeg does to create the mp3 from .ts or .m3u8 files so that I can implement it in a node server
Amal Jossy
1

votes
1

answer
34

Views

Processing framerate very low and not changeable

I'm building a processing sketch that uses both changing-background-images, oscillators and soundfiles. Basically every draw(), the background changes, an oscillator plays at a certain frequence and a short audio file is played Now, the problem: No matter what framerate I set, it always gets below 5...
user8890965

View additional questions