catiR commited on
Commit
c5c9abd
1 Parent(s): 366ecce

force align tts, add voices

Browse files
Files changed (2) hide show
  1. requirements.txt +0 -1
  2. scripts/runSQ.py +3 -3
requirements.txt CHANGED
@@ -5,6 +5,5 @@ librosa
5
  scipy
6
  dtw-python
7
  scikit-learn_extra
8
- secrets
9
  pydub
10
 
 
5
  scipy
6
  dtw-python
7
  scikit-learn_extra
 
8
  pydub
9
 
scripts/runSQ.py CHANGED
@@ -1,4 +1,4 @@
1
- import os, unicodedata, string, secrets
2
  from scripts.ctcalign import aligner, wav16m
3
  from scripts.tapi import tiro
4
  from scripts.reaper2pass import estimate_pitch, save_pitch
@@ -202,9 +202,9 @@ def setup_tts_sent(sentence,ttsdir,meta_path = 'tts_meta.tsv'):
202
 
203
  if sentence not in tts_meta.keys():
204
  sent_id = sentence.replace(' ','_')[:33]
205
- rand_id = ''.join(secrets.choice(string.ascii_lowercase + string.digits) for i in range(6))
206
  while f'{sent_id}_{rand_id}' in tts_meta.values():
207
- rand_id = ''.join(secrets.choice(string.ascii_lowercase + string.digits) for i in range(6))
208
  sent_id = f'{sent_id}_{rand_id}'
209
 
210
  handle.write(f'{sent_id}\t{sentence}\n')
 
1
+ import os, unicodedata, string, random
2
  from scripts.ctcalign import aligner, wav16m
3
  from scripts.tapi import tiro
4
  from scripts.reaper2pass import estimate_pitch, save_pitch
 
202
 
203
  if sentence not in tts_meta.keys():
204
  sent_id = sentence.replace(' ','_')[:33]
205
+ rand_id = ''.join(random.choices(string.ascii_uppercase + string.digits, k=6))
206
  while f'{sent_id}_{rand_id}' in tts_meta.values():
207
+ rand_id = ''.join(random.choices(string.ascii_uppercase + string.digits, k=6))
208
  sent_id = f'{sent_id}_{rand_id}'
209
 
210
  handle.write(f'{sent_id}\t{sentence}\n')