Last active
January 13, 2023 01:41
-
-
Save Vassago1911/d800b5b735747eefa3321b4730fb3ec4 to your computer and use it in GitHub Desktop.
play a one-second 440 Hz tone
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 numpy as np; import sounddevice as sd; fs = 44100; t = np.linspace(0,1,fs,endpoint=False); data = np.sin(2*np.pi*440*t); sd.play(data,fs, blocking=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment