Update app.py
Browse files
app.py
CHANGED
@@ -132,10 +132,6 @@ def infer_img2img(prompt, audio_path, desired_strength, progress=gr.Progress(tra
|
|
132 |
# Apply fix only if the spectrogram mean is too low
|
133 |
if spec_mean_before < -5.0:
|
134 |
print(f"⚠️ Spectrogram too low (Mean: {spec_mean_before}).")
|
135 |
-
def pitch_shift_spectrogram(spec, sr=16000, n_steps=4):
|
136 |
-
spec = librosa.effects.pitch_shift(spec, sr, n_steps=n_steps)
|
137 |
-
return spec
|
138 |
-
spec = pitch_shift_spectrogram(spec, sr=16000, n_steps=4)
|
139 |
else:
|
140 |
print(f"✅ Spectrogram looks normal (Mean: {spec_mean_before}). No boost needed.")
|
141 |
|
|
|
132 |
# Apply fix only if the spectrogram mean is too low
|
133 |
if spec_mean_before < -5.0:
|
134 |
print(f"⚠️ Spectrogram too low (Mean: {spec_mean_before}).")
|
|
|
|
|
|
|
|
|
135 |
else:
|
136 |
print(f"✅ Spectrogram looks normal (Mean: {spec_mean_before}). No boost needed.")
|
137 |
|