Posted

0 replies · 0 reposts · 0 likes

sample out Brain Effective measures with audio High_Low Frequency.... #sudo apt install python-pyaudio #low_HIGH_FREQUENCY #_#FreeNode_@shark import pyaudio import numpy as np p = pyaudio.PyAudio() volume = 20.5 # range [0.0, 1.0] fs = 100000 # sampling rate, Hz, must be integer duration = 50.0 # in seconds, may be float f = 440.0 # sine frequency, Hz, may be float # generate samples, note conversion to float32 array samples = (np.sin(2*np.pi*np.arange(fs*duration)*f/fs)).astype(np.float32) # for paFloat32 sample values must be in range [-1.0, 1.0] stream = http://p.open(format=pyaudio.paFloat32, channels=1, rate=fs, output=True) # play. May repeat with different volume values (if done interactively) stream.write(volume*samples) stream.stop_stream() stream.close() p.terminate()

View this post on Gab