clr commited on
Commit
bd41e11
·
1 Parent(s): e8949c5

Update graph.py

Browse files
Files changed (1) hide show
  1. graph.py +4 -2
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).stdout
38
- tmp_path = f'{curdir}/tmp.wav'
 
 
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