int24 - 24 bit integral datatype

is there a 24Bit primitive integral datatype in C++? If there is none, would it be possible to create a class int24 (, uint24 ) ? it's purpose could be: manipulating soundfiles in 24 bit...

What does a audio frame contain?

I'm doing some research on how to compare sound files(wave). Basically, I want to compare stored soundfiles (wav) with sound from a microphone. So in the end I would like to pre-store some voice...

Sound in java - Game freezes when playing sound

Whenever I play a sound in my game, the thread freezes then continues after the sound has finished playing. Code for the sound engine: package com.kgt.platformer; import java.io.File; import...

Implementing libPD (Pure Data wrapper) in Python

I've created a simple text-based escape the room game in Python, with the intention of embedding a Pure Data patch (via libPd) in order to playback a different soundfile (this will later be...

SKAction playsoundfilenamed fails to load sound

No matter what wav file I tried to play in an project, I keep getting the same error. The error states: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Resource...

Playing wav file with portaudio and sndfile

I have written a function to play a sound file using portaudio and sndfile. Unfortunately the sound quality is terrible. The sound is more like a hiss. The following is the source code of the...

How to add echo effect to wav file in android?

I have been struggling for a while now on how to modify a wav file by adding echo effect on it; My app does pitch sifting, speed and volume, but I can't add effects. I'm a total begginer at audio...

Loading a .WAV file for OpenAL

I am trying to load .WAV files to be played with OpenAL. I am following an example I found on the internet, but it is acting strangely. Here is the code: struct RIFF_Header { char chunkID[4]; ...

Firebase - Invalid JSON data or key values. Key values can’t contain $ # [ ] / or

I'm trying to import my JSON file into my Firebase but it keeps giving me this error. I don't know why this JSON file isn't allowed to be imported into since JSONLint says it's a valid JSON...

How to create factory-boy factories for Django models with the same foreign key

I keep running into issues with my factories when two or more models have a common foreign key, and each one creates their own object when they should have the same. To illustrate the problem,...

How do you convert data from float64 to int16 in python 3?

Currently I am using soundfile to read audio data from a wav file like so: import soundfile raw_data, sample_rate = soundfile.read(filename) Whilst I realise that you can select dtype=int16, I...

Can't import soundfile

I'm using Anaconda and I'm trying to import soundfile/pysoundfile. I installed the package by running conda install -c conda-forge pysoundfile and I think it succeeded because when I run conda...

Pitching (Higher/Lower) sound with react native sound

I'm trying to change/manipulate a recorded sound. My goal is to make the sound sound higher or lower (pitch it), given to a specific value. I'm currently using react-native-sound: const soundfile ...

PortAudio library not found by sounddevice during runtime [WINDOWS]

PROBLEM: Similar to this question for Linux, I'm running into a OSError: PortAudio library not found after I package my app with pyinstaller and execute the .exe. (Note, I do not encounter any...

How to set a file as a ringtone for Android 10?

I used to use following code to save a raw sound file to external storage and set it as ringtone. But things seems to change in android 10. Can you help me or show me some guideline how to update...

Pysoundfile library not importing

I'm new to Python (I installed the Anaconda distribution a couple weeks ago on my windows 10 machine) and am having trouble getting the pysoundfile library to import from the Spyder ipython...

librosa.util.exceptions.ParameterError: Invalid shape for monophonic audio: ndim=2, shape=(172972, 2)

Please somebody help me to solve this I was following this tutorial: https://data-flair.training/blogs/python-mini-project-speech-emotion-recognition/ And used their dataset which they took from...

How to get audio (Mic) input working on Android with python/kivy

EDIT from a visitor: The current consensus around this situation appears to be that Kivy does not support the microphone at this time, and we are begging people to help port the "audiostream"...

PyTorch LSTM: RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 1219 and 440 in dimension 1

I have a basic PyTorch LSTM: import torch.nn as nn import torch.nn.functional as F class BaselineLSTM(nn.Module): def __init__(self): super(BaselineLSTM, self).__init__() ...

How can I remove distortion introduced by librosa griffin lim?

I'm doing: import librosa D = librosa.stft(samples, n_fft=nperseg, hop_length=overlap, win_length=nperseg, window=scipy.signal.windows.hamming) spect, _ =...

Attempting to use python-sounddevice lower level "stream" classes to play and record with NumPy arrays giving errors

I'm trying to split the audio file into a given number of NumPy blocks and put those into RAM to play, just like play_a_very_long_sound_file. Unfortunately, I believe my knowledge of NumPy arrays...

Librosa cannot load from BytesIO

I am currently trying to create a large dataset for deep learning consisting of a lot of compressed mp3 files stored together so I dont have 100k files that I have to load individually. x =...

Getting BadRequestException in AWS Transcribe realtime

I am getting this response from amazon streaming api. Can anybody please help me on it what thing I am doing wrong over...

AWS lambda container not picking system dependency

I am Building a lambda to denoise audio files. Python soundfile uses libsndfile system dependency which I am installing via apt in my DockerFile. The container is running fine locally but when I...

Redirect audio output to input stream - python-sounddevice

I'm using the sounddevice library for Python. So far I was able to do some basic stuff with audio files through this library, like playing back a WAV format file using this code from one of the...

Convert audio in binary into Wav format, Python

i try to read audio file from Google storage bucket(GCS), but i can read the audio in binary format, it is possible to convert from binary into wav format? since i need to do audio analysis where...

tensorflow dependencies continuously gives me errors in colab during installation of deepspeech environment

when I run the following command on Google Colab !pip3 install --upgrade pip==20.0.2 wheel==0.34.2 setuptools==46.1.3 !pip3 install --upgrade --force-reinstall -e . Got an error ERROR: pip's...

AWS Lambda Docker image with librosa and ffmpeg

I'm using this Dockerfile to build an image for AWS Lambda having librosa and ffmpeg with python3.7: ARG FUNCTION_DIR="/function" FROM python:3.7.4-slim-buster as build-image # librosa and ffmpeg...

How to set a audio file as a ringtone in Android 11?

I use this below code but is working only down to android 10. This is how I save the audio file. File ringtoneuri =...

Python's SoundFile: soundfile.write and clipping

Suppose I read a WAV file using Python's soundfile, import soundfile x, fs = soundfile.read("test.wav") The array x is in float32 and max(x) = 1, min(x) = -1. That is: each sample in x is a...