catiR commited on
Commit
cc7c120
·
1 Parent(s): d6846cc
Files changed (1) hide show
  1. scripts/runSQ.py +11 -6
scripts/runSQ.py CHANGED
@@ -14,14 +14,14 @@ def run(sentence, voices):
14
  # On tts.tiro.is speech marks are only available
15
  # for the voices: Alfur, Dilja, Karl and Dora.
16
 
17
- corpus_meta = '../human_data/SQL1adult_metadata.tsv'
18
- speech_dir = '../human_data/audio/squeries/'
19
- speech_aligns = '../human_data/aligns/squeries/'
20
- speech_f0 = '../human_data/f0/squeries/'
21
  align_model_path ="carlosdanielhernandezmena/wav2vec2-large-xlsr-53-icelandic-ep10-1000h"
22
 
23
- tts_dir = '../tts_data/'
24
-
25
 
26
  norm_sentence = snorm(sentence)
27
 
@@ -82,6 +82,9 @@ def align_human(meta,align_dir,speech_dir,model_path):
82
 
83
  if no_align:
84
  print(f'Need to run alignment for {len(no_align)} files')
 
 
 
85
  caligner = aligner(model_path,model_word_sep,model_blank_tk)
86
  for rec in no_align:
87
  wav_path = f'{speech_dir}{rec[1]}/{rec[2]}'
@@ -107,6 +110,8 @@ def f0_human(meta, f0_dir, speech_dir, reaper_path):
107
 
108
  if no_f0:
109
  print(f'Need to estimate pitch for {len(no_f0)} recordings')
 
 
110
  #TODO
111
 
112
  else:
 
14
  # On tts.tiro.is speech marks are only available
15
  # for the voices: Alfur, Dilja, Karl and Dora.
16
 
17
+ corpus_meta = '/home/user/app/human_data/SQL1adult_metadata.tsv'
18
+ speech_dir = '/home/user/app/human_data/audio/squeries/'
19
+ speech_aligns = '/home/user/app/human_data/aligns/squeries/'
20
+ speech_f0 = '/home/user/app/human_data/f0/squeries/'
21
  align_model_path ="carlosdanielhernandezmena/wav2vec2-large-xlsr-53-icelandic-ep10-1000h"
22
 
23
+ tts_dir = '/home/user/app/tts_data/'
24
+
25
 
26
  norm_sentence = snorm(sentence)
27
 
 
82
 
83
  if no_align:
84
  print(f'Need to run alignment for {len(no_align)} files')
85
+ if not os.path.exists(align_dir):
86
+ os.mkdir(align_dir)
87
+
88
  caligner = aligner(model_path,model_word_sep,model_blank_tk)
89
  for rec in no_align:
90
  wav_path = f'{speech_dir}{rec[1]}/{rec[2]}'
 
110
 
111
  if no_f0:
112
  print(f'Need to estimate pitch for {len(no_f0)} recordings')
113
+ if not os.path.exists(f0_dir):
114
+ os.mkdir(f0_dir)
115
  #TODO
116
 
117
  else: