Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

librosa from array to audio

import numpy as np
import soundfile as sf
rate = 44100
data = np.random.uniform(-1, 1, size=(rate * 10, 2))
# Write out audio as:
# 24bit PCM WAV
sf.write('stereo_file.wav', data, rate, subtype='PCM_24')
# 24bit Flac
sf.write('stereo_file.flac', data, rate, format='flac', subtype='PCM_24')
# 16bit OGG
sf.write('stereo_file.ogg', data, rate, format='ogg', subtype='vorbis')
Comment

PREVIOUS NEXT
Code Example
Python :: python child class init 
Python :: Python - How To Pad String With Spaces 
Python :: Reset Index & Retain Old Index as Column in pandas 
Python :: matplotlib keyboard event 
Python :: myshop flower notimplementederror 
Python :: opencv find image contained within an image 
Python :: python aus liste tuple machen 
Python :: convert from R to python 
Python :: python string: escaping characters 
Python :: how to set default value in many2one 
Python :: imagefont cannot open resource 
Python :: pandas math operation from string 
Python :: arcpy save map layer to feature class 
Python :: python zeromq timeout 
Python :: explained_variance_ratio kernel pca 
Python :: how to deploy to shinyapps.io 
Python :: #finding the similarity among two sets and 1 if statement 
Python :: pytorch get intersection between two masks 
Python :: print poo 
Python :: list example in python 
Python :: python code to open facebook and login with username and password 
Python :: auto clipping path image using python 
Python :: image.get p5 
Python :: geopandas change dtype of a columns 
Python :: onlinecourses.osppro.com 
Python :: selecting letters in a row 
Python :: resizing django embed player 
Python :: pyhton how to chnge colour of graphs 
Python :: pandas condense dataframe by summing according to ID 
Python :: generate fibonacci series in python 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =