Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing but available

Kyubyong Park Kyubyong

🎯
Focusing but available
View GitHub Profile
@Kyubyong
Kyubyong / numpy_array_to_wav_file.py
Created Jun 21, 2019 — forked from akey7/numpy_array_to_wav_file.py
Generate a .wav sound file from a NumPy array.
View numpy_array_to_wav_file.py
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