Update app.py
Browse files
app.py
CHANGED
|
@@ -22,12 +22,12 @@ st.markdown("""
|
|
| 22 |
def separate_vocals(input_file):
|
| 23 |
os.system(f"spleeter separate -p spleeter:2stems -o output {input_file}")
|
| 24 |
base = os.path.splitext(os.path.basename(input_file))[0]
|
| 25 |
-
vocal_path = f"output/('
|
| 26 |
accompaniment_path = f"output/accompaniment.wav"
|
| 27 |
return vocal_path, accompaniment_path
|
| 28 |
|
| 29 |
def autotune(vocal_file, target_key="C"):
|
| 30 |
-
y, sr = librosa.load('
|
| 31 |
pitches, magnitudes = librosa.piptrack(y=y, sr=sr)
|
| 32 |
pitch_series = [pitches[magnitudes[:, i].argmax(), i] for i in range(pitches.shape[1]) if pitches[magnitudes[:, i].argmax(), i] > 0]
|
| 33 |
semitones = librosa.hz_to_midi(pitch_series)
|
|
|
|
| 22 |
def separate_vocals(input_file):
|
| 23 |
os.system(f"spleeter separate -p spleeter:2stems -o output {input_file}")
|
| 24 |
base = os.path.splitext(os.path.basename(input_file))[0]
|
| 25 |
+
vocal_path = f"output/('my_vocals.wav')"
|
| 26 |
accompaniment_path = f"output/accompaniment.wav"
|
| 27 |
return vocal_path, accompaniment_path
|
| 28 |
|
| 29 |
def autotune(vocal_file, target_key="C"):
|
| 30 |
+
y, sr = librosa.load('my_vocals.wav')
|
| 31 |
pitches, magnitudes = librosa.piptrack(y=y, sr=sr)
|
| 32 |
pitch_series = [pitches[magnitudes[:, i].argmax(), i] for i in range(pitches.shape[1]) if pitches[magnitudes[:, i].argmax(), i] > 0]
|
| 33 |
semitones = librosa.hz_to_midi(pitch_series)
|