Spaces:
Sleeping
Sleeping
File size: 1,433 Bytes
ea5222d 6dd1216 ea5222d 6dd1216 ea5222d 6dd1216 ea5222d 6dd1216 ea5222d 6dd1216 ea5222d 6dd1216 d7e5b26 ea5222d d9ae5a4 b4d56a1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
#import gradio as gr
#from transformers import pipeline
#p1= pipeline(task="automatic-speech-recognition", model="cdactvm/w2v-bert-2.0-odia_v1")
#def transcribe_odiya(speech):
# #print (p1(speech))
# text = p1(speech)["text"]
#text=cleanhtml(text)
# return text
#def sel_lng(lng,mic=None, file=None):
# if mic is not None:
# audio = mic
# elif file is not None:
# audio = file
# else:
# return "You must either provide a mic recording or a file"
# if (lng=="Odiya"):
# return transcribe_odiya(audio)
#demo=gr.Interface(
# fn=sel_lng,
# inputs=[
# gr.Dropdown(["Odiya"],value="Odiya",label="Select Language"),
# gr.Audio(sources="microphone", type="filepath"),
# gr.Audio(sources="upload", type="filepath"),
#"state"
# ],
# outputs=[
# "textbox"
# #"state"
# ],
# title="Automatic Speech Recognition",
# description = "Demo for Automatic Speech Recognition. Use microphone to record speech. Please press Record button. Initially it will take some time to load the model. The recognized text will appear in the output textbox",
# ).launch()
#demo.launch()
#from huggingface_hub import Repository
#repo = Repository(local_dir="indic-trans", clone_from="https://github.com/libindic/indic-trans.gi")
import os
os.system('git clone https://github.com/irshadbhat/indic-trans.git')
|