Update app.py
Browse files
app.py
CHANGED
|
@@ -692,6 +692,9 @@ else:
|
|
| 692 |
|
| 693 |
# Main Form (for settings and submission)
|
| 694 |
with st.form("personalization_form", clear_on_submit=False):
|
|
|
|
|
|
|
|
|
|
| 695 |
# Language & Voice Settings Section
|
| 696 |
st.markdown('<div class="section-header">🗣️ Language & Voice Settings</div>', unsafe_allow_html=True)
|
| 697 |
|
|
@@ -699,7 +702,7 @@ else:
|
|
| 699 |
with col1:
|
| 700 |
target_language = st.selectbox(
|
| 701 |
"Target Language",
|
| 702 |
-
["english", "hindi", "marathi", "kannada", "punjabi","gujarati"],
|
| 703 |
index=0,
|
| 704 |
format_func=lambda x: x.capitalize(),
|
| 705 |
help="Select the target language for content generation"
|
|
@@ -715,13 +718,43 @@ else:
|
|
| 715 |
)
|
| 716 |
|
| 717 |
with col3:
|
| 718 |
-
# Gemini voice models
|
| 719 |
if tts_gender == "male":
|
| 720 |
-
|
| 721 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 722 |
else: # female
|
| 723 |
-
|
| 724 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 725 |
|
| 726 |
tts_voice = st.selectbox(
|
| 727 |
"Voice Style (Gemini)",
|
|
|
|
| 692 |
|
| 693 |
# Main Form (for settings and submission)
|
| 694 |
with st.form("personalization_form", clear_on_submit=False):
|
| 695 |
+
# Language & Voice Settings Section
|
| 696 |
+
# Replace the Language & Voice Settings Section in your form with this:
|
| 697 |
+
|
| 698 |
# Language & Voice Settings Section
|
| 699 |
st.markdown('<div class="section-header">🗣️ Language & Voice Settings</div>', unsafe_allow_html=True)
|
| 700 |
|
|
|
|
| 702 |
with col1:
|
| 703 |
target_language = st.selectbox(
|
| 704 |
"Target Language",
|
| 705 |
+
["english", "hindi", "marathi", "kannada", "punjabi", "gujarati"],
|
| 706 |
index=0,
|
| 707 |
format_func=lambda x: x.capitalize(),
|
| 708 |
help="Select the target language for content generation"
|
|
|
|
| 718 |
)
|
| 719 |
|
| 720 |
with col3:
|
| 721 |
+
# Gemini voice models - separated by gender
|
| 722 |
if tts_gender == "male":
|
| 723 |
+
# Male voices with characteristics
|
| 724 |
+
voice_options = [
|
| 725 |
+
"Puck", # Upbeat and energetic
|
| 726 |
+
"Charon", # Informative and clear
|
| 727 |
+
"Fenrir", # Excitable and dynamic
|
| 728 |
+
"Orus", # Firm and decisive
|
| 729 |
+
"Achird", # Friendly and approachable
|
| 730 |
+
"Algenib", # Gravelly texture
|
| 731 |
+
"Algieba", # Smooth and pleasant
|
| 732 |
+
"Alnilam", # Firm and strong
|
| 733 |
+
"Enceladus", # Breathy and soft
|
| 734 |
+
"Iapetus", # Clear and articulate
|
| 735 |
+
"Rasalgethi",# Informative and professional
|
| 736 |
+
"Sadachbia" # Lively and animated
|
| 737 |
+
]
|
| 738 |
+
default_voice = "Charon"
|
| 739 |
else: # female
|
| 740 |
+
# Female voices with characteristics
|
| 741 |
+
voice_options = [
|
| 742 |
+
"Aoede", # Breezy and natural
|
| 743 |
+
"Kore", # Firm and confident
|
| 744 |
+
"Leda", # Youthful and energetic
|
| 745 |
+
"Zephyr", # Bright and cheerful
|
| 746 |
+
"Autonoe", # Bright and optimistic
|
| 747 |
+
"Callirhoe", # Easy-going and relaxed
|
| 748 |
+
"Despina", # Smooth and flowing
|
| 749 |
+
"Erinome", # Clear and precise
|
| 750 |
+
"Gacrux", # Mature and experienced
|
| 751 |
+
"Laomedeia", # Upbeat and lively
|
| 752 |
+
"Pulcherrima", # Forward and expressive
|
| 753 |
+
"Sulafat", # Warm and welcoming
|
| 754 |
+
"Vindemiatrix", # Gentle and kind
|
| 755 |
+
"Achernar" # Soft and gentle
|
| 756 |
+
]
|
| 757 |
+
default_voice = "Aoede"
|
| 758 |
|
| 759 |
tts_voice = st.selectbox(
|
| 760 |
"Voice Style (Gemini)",
|