Update graph.py
Browse files
graph.py
CHANGED
|
@@ -26,8 +26,12 @@ def normalise_transcript(xcp):
|
|
| 26 |
|
| 27 |
|
| 28 |
def get_pitch_tracks(wav_path):
|
|
|
|
| 29 |
f0_data = subprocess.run(["REAPER/build/reaper", "-i", wav_path, '-f', '/dev/stdout', '-a'],capture_output=True).stdout
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
#print(f0_data)
|
| 32 |
f0_data = [l.split(' ') for l in f0_data[:-1]] # the last line is other info
|
| 33 |
f0_data = [ [float(t), float(f)] for t,v,f in f0_data if v=='1']
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def get_pitch_tracks(wav_path):
|
| 29 |
+
print('FILE PATH:', wav_path)
|
| 30 |
f0_data = subprocess.run(["REAPER/build/reaper", "-i", wav_path, '-f', '/dev/stdout', '-a'],capture_output=True).stdout
|
| 31 |
+
print('PLAIN:',f0_data)
|
| 32 |
+
f0_data = f0_data.decode()
|
| 33 |
+
print('DECODE-PITCH:',f0_data)
|
| 34 |
+
f0_data = f0_data.split('EST_Header_End\n')[1].splitlines()
|
| 35 |
#print(f0_data)
|
| 36 |
f0_data = [l.split(' ') for l in f0_data[:-1]] # the last line is other info
|
| 37 |
f0_data = [ [float(t), float(f)] for t,v,f in f0_data if v=='1']
|