clr commited on
Commit
b1e70cf
·
1 Parent(s): 7e57864

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import subprocess,os
3
  from datasets import load_dataset, Audio
4
  import corpora
5
- import graph
6
 
7
 
8
  import matplotlib
@@ -50,7 +50,7 @@ def load_lang(langname):
50
  return (df[:10], lang_aligner) #(df, df[:50])
51
 
52
 
53
- def f1(langname):
54
  if langname=="Icelandic":
55
  df = corpora.ds_i
56
  elif langname =="Faroese":
@@ -69,7 +69,7 @@ def f1(langname):
69
  print(ds['audio'])
70
  print(ds['normalized_text'])
71
 
72
- #return graph.align_and_graph(wav_path, transcript)
73
 
74
 
75
  bl = gr.Blocks()
@@ -91,7 +91,7 @@ with bl:
91
 
92
  pl1 = gr.Plot()
93
 
94
- btn1.click(f1, [lloadr], pl1)
95
 
96
 
97
 
@@ -104,8 +104,8 @@ with bl:
104
  # ABOUT
105
  This is a work-in-progress demo.
106
 
107
- Icelandic uses the (samromur-asr)[https://huggingface.co/datasets/language-and-voice-lab/samromur_asr] corpus
108
- and Faroese uses (ravnursson-asr)[https://huggingface.co/datasets/carlosdanielhernandezmena/ravnursson_asr].
109
 
110
  After you select a language, a few example sentences from the corpus are displayed.
111
 
 
2
  import subprocess,os
3
  from datasets import load_dataset, Audio
4
  import corpora
5
+ import ctcalign,graph
6
 
7
 
8
  import matplotlib
 
50
  return (df[:10], lang_aligner) #(df, df[:50])
51
 
52
 
53
+ def f1(langname,lang_aligner):
54
  if langname=="Icelandic":
55
  df = corpora.ds_i
56
  elif langname =="Faroese":
 
69
  print(ds['audio'])
70
  print(ds['normalized_text'])
71
 
72
+ #return graph.align_and_graph(wav_path, transcript,lang_aligner)
73
 
74
 
75
  bl = gr.Blocks()
 
91
 
92
  pl1 = gr.Plot()
93
 
94
+ btn1.click(f1, [lloadr,alignr], pl1)
95
 
96
 
97
 
 
104
  # ABOUT
105
  This is a work-in-progress demo.
106
 
107
+ Icelandic uses the [samromur-asr](https://huggingface.co/datasets/language-and-voice-lab/samromur_asr) corpus
108
+ and Faroese uses [ravnursson-asr](https://huggingface.co/datasets/carlosdanielhernandezmena/ravnursson_asr).
109
 
110
  After you select a language, a few example sentences from the corpus are displayed.
111