cahya commited on
Commit
e926ef7
β€’
1 Parent(s): ab7958f

update text

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -17,7 +17,6 @@ api_token = os.getenv("API_TOKEN")
17
  model_name = "indonesian-nlp/wav2vec2-indonesian-javanese-sundanese"
18
  processor = Wav2Vec2Processor.from_pretrained(model_name, use_auth_token=api_token)
19
  model = Wav2Vec2ForCTC.from_pretrained(model_name, use_auth_token=api_token)
20
-
21
  def parse_transcription(wav_file):
22
  filename = wav_file.name.split('.')[0]
23
  convert(wav_file.name, filename + "16k.wav")
@@ -30,7 +29,7 @@ def parse_transcription(wav_file):
30
 
31
 
32
 
33
- output = gr.outputs.Textbox(label="Indonesian, Javanese or Sundanese")
34
 
35
  input_ = gr.inputs.Audio(source="microphone", type="file")
36
 
@@ -40,7 +39,8 @@ gr.Interface(parse_transcription, inputs=input_, outputs=[output],
40
  theme='huggingface',
41
  layout='vertical',
42
  title="Multilingual Speech Recognition for Indonesian Languages",
43
- description="This is Speech Recognition Live Demo for Indonesian, Javanese and Sundanese Language. "
44
- "It uses the Wav2Vec2 large model \"indonesian-nlp/wav2vec2-indonesian-javanese-sundanese\""
45
- " which is fine-tuned on Common Voice and OpenSLR speech datasets.",
 
46
  enable_queue=True).launch( inline=False)
 
17
  model_name = "indonesian-nlp/wav2vec2-indonesian-javanese-sundanese"
18
  processor = Wav2Vec2Processor.from_pretrained(model_name, use_auth_token=api_token)
19
  model = Wav2Vec2ForCTC.from_pretrained(model_name, use_auth_token=api_token)
 
20
  def parse_transcription(wav_file):
21
  filename = wav_file.name.split('.')[0]
22
  convert(wav_file.name, filename + "16k.wav")
 
29
 
30
 
31
 
32
+ output = gr.outputs.Textbox(label="The transcript")
33
 
34
  input_ = gr.inputs.Audio(source="microphone", type="file")
35
 
 
39
  theme='huggingface',
40
  layout='vertical',
41
  title="Multilingual Speech Recognition for Indonesian Languages",
42
+ description="Speech Recognition Live Demo for Indonesian, Javanese and Sundanese Language",
43
+ article="This demo was built for the project [Multilingual Speech Recognition for Indonesian Languages](https://github.com/indonesian-nlp/multilingual-asr). "
44
+ "It uses the Wav2Vec2 large model [indonesian-nlp/wav2vec2-indonesian-javanese-sundanese](https://huggingface.co/indonesian-nlp/wav2vec2-indonesian-javanese-sundanese) "
45
+ "which was fine-tuned on Indonesian Common Voice, Javanese and Sundanese OpenSLR speech datasets.",
46
  enable_queue=True).launch( inline=False)