catiR commited on
Commit
b5d5d43
·
1 Parent(s): 1a2236e
Files changed (1) hide show
  1. scripts/clusterprosody.py +3 -2
scripts/clusterprosody.py CHANGED
@@ -60,6 +60,7 @@ def get_pitches(start_time, end_time, fpath):
60
  # find the std of all pitches in the whole sentence
61
  std = np.std([line[1] for line in lines if line[2] == 1])
62
 
 
63
 
64
  for line in lines:
65
  time, pitch, is_pitch = line
@@ -68,8 +69,8 @@ def get_pitches(start_time, end_time, fpath):
68
  if is_pitch == 1:
69
  pitches.append(z_score(pitch, mean, std))
70
  else:
71
- #pitches.append(z_score(fifth_percentile, mean, std))
72
- pitches.append(-0.99)
73
 
74
  return pitches
75
 
 
60
  # find the std of all pitches in the whole sentence
61
  std = np.std([line[1] for line in lines if line[2] == 1])
62
 
63
+ low = min([p for t,p,v in lines if line[2] == 1]) - 1
64
 
65
  for line in lines:
66
  time, pitch, is_pitch = line
 
69
  if is_pitch == 1:
70
  pitches.append(z_score(pitch, mean, std))
71
  else:
72
+ pitches.append(z_score(low, mean, std))
73
+ #pitches.append(-0.99)
74
 
75
  return pitches
76