catiR
commited on
Commit
·
7f57015
1
Parent(s):
3948240
run clustering
Browse files
scripts/clusterprosody.py
CHANGED
@@ -552,12 +552,12 @@ def plot_rmse_tts(speech_data,tts_data, tts_align,words,seg_aligns,cluster_id, v
|
|
552 |
realign = np.mean([word_times[0][2],word_times[1][1]])
|
553 |
rmse_xvals = [x - realign for x in rmse_xvals]
|
554 |
word_times = [(w,s-realign,e-realign) for w,s,e in word_times]
|
555 |
-
plt.axvline(x= 0, color="gray", linestyle='
|
556 |
|
557 |
if len(word_times)>2:
|
558 |
for i in range(1,len(word_times)-1):
|
559 |
bound_line = np.mean([word_times[i][2],word_times[i+1][1]])
|
560 |
-
plt.axvline(x=bound_line, color=colors[cc], linestyle='
|
561 |
|
562 |
plt.scatter(rmse_xvals, rmse, color=colors[cc], label=f"Speaker {spk}")
|
563 |
cc += 1
|
@@ -575,7 +575,7 @@ def plot_rmse_tts(speech_data,tts_data, tts_align,words,seg_aligns,cluster_id, v
|
|
575 |
if len(tts_align)>2:
|
576 |
for i in range(2,len(tts_align)):
|
577 |
bound_line = tts_align[i][1]
|
578 |
-
plt.axvline(x=bound_line, color="black", linestyle='
|
579 |
plt.scatter(t_xvals, trmse, color="black", label=f"TTS {voice}")
|
580 |
|
581 |
|
@@ -607,7 +607,7 @@ def plot_rmse_cluster(speech_data,words,seg_aligns,cluster_id):
|
|
607 |
realign = np.mean([word_times[0][2],word_times[1][1]])
|
608 |
rmse_xvals = [x - realign for x in rmse_xvals]
|
609 |
word_times = [(w,s-realign,e-realign) for w,s,e in word_times]
|
610 |
-
plt.axvline(x= 0, color="gray", linestyle='
|
611 |
|
612 |
if len(word_times)>2:
|
613 |
for i in range(1,len(word_times)-1):
|
|
|
552 |
realign = np.mean([word_times[0][2],word_times[1][1]])
|
553 |
rmse_xvals = [x - realign for x in rmse_xvals]
|
554 |
word_times = [(w,s-realign,e-realign) for w,s,e in word_times]
|
555 |
+
plt.axvline(x= 0, color="gray", linestyle='-', linewidth=1, label=f"{word_times[0][0]} -> {word_times[1][0]} boundary")
|
556 |
|
557 |
if len(word_times)>2:
|
558 |
for i in range(1,len(word_times)-1):
|
559 |
bound_line = np.mean([word_times[i][2],word_times[i+1][1]])
|
560 |
+
plt.axvline(x=bound_line, color=colors[cc], linestyle='-', linewidth=1, label=f"Speaker {spk} -> {word_times[i+1][0]}")
|
561 |
|
562 |
plt.scatter(rmse_xvals, rmse, color=colors[cc], label=f"Speaker {spk}")
|
563 |
cc += 1
|
|
|
575 |
if len(tts_align)>2:
|
576 |
for i in range(2,len(tts_align)):
|
577 |
bound_line = tts_align[i][1]
|
578 |
+
plt.axvline(x=bound_line, color="black", linestyle='-', linewidth=1, label=f"TTS -> {tts_align[i][0]}")
|
579 |
plt.scatter(t_xvals, trmse, color="black", label=f"TTS {voice}")
|
580 |
|
581 |
|
|
|
607 |
realign = np.mean([word_times[0][2],word_times[1][1]])
|
608 |
rmse_xvals = [x - realign for x in rmse_xvals]
|
609 |
word_times = [(w,s-realign,e-realign) for w,s,e in word_times]
|
610 |
+
plt.axvline(x= 0, color="gray", linestyle='-', linewidth=1, label=f"{word_times[0][0]} -> {word_times[1][0]} boundary")
|
611 |
|
612 |
if len(word_times)>2:
|
613 |
for i in range(1,len(word_times)-1):
|