Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -113,38 +113,38 @@ def ui():
|
|
113 |
# Show processed output audio
|
114 |
st.audio(hindi_output_audio, format='audio/mp3')
|
115 |
|
116 |
-
st.markdown("---")
|
117 |
-
# Add a new audio uploader for users to upload another audio file
|
118 |
-
with st.form(key='my_form', clear_on_submit=True):
|
119 |
-
|
120 |
-
|
121 |
|
122 |
-
if audio_file_new is not None and submit_button:
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
|
131 |
-
|
132 |
-
|
133 |
|
134 |
-
|
135 |
-
|
136 |
|
137 |
-
|
138 |
-
|
139 |
|
140 |
-
|
141 |
-
|
142 |
|
143 |
-
|
144 |
-
|
145 |
|
146 |
-
|
147 |
-
|
148 |
if __name__ == '__main__':
|
149 |
ui()
|
150 |
|
|
|
113 |
# Show processed output audio
|
114 |
st.audio(hindi_output_audio, format='audio/mp3')
|
115 |
|
116 |
+
# st.markdown("---")
|
117 |
+
# # Add a new audio uploader for users to upload another audio file
|
118 |
+
# with st.form(key='my_form', clear_on_submit=True):
|
119 |
+
# audio_file_new = st.file_uploader("Upload another audio file", type=["wav", "mp4", "mp3"])
|
120 |
+
# submit_button = st.form_submit_button(label='Process and Play')
|
121 |
|
122 |
+
# if audio_file_new is not None and submit_button:
|
123 |
+
# output_file_path_new = "./output_audio_new.mp3"
|
124 |
+
# save_uploaded_file_as_mp3(audio_file_new, output_file_path_new)
|
125 |
+
# hindi_input_audio_new, sample_rate_new = librosa.load(output_file_path_new, sr=None, mono=True)
|
126 |
|
127 |
+
# # Applying audio recognition for the new file
|
128 |
+
# hindi_transcription_new = parse_transcription(output_file_path_new)
|
129 |
+
# st.success(f"Audio file saved as {output_file_path_new}")
|
130 |
|
131 |
+
# # Convert Hindi to English for the new file
|
132 |
+
# english_input_new = hindi_to_english(hindi_transcription_new)
|
133 |
|
134 |
+
# # Feeding the input to the LLM for the new file
|
135 |
+
# english_output_new = conversational_chat(llm_chain, english_input_new)
|
136 |
|
137 |
+
# # Convert English to Hindi for the new file
|
138 |
+
# hin_output_new = translate_english_to_hindi(english_output_new)
|
139 |
|
140 |
+
# # Getting the Hindi TTS for the new file
|
141 |
+
# hindi_output_audio_new = hindi_tts(hin_output_new)
|
142 |
|
143 |
+
# # Show original uploaded audio for the new file
|
144 |
+
# st.audio(audio_file_new, format='audio/mp3')
|
145 |
|
146 |
+
# # Show processed output audio for the new file
|
147 |
+
# st.audio(hindi_output_audio_new, format='audio/mp3')
|
148 |
if __name__ == '__main__':
|
149 |
ui()
|
150 |
|