Skip to content

Instantly share code, notes, and snippets.

@Vassago1911
Last active January 13, 2023 01:41
Show Gist options
  • Save Vassago1911/d800b5b735747eefa3321b4730fb3ec4 to your computer and use it in GitHub Desktop.
Save Vassago1911/d800b5b735747eefa3321b4730fb3ec4 to your computer and use it in GitHub Desktop.
play a one-second 440 Hz tone
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