SakshiRathi77
commited on
Commit
•
9ca4d96
1
Parent(s):
a67cf5b
Update app.py
Browse files
app.py
CHANGED
@@ -34,12 +34,12 @@ def transcribe(microphone, file_upload):
|
|
34 |
|
35 |
def rt_transcribe(audio, state=""):
|
36 |
time.sleep(2)
|
37 |
-
text =
|
38 |
state += unicodedata.normalize("NFC",text) + " "
|
39 |
return state, state
|
40 |
|
41 |
demo = gr.Blocks()
|
42 |
-
examples=[["examples/example1.mp3"], ["examples/example2.mp3"],["examples/example3.mp3"]]
|
43 |
description = """
|
44 |
<p>
|
45 |
<center>
|
@@ -47,14 +47,10 @@ Welcome to the HindiSpeechPro, a cutting-edge interface powered by a fine-tuned
|
|
47 |
</center>
|
48 |
</p>
|
49 |
<center>
|
50 |
-
<img src="https://huggingface.co/spaces/SakshiRathi77/SakshiRathi77-Wav2Vec2-hi-kagglex/blob/main/Images/Hindi-Speech-Voice-Recognition-Tool.jpg" alt="logo"
|
51 |
</center>
|
52 |
"""
|
53 |
|
54 |
-
|
55 |
-
# css='div {margin-left: auto; margin-right: auto; width: 100%;\
|
56 |
-
# background-image: url("https://huggingface.co/spaces/SakshiRathi77/SakshiRathi77-Wav2Vec2-hi-kagglex/blob/main/Images/image-bg.jpg"); repeat 0 0;}')
|
57 |
-
|
58 |
mf_transcribe = gr.Interface(
|
59 |
fn=transcribe,
|
60 |
inputs=[
|
|
|
34 |
|
35 |
def rt_transcribe(audio, state=""):
|
36 |
time.sleep(2)
|
37 |
+
text = pipe(audio)["text"]
|
38 |
state += unicodedata.normalize("NFC",text) + " "
|
39 |
return state, state
|
40 |
|
41 |
demo = gr.Blocks()
|
42 |
+
examples=[["examples/example1.mp3",None], ["examples/example2.mp3",None],["examples/example3.mp3,None"]]
|
43 |
description = """
|
44 |
<p>
|
45 |
<center>
|
|
|
47 |
</center>
|
48 |
</p>
|
49 |
<center>
|
50 |
+
<img src="https://huggingface.co/spaces/SakshiRathi77/SakshiRathi77-Wav2Vec2-hi-kagglex/blob/main/Images/Hindi-Speech-Voice-Recognition-Tool.jpg" alt="logo"/>
|
51 |
</center>
|
52 |
"""
|
53 |
|
|
|
|
|
|
|
|
|
54 |
mf_transcribe = gr.Interface(
|
55 |
fn=transcribe,
|
56 |
inputs=[
|