github-actions[bot] commited on
Commit
f63a450
·
1 Parent(s): 0c8a24f

Sync with https://github.com/mozilla-ai/document-to-podcast

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -121,8 +121,23 @@ if "clean_text" in st.session_state:
121
 
122
  if os.environ.get("HF_SPACE") == "TRUE":
123
  tts_link = "- [hexgrad/Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  else:
125
  tts_link = "- [OuteAI/OuteTTS-0.2-500M](https://huggingface.co/OuteAI/OuteTTS-0.2-500M-GGUF)"
 
126
 
127
  st.markdown(
128
  "For this demo, we are using the following models: \n"
@@ -151,9 +166,9 @@ if "clean_text" in st.session_state:
151
  st.divider()
152
 
153
  st.subheader("Speaker configuration")
154
- for s in DEFAULT_SPEAKERS:
155
  s.pop("id", None)
156
- speakers = st.data_editor(DEFAULT_SPEAKERS, num_rows="dynamic")
157
 
158
  if st.button("Generate Podcast", on_click=gen_button_clicked):
159
  for n, speaker in enumerate(speakers):
 
121
 
122
  if os.environ.get("HF_SPACE") == "TRUE":
123
  tts_link = "- [hexgrad/Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M)"
124
+ SPEAKERS = [
125
+ {
126
+ "id": 1,
127
+ "name": "Sarah",
128
+ "description": "The main host. She explains topics clearly using anecdotes and analogies, teaching in an engaging and captivating way.",
129
+ "voice_profile": "af_sarah",
130
+ },
131
+ {
132
+ "id": 2,
133
+ "name": "Michael",
134
+ "description": "The co-host. He keeps the conversation on track, asks curious follow-up questions, and reacts with excitement or confusion, often using interjections like hmm or umm.",
135
+ "voice_profile": "am_michael",
136
+ },
137
+ ]
138
  else:
139
  tts_link = "- [OuteAI/OuteTTS-0.2-500M](https://huggingface.co/OuteAI/OuteTTS-0.2-500M-GGUF)"
140
+ SPEARES = DEFAULT_SPEAKERS
141
 
142
  st.markdown(
143
  "For this demo, we are using the following models: \n"
 
166
  st.divider()
167
 
168
  st.subheader("Speaker configuration")
169
+ for s in SPEAKERS:
170
  s.pop("id", None)
171
+ speakers = st.data_editor(SPEAKERS, num_rows="dynamic")
172
 
173
  if st.button("Generate Podcast", on_click=gen_button_clicked):
174
  for n, speaker in enumerate(speakers):