PyAudio
https://people.csail.mit.edu/hubert/pyaudio/
import pyaudiop = pyaudio.PyAudio()stream = p.open(format=pyaudio.paFloat32, channels=1, rate=44100, output=True)data, addr = sock.recvfrom(1024) # buffer size is 1024 byteswhile data != '': stream.write(data) data, addr = sock.recvfrom(1024) # buffer size is 1024 bytesstream.stop_stream()stream.close()p.terminate()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)