Soma Dhavala
commited on
Commit
·
5cb4388
1
Parent(s):
1ce7ce3
add bhasini for hindi
Browse files
app.py
CHANGED
@@ -45,14 +45,15 @@ def get_asr_output(audio_path,lang):
|
|
45 |
audio.export("temp.wav", format="wav")
|
46 |
file = open("temp.wav","rb")
|
47 |
|
48 |
-
if lang == "hi":
|
49 |
-
op_text = asr_pipe("temp.wav")
|
50 |
-
print('ai4bharat',op_text)
|
51 |
|
52 |
transcription = openai.Audio.transcribe("whisper-1", file, language=lang)
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
56 |
|
57 |
return op_text
|
58 |
|
|
|
45 |
audio.export("temp.wav", format="wav")
|
46 |
file = open("temp.wav","rb")
|
47 |
|
|
|
|
|
|
|
48 |
|
49 |
transcription = openai.Audio.transcribe("whisper-1", file, language=lang)
|
50 |
+
|
51 |
+
op_text = transcription.text
|
52 |
+
|
53 |
+
if lang == "hi":
|
54 |
+
op_text = asr_pipe("temp.wav")
|
55 |
+
print('whisper',transcription)
|
56 |
+
print('ai4b',op_text)
|
57 |
|
58 |
return op_text
|
59 |
|