audio

Compare the similarity of 2 sounds using Python Librosa

与世无争的帅哥 提交于 2021-01-04 05:33:25
问题 I have about 30 sound clips that are each a preset from a synthesizer. I want to compare these sounds to find out which ones are similar, and then sort the sounds so that each sound is adjacent in a list to 2 sounds that are similar to it. Frequency is not the only thing I want to look for. I would rather 2 saw waves which are a tone apart be considered similar that a saw wave and a sine wave which are the same note. These sounds would be considered similar for example Using librosa, I have

Oboe Async Audio Extraction

柔情痞子 提交于 2021-01-03 07:33:05
问题 I am trying to build a NDK based c++ low latancy audio player which will encounter three operations for multiple audios. Play from assets. Stream from an online source. Play from local device storage. From one of the Oboe samples provided by Google, I added another function to the class NDKExtractor.cpp to extract a URL based audio and render it to audio device while reading from source at the same time. int32_t NDKExtractor::decode(char *file, uint8_t *targetData, AudioProperties

Sampling rate issue with Librosa

一曲冷凌霜 提交于 2021-01-02 05:58:21
问题 When doing a STFT, and then an inverse STFT (iSTFT) on a 16 bits 44.1 khz audio file with the library Librosa : import librosa y, sr = librosa.load('test.wav', mono=False) y1 = y[0,] S = librosa.core.stft(y1) z1 = librosa.core.istft(S, dtype=y1.dtype) librosa.output.write_wav('test2.wav', z1, sr) the output is only a 22 khz audio file. Why? Where is there the sampling rate change in librosa ? 回答1: The librosa.load() function enables target sampling, wherein the audio file you import can be re

Sampling rate issue with Librosa

被刻印的时光 ゝ 提交于 2021-01-02 05:58:06
问题 When doing a STFT, and then an inverse STFT (iSTFT) on a 16 bits 44.1 khz audio file with the library Librosa : import librosa y, sr = librosa.load('test.wav', mono=False) y1 = y[0,] S = librosa.core.stft(y1) z1 = librosa.core.istft(S, dtype=y1.dtype) librosa.output.write_wav('test2.wav', z1, sr) the output is only a 22 khz audio file. Why? Where is there the sampling rate change in librosa ? 回答1: The librosa.load() function enables target sampling, wherein the audio file you import can be re

Intermittent crashes with audio in react-native

耗尽温柔 提交于 2021-01-01 09:28:45
问题 This bounty has ended . Answers to this question are eligible for a +500 reputation bounty. Bounty grace period ends in 20 hours . kojow7 wants to draw more attention to this question. Crashing when audio is played: I am creating an app with several different screens of audio clips. We are testing out the app on iPhone/iPad using Testflight and are getting intermittent crashes when audio clips are played. There seems to be nothing wrong with the audio clips themselves as most of the time they

Intermittent crashes with audio in react-native

为君一笑 提交于 2021-01-01 09:25:10
问题 This bounty has ended . Answers to this question are eligible for a +500 reputation bounty. Bounty grace period ends in 20 hours . kojow7 wants to draw more attention to this question. Crashing when audio is played: I am creating an app with several different screens of audio clips. We are testing out the app on iPhone/iPad using Testflight and are getting intermittent crashes when audio clips are played. There seems to be nothing wrong with the audio clips themselves as most of the time they

How to set a Mixer's volume to a slider's volume in Unity?

蓝咒 提交于 2020-12-31 06:49:38
问题 I'm trying to make some audio settings. Here is my script: public AudioMixer masterMixer; public float masterLvl; public float musicLvl; public float sfxLvl; public void SetMasterVolume () { masterLvl = masterVolumeSlider.value; masterMixer.SetFloat("masterVol", masterLvl); } public void SetMusicVolume() { musicLvl = musicVolumeSlider.value; masterMixer.SetFloat("musicVol", musicLvl); } public void SetSfxVolume() { sfxLvl = sfxVolumeSlider.value; masterMixer.SetFloat("sfxVol", sfxLvl); } It

How to set a Mixer's volume to a slider's volume in Unity?

那年仲夏 提交于 2020-12-31 06:48:20
问题 I'm trying to make some audio settings. Here is my script: public AudioMixer masterMixer; public float masterLvl; public float musicLvl; public float sfxLvl; public void SetMasterVolume () { masterLvl = masterVolumeSlider.value; masterMixer.SetFloat("masterVol", masterLvl); } public void SetMusicVolume() { musicLvl = musicVolumeSlider.value; masterMixer.SetFloat("musicVol", musicLvl); } public void SetSfxVolume() { sfxLvl = sfxVolumeSlider.value; masterMixer.SetFloat("sfxVol", sfxLvl); } It

pipe sox play command to stdout

倖福魔咒の 提交于 2020-12-31 06:12:45
问题 So I'm currently trying to stream my microphone input from my raspberry pi (rasbian) to some sort of network stream in order to receive it later on my phone. In order to do this I use arecord -D plughw:1,0 -f dat -r 44100 | top pipe the soundstream from my usb-microphone to stdout which works fine as far as I can see but I needed it to be a bit louder so I can understand people standing far away from it . So i piped it to the sox play command like this : arecord -D plughw:1,0 -f dat -r 44100|

Browser denying javascript play()

杀马特。学长 韩版系。学妹 提交于 2020-12-29 08:52:07
问题 I have a page with an input field for scanning products. When a barcode is scanned or a SKU is typed into the field, an ajax request is made and the application plays either a success or an error sound depending on the response using HTMLMediaElement.play(). sounds.error.play(); This was working fine a while ago but now I get this error: ⚠ Autoplay is only allowed when approved by the user, the site is activated by the user, or media is muted. Followed by: NotAllowedError: The play method is