catiR
commited on
Commit
·
7066115
1
Parent(s):
13fa91a
run clustering
Browse files- scripts/clusterprosody.py +2 -0
- scripts/runSQ.py +1 -7
scripts/clusterprosody.py
CHANGED
@@ -451,6 +451,8 @@ def plot_pitch_tts(speech_data,tts_data, tts_align,words,seg_aligns,cluster_id,
|
|
451 |
|
452 |
plt.scatter(pitch_xvals, pitches, color=colors[i], label=f"Speaker {spk}")
|
453 |
i += 1
|
|
|
|
|
454 |
|
455 |
tpitches = [p for p,e in tts_data]
|
456 |
t_xvals = [x*0.005 for x in range(len(tpitches))]
|
|
|
451 |
|
452 |
plt.scatter(pitch_xvals, pitches, color=colors[i], label=f"Speaker {spk}")
|
453 |
i += 1
|
454 |
+
if i >= len(colors):
|
455 |
+
i=0
|
456 |
|
457 |
tpitches = [p for p,e in tts_data]
|
458 |
t_xvals = [x*0.005 for x in range(len(tpitches))]
|
scripts/runSQ.py
CHANGED
@@ -3,7 +3,6 @@ from scripts.ctcalign import aligner, wav16m
|
|
3 |
from scripts.tapi import tiro
|
4 |
from scripts.reaper2pass import estimate_pitch, save_pitch
|
5 |
import scripts.clusterprosody as cl
|
6 |
-
import subprocess
|
7 |
|
8 |
|
9 |
|
@@ -194,17 +193,12 @@ def f0_tts(sentence, voices, ttsdir, reaper_path = "REAPER/build/reaper"):
|
|
194 |
if not os.path.exists(fpath):
|
195 |
no_f0.append(v)
|
196 |
|
197 |
-
|
198 |
-
print('LS::', ttt.stdout)
|
199 |
-
|
200 |
if no_f0:
|
201 |
print(f'Need to estimate pitch for {len(no_f0)} voices')
|
202 |
for v in voices:
|
203 |
wav_path = f'{ttsdir}{dpath}/{v}.wav'
|
204 |
fpath = f'{ttsdir}{dpath}/{v}.f0'
|
205 |
-
|
206 |
-
print(wav_path)
|
207 |
-
print(fpath)
|
208 |
|
209 |
f0_data = estimate_pitch(wav_path, reaper_path)
|
210 |
save_pitch(f0_data,fpath)
|
|
|
3 |
from scripts.tapi import tiro
|
4 |
from scripts.reaper2pass import estimate_pitch, save_pitch
|
5 |
import scripts.clusterprosody as cl
|
|
|
6 |
|
7 |
|
8 |
|
|
|
193 |
if not os.path.exists(fpath):
|
194 |
no_f0.append(v)
|
195 |
|
196 |
+
|
|
|
|
|
197 |
if no_f0:
|
198 |
print(f'Need to estimate pitch for {len(no_f0)} voices')
|
199 |
for v in voices:
|
200 |
wav_path = f'{ttsdir}{dpath}/{v}.wav'
|
201 |
fpath = f'{ttsdir}{dpath}/{v}.f0'
|
|
|
|
|
|
|
202 |
|
203 |
f0_data = estimate_pitch(wav_path, reaper_path)
|
204 |
save_pitch(f0_data,fpath)
|