anzorq commited on
Commit
75f6ee9
·
verified ·
1 Parent(s): 3f40220

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from transformers import pipeline
9
  import re
10
 
11
  # pipe = pipeline(model="anzorq/w2v-bert-2.0-kbd", device=0) # old model
12
- pipe = pipeline(model="anzorq/w2v-bert-2.0-kbd", device=0) # new model with a new tokenizer
13
 
14
  replacements = [
15
  ('гъ', 'ɣ'), ('дж', 'j'), ('дз', 'ӡ'), ('жь', 'ʐ'), ('кӏ', 'қ'),
@@ -60,7 +60,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
60
 
61
  with gr.Tab("Microphone Input"):
62
  gr.Markdown("## Transcribe speech from microphone")
63
- mic_audio = gr.Audio(source="microphone", type="filepath", label="Speak into your microphone")
64
  transcribe_button = gr.Button("Transcribe")
65
  transcription_output = gr.Textbox(label="Transcription")
66
 
 
9
  import re
10
 
11
  # pipe = pipeline(model="anzorq/w2v-bert-2.0-kbd", device=0) # old model
12
+ pipe = pipeline(model="anzorq/w2v-bert-2.0-kbd-v2", device=0) # new model with a new tokenizer
13
 
14
  replacements = [
15
  ('гъ', 'ɣ'), ('дж', 'j'), ('дз', 'ӡ'), ('жь', 'ʐ'), ('кӏ', 'қ'),
 
60
 
61
  with gr.Tab("Microphone Input"):
62
  gr.Markdown("## Transcribe speech from microphone")
63
+ mic_audio = gr.Audio(sources="microphone, upload", type="filepath", label="Speak into your microphone")
64
  transcribe_button = gr.Button("Transcribe")
65
  transcription_output = gr.Textbox(label="Transcription")
66