catiR commited on
Commit
ce4ae2c
·
1 Parent(s): 2dfee05

run clustering

Browse files
Files changed (2) hide show
  1. app.py +1 -2
  2. scripts/runSQ.py +1 -0
app.py CHANGED
@@ -40,7 +40,6 @@ def f1(voices, sent, indices):
40
  def label_indices(sentence):
41
  sentence = scripts.runSQ.snorm(sentence)
42
  sentence = sentence.split(' ')
43
- color_map = {i+1:"#dcfce7" for i in range(len(sentence))}
44
  labelled = [(f'{word} {i+1} ', i+1) for i, word in enumerate(sentence)]
45
  return labelled
46
 
@@ -62,7 +61,7 @@ with bl:
62
  temp_sentmenu = gr.Dropdown(temp_sentences, label="Sentence")
63
  #voiceselect = gr.CheckboxGroup(voices, label="TTS voice",value='Alfur')
64
 
65
- marked_sentence = gr.HighlightedText(interactive=False)
66
 
67
  with gr.Row():
68
  spanselect = gr.Textbox(value='1-3',info='Enter the index of the word(s) to analyse. It can be a single word: 4 or a span of words separated by a dash: 2-3')
 
40
  def label_indices(sentence):
41
  sentence = scripts.runSQ.snorm(sentence)
42
  sentence = sentence.split(' ')
 
43
  labelled = [(f'{word} {i+1} ', i+1) for i, word in enumerate(sentence)]
44
  return labelled
45
 
 
61
  temp_sentmenu = gr.Dropdown(temp_sentences, label="Sentence")
62
  #voiceselect = gr.CheckboxGroup(voices, label="TTS voice",value='Alfur')
63
 
64
+ marked_sentence = gr.HighlightedText(interactive=False,color_map = {i:"#dcfce7" for i in range(333)})
65
 
66
  with gr.Row():
67
  spanselect = gr.Textbox(value='1-3',info='Enter the index of the word(s) to analyse. It can be a single word: 4 or a span of words separated by a dash: 2-3')
scripts/runSQ.py CHANGED
@@ -3,6 +3,7 @@ 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
 
7
 
8
 
 
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