simple vae style model

This commit is contained in:
k
2025-11-12 12:10:52 -05:00
parent df4cdc8e25
commit 64e66260ec
4 changed files with 33 additions and 46 deletions

View File

@@ -22,15 +22,9 @@ def process_file(file_path):
end = start_pos + size
if end <= sample_len:
chunk = y[start_pos:end]
chunk = librosa.feature.melspectrogram(y=chunk, sr=SAMPLE_RATE)
chunk = ((librosa.amplitude_to_db(chunk,ref=np.max)+80)/80)
#chunk = librosa.feature.melspectrogram(y=chunk,sr=SAMPLE_RATE)
#chunk = ((librosa.amplitude_to_db(chunk,ref=np.max)+40)/40)
file_chunks.append(chunk)
return file_chunks
#@mlflow.trace
def load():
"""
Load 10 second chunks of songs.
@@ -44,9 +38,6 @@ def load():
audio.extend(l)
return audio
##DEP
def audio_split(audio):
"""
Split 10 seconds of audio to 2 5 second clips