Spaces:
Runtime error
Runtime error
SudeendraMG
commited on
Commit
·
dc15916
1
Parent(s):
b212243
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,9 @@ transcriber_telugu = pipeline("automatic-speech-recognition", model="krishnateja
|
|
16 |
transcriber_tamil = pipeline("automatic-speech-recognition", model="Amrrs/wav2vec2-large-xlsr-53-tamil")
|
17 |
# transcriber_nepali = pipeline("automatic-speech-recognition", model="ai4bharat/indicwav2vec_v1_nepali")
|
18 |
# transcriber_marathi = pipeline("automatic-speech-recognition", model="ai4bharat/indicwav2vec_v1_marathi")
|
|
|
19 |
|
20 |
-
languages = ["hindi","bengali","odia","gujarati","telugu","tamil"]
|
21 |
|
22 |
def resample_to_16k(audio, orig_sr):
|
23 |
y_resampled = librosa.resample(y=audio, orig_sr=orig_sr, target_sr=16000)
|
@@ -39,7 +40,7 @@ def transcribe(audio,lang="hindi"):
|
|
39 |
|
40 |
demo = gr.Interface(
|
41 |
transcribe,
|
42 |
-
inputs=["microphone",gr.Radio(["hindi","bengali","odia","gujarati","telugu","tamil"],value="hindi")],
|
43 |
# inputs=["microphone",gr.Radio(["hindi","bengali","odia","gujarati","telugu","sinhala","tamil","nepali","marathi"],value="hindi")],
|
44 |
outputs=["text","text"],
|
45 |
examples=[["./Samples/Hindi_1.mp3","hindi"],["./Samples/Hindi_2.mp3","hindi"],["./Samples/Hindi_3.mp3","hindi"],["./Samples/Hindi_4.mp3","hindi"],["./Samples/Hindi_5.mp3","hindi"],["./Samples/Tamil_2.mp3","hindi"],["./Samples/climate ex short.wav","hindi"],["./Samples/Gujarati_1.wav","gujarati"],["./Samples/Gujarati_2.wav","gujarati"],["./Samples/Bengali_1.wav","bengali"],["./Samples/Bengali_2.wav","bengali"]])
|
|
|
16 |
transcriber_tamil = pipeline("automatic-speech-recognition", model="Amrrs/wav2vec2-large-xlsr-53-tamil")
|
17 |
# transcriber_nepali = pipeline("automatic-speech-recognition", model="ai4bharat/indicwav2vec_v1_nepali")
|
18 |
# transcriber_marathi = pipeline("automatic-speech-recognition", model="ai4bharat/indicwav2vec_v1_marathi")
|
19 |
+
transcriber_kannada = pipeline("automatic-speech-recognition", model="TheAIchemist13/kannada_wav2vec2_final")
|
20 |
|
21 |
+
languages = ["hindi","bengali","odia","gujarati","telugu","tamil","kannada"]
|
22 |
|
23 |
def resample_to_16k(audio, orig_sr):
|
24 |
y_resampled = librosa.resample(y=audio, orig_sr=orig_sr, target_sr=16000)
|
|
|
40 |
|
41 |
demo = gr.Interface(
|
42 |
transcribe,
|
43 |
+
inputs=["microphone",gr.Radio(["hindi","bengali","odia","gujarati","telugu","tamil","kannada"],value="hindi")],
|
44 |
# inputs=["microphone",gr.Radio(["hindi","bengali","odia","gujarati","telugu","sinhala","tamil","nepali","marathi"],value="hindi")],
|
45 |
outputs=["text","text"],
|
46 |
examples=[["./Samples/Hindi_1.mp3","hindi"],["./Samples/Hindi_2.mp3","hindi"],["./Samples/Hindi_3.mp3","hindi"],["./Samples/Hindi_4.mp3","hindi"],["./Samples/Hindi_5.mp3","hindi"],["./Samples/Tamil_2.mp3","hindi"],["./Samples/climate ex short.wav","hindi"],["./Samples/Gujarati_1.wav","gujarati"],["./Samples/Gujarati_2.wav","gujarati"],["./Samples/Bengali_1.wav","bengali"],["./Samples/Bengali_2.wav","bengali"]])
|