노현욱

docs : adding docs

Showing 62 changed files with 30 additions and 1 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -8,7 +8,7 @@ from scipy.fft import fft, fftfreq ...@@ -8,7 +8,7 @@ from scipy.fft import fft, fftfreq
8 import math 8 import math
9 import time 9 import time
10 10
11 -TARGET = "decibel" # frequency, decibel 11 +TARGET = "frequency" # frequency, decibel
12 EFFECT = "pitch_shift" # pitch_shift, low_filter 12 EFFECT = "pitch_shift" # pitch_shift, low_filter
13 13
14 RATE = 44100 14 RATE = 44100
...@@ -94,6 +94,29 @@ class Effector: ...@@ -94,6 +94,29 @@ class Effector:
94 "low_filter": self.low_filtered_sounds 94 "low_filter": self.low_filtered_sounds
95 } 95 }
96 96
97 + # save all augumented_sound to folder
98 + for i in range(EFFECT_LEVEL):
99 + pydub.AudioSegment(
100 + data=self.augumented_sound["echo"][i].tobytes(),
101 + sample_width=2,
102 + frame_rate=RATE,
103 + channels=1
104 + ).export("./augumented_sound/echo/echo_{}.wav".format(i), format="wav")
105 + for i in range(EFFECT_LEVEL):
106 + pydub.AudioSegment(
107 + data=self.augumented_sound["pitch_shift"][i].tobytes(),
108 + sample_width=2,
109 + frame_rate=RATE,
110 + channels=1
111 + ).export("./augumented_sound/pitch_shift/pitch_shift_{}.wav".format(i), format="wav")
112 + for i in range(EFFECT_LEVEL):
113 + pydub.AudioSegment(
114 + data=self.augumented_sound["low_filter"][i].tobytes(),
115 + sample_width=2,
116 + frame_rate=RATE,
117 + channels=1
118 + ).export("./augumented_sound/low_filter/low_filter_{}.wav".format(i), format="wav")
119 +
97 def change_target(self, target): 120 def change_target(self, target):
98 if target not in ["decibel", "frequency", "amplitude"]: 121 if target not in ["decibel", "frequency", "amplitude"]:
99 raise Exception("Invalid target") 122 raise Exception("Invalid target")
...@@ -246,3 +269,9 @@ while stream.is_active(): ...@@ -246,3 +269,9 @@ while stream.is_active():
246 269
247 stream.close() 270 stream.close()
248 pa.terminate() 271 pa.terminate()
272 +
273 +
274 +# 실시간 face-chat
275 +# 실시간 변형을 조금더 강조하면 좋을듯 합니다.
276 +# 추가적인 사용 예제나 스토리를 조금더 넣으면 좋을듯.
277 +# 실시간으로
...\ No newline at end of file ...\ No newline at end of file
......