Skip to content

Instantly share code, notes, and snippets.

View Kyubyong's full-sized avatar
🎯
Focusing but available

Kyubyong Park Kyubyong

🎯
Focusing but available
View GitHub Profile
@Kyubyong
Kyubyong / numpy_array_to_wav_file.py
Created June 21, 2019 01:11 — forked from akey7/numpy_array_to_wav_file.py
Generate a .wav sound file from a NumPy array.
import numpy as np
from scipy.io.wavfile import write
# Samples per second
sps = 44100
# Frequency / pitch of the sine wave
freq_hz = 440.0
# Duration