Update graph.py
Browse files
graph.py
CHANGED
|
@@ -34,8 +34,10 @@ def get_pitch_tracks(sound_path):
|
|
| 34 |
|
| 35 |
else:
|
| 36 |
aud_data = AudioSegment.from_file(sound_path, orig_ftype)
|
| 37 |
-
curdir = subprocess.run(["pwd"], capture_output=True, text=True)
|
| 38 |
-
|
|
|
|
|
|
|
| 39 |
aud_data.export(tmp_path, format="wav")
|
| 40 |
wav_path = tmp_path
|
| 41 |
|
|
|
|
| 34 |
|
| 35 |
else:
|
| 36 |
aud_data = AudioSegment.from_file(sound_path, orig_ftype)
|
| 37 |
+
curdir = subprocess.run(["pwd"], capture_output=True, text=True)
|
| 38 |
+
curdir = curdir.stdout.splitlines()[0]
|
| 39 |
+
fname = sound_path.split('/')[-1].replace(orig_ftype,'')
|
| 40 |
+
tmp_path = f'{curdir}/{fname}_tmp.wav'
|
| 41 |
aud_data.export(tmp_path, format="wav")
|
| 42 |
wav_path = tmp_path
|
| 43 |
|