박진형

python file

...@@ -4,5 +4,5 @@ import time ...@@ -4,5 +4,5 @@ import time
4 pygame.mixer.init() 4 pygame.mixer.init()
5 test = pygame.mixer.Sound("test1.wav") 5 test = pygame.mixer.Sound("test1.wav")
6 while True: 6 while True:
7 -bang.play() 7 + test.play()
8 time.sleep(2.0) 8 time.sleep(2.0)
......
1 +import soundfile as sf
2 +import sounddevice as sd
3 +
4 +weight = 1.7
5 +
6 +data, fs = sf.read('test1.wav')
7 +sd.play(data * weight, fs, blocking=True)