changed back to [0,1] normal

This commit is contained in:
k
2025-10-15 02:19:33 -04:00
parent 1a66f31048
commit 78ece6996f
2 changed files with 13 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ import mlflow
SAMPLE_RATE = 22050
def logSpec(spec,e):
#spec = ((spec*40)-40)
spec = ((spec*80)-80)
#spec = librosa.db_to_amplitude(spec)
plt.figure(figsize=(10, 4))
librosa.display.specshow(spec, sr=SAMPLE_RATE,
@@ -15,7 +15,7 @@ def logSpec(spec,e):
plt.colorbar(format='%+2.0f dB')
plt.title('Mel spectrogram')
mlflow.log_figure(plt.gcf(), f"output_{e}.png")
#plt.close()
plt.close()
def playSpec(spec):
S = librosa.feature.inverse.mel_to_stft(spec, sr=SAMPLE_RATE)