Created
April 27, 2015 17:39
-
-
Save stevetjoa/524828fc385873468053 to your computer and use it in GitHub Desktop.
Generate WAV files of pure tones.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
import scipy | |
fs = 8000.0 # sample rate | |
T = 5.0 # signal duration | |
N = fs*T # total number of samples | |
t = scipy.arange(N)/fs # time vector | |
for f0 in range(415, 467): | |
x = 0.1*scipy.sin(2*scipy.pi*f0*t) | |
librosa.output.write_wav('%d.wav' % f0, x, fs, normalize=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment