Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from speechtotext import speech_to_text
|
3 |
+
from t2s import text_to_speech_page
|
4 |
+
|
5 |
+
def main():
|
6 |
+
st.title("VOICE TRANSFORMATION TECHNOLOGIES : EXPLORATION")
|
7 |
+
|
8 |
+
# Define a dictionary to map page names to their corresponding functions
|
9 |
+
pages = {
|
10 |
+
"Text to Speech": text_to_speech_page,
|
11 |
+
"Speech to Text": speech_to_text
|
12 |
+
}
|
13 |
+
|
14 |
+
# Display a sidebar for navigation
|
15 |
+
st.sidebar.title("Navigation")
|
16 |
+
|
17 |
+
# Get the selection from the user
|
18 |
+
selection = st.sidebar.radio("Go to", list(pages.keys()))
|
19 |
+
|
20 |
+
# If the user selects "Text to Speech", show the text-to-speech page
|
21 |
+
if selection == "Text to Speech":
|
22 |
+
text_to_speech_page()
|
23 |
+
|
24 |
+
# If the user selects "Speech to Text", show the speech-to-text page
|
25 |
+
elif selection == "Speech to Text":
|
26 |
+
speech_to_text()
|
27 |
+
|
28 |
+
# Add additional pages here as needed
|
29 |
+
# elif selection == "Page Name":
|
30 |
+
# page_function()
|
31 |
+
|
32 |
+
if __name__ == "__main__":
|
33 |
+
main()
|