cati commited on
Commit
b8172f2
1 Parent(s): 758baf1
Files changed (2) hide show
  1. app.py +6 -0
  2. ctcalign.py +0 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import vowel_length
 
3
 
4
 
5
  meta_tsv = ['data/set1.tsv','data/set2.tsv']
@@ -17,6 +18,9 @@ def manager(word,group,aligner,side):
17
  print(side)
18
  return fig
19
 
 
 
 
20
 
21
  bl = gr.Blocks()
22
  with bl:
@@ -78,6 +82,8 @@ All phoneme durations are measured automatically with no human correction. The p
78
  with gr.Column():
79
  output_box = gr.Textbox(label="Forced alignment output")
80
 
 
 
81
 
82
 
83
  if __name__ == "__main__":
 
1
  import gradio as gr
2
  import vowel_length
3
+ import ctcalign
4
 
5
 
6
  meta_tsv = ['data/set1.tsv','data/set2.tsv']
 
18
  print(side)
19
  return fig
20
 
21
+ def aligning(transcript, audio, language):
22
+ formatted_output = ctcalign.
23
+
24
 
25
  bl = gr.Blocks()
26
  with bl:
 
82
  with gr.Column():
83
  output_box = gr.Textbox(label="Forced alignment output")
84
 
85
+ al_btn.click(aligning, [transcript_boxx, audio_file, alangmenu], output_box)
86
+
87
 
88
 
89
  if __name__ == "__main__":
ctcalign.py CHANGED
@@ -23,7 +23,6 @@ is_all_labels = tuple(is_labels_dict.keys())
23
  is_blank_id = is_labels_dict[is_model_blank_token]
24
 
25
 
26
-
27
  fo_MODEL_PATH="carlosdanielhernandezmena/wav2vec2-large-xlsr-53-faroese-100h"
28
  fo_model_blank_token = '[PAD]' # important to know for CTC decoding
29
  fo_model_word_separator = '|'
 
23
  is_blank_id = is_labels_dict[is_model_blank_token]
24
 
25
 
 
26
  fo_MODEL_PATH="carlosdanielhernandezmena/wav2vec2-large-xlsr-53-faroese-100h"
27
  fo_model_blank_token = '[PAD]' # important to know for CTC decoding
28
  fo_model_word_separator = '|'