Nick021402 commited on
Commit
6ba9626
Β·
verified Β·
1 Parent(s): c0743bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -11,7 +11,9 @@ from datetime import datetime
11
 
12
  # Import our custom modules
13
  from segmenter import TextSegmenter
14
- from tts_engine import NariDIAEngine
 
 
15
  from audio_utils import AudioProcessor
16
 
17
  # Configure logging
@@ -21,7 +23,9 @@ logger = logging.getLogger(__name__)
21
  class PodXplainApp:
22
  def __init__(self):
23
  self.segmenter = TextSegmenter()
24
- self.tts_engine = NariDIAEngine()
 
 
25
  self.audio_processor = AudioProcessor()
26
  self.temp_dir = None
27
 
@@ -169,12 +173,15 @@ def create_gradio_interface():
169
  }
170
  """
171
 
172
- with gr.Blocks(css=css, title="PodXplain - Text to Podcast") as interface:
173
  # Header
174
  gr.HTML("""
175
  <div class="header">
176
- <h1>πŸŽ™οΈ PodXplain</h1>
177
- <p><em>From script to story β€” voice it like never before.</em></p>
 
 
 
178
  </div>
179
  """)
180
 
@@ -222,7 +229,7 @@ def create_gradio_interface():
222
  # Footer with instructions
223
  gr.HTML("""
224
  <div class="footer">
225
- <h3>πŸ“‹ How to Use PodXplain</h3>
226
  <ol>
227
  <li><strong>Write your script:</strong> Enter up to 50,000 characters of text</li>
228
  <li><strong>Choose speaker mode:</strong> Auto-detect, paragraph-based, or dialogue-based</li>
@@ -231,6 +238,8 @@ def create_gradio_interface():
231
  </ol>
232
  <p><strong>πŸ’‘ Tips:</strong> Use clear paragraph breaks for better speaker detection.
233
  Write naturally as if speaking to an audience.</p>
 
 
234
  </div>
235
  """)
236
 
 
11
 
12
  # Import our custom modules
13
  from segmenter import TextSegmenter
14
+ # --- CHANGE START ---
15
+ from tts_engine import CPUMultiSpeakerTTS # Updated class name
16
+ # --- CHANGE END ---
17
  from audio_utils import AudioProcessor
18
 
19
  # Configure logging
 
23
  class PodXplainApp:
24
  def __init__(self):
25
  self.segmenter = TextSegmenter()
26
+ # --- CHANGE START ---
27
+ self.tts_engine = CPUMultiSpeakerTTS() # Updated class instantiation
28
+ # --- CHANGE END ---
29
  self.audio_processor = AudioProcessor()
30
  self.temp_dir = None
31
 
 
173
  }
174
  """
175
 
176
+ with gr.Blocks(css=css, title="PodXplainClone - CPU Podcast Generator") as interface: # Updated title
177
  # Header
178
  gr.HTML("""
179
  <div class="header">
180
+ <h1>πŸŽ™οΈ PodXplainClone</h1>
181
+ <p><em>From script to story β€” voice it like never before, even on CPU.</em></p> <p style="font-size: 0.9em; margin-top: 10px;">
182
+ This space allows you to transform written dialogue into natural-sounding multi-speaker audio, optimized for CPU hardware.
183
+ It serves as a **CPU-friendly alternative and development sandbox** while the main PodXplain project awaits GPU resources for more advanced models.
184
+ </p>
185
  </div>
186
  """)
187
 
 
229
  # Footer with instructions
230
  gr.HTML("""
231
  <div class="footer">
232
+ <h3>πŸ“‹ How to Use PodXplainClone</h3>
233
  <ol>
234
  <li><strong>Write your script:</strong> Enter up to 50,000 characters of text</li>
235
  <li><strong>Choose speaker mode:</strong> Auto-detect, paragraph-based, or dialogue-based</li>
 
238
  </ol>
239
  <p><strong>πŸ’‘ Tips:</strong> Use clear paragraph breaks for better speaker detection.
240
  Write naturally as if speaking to an audience.</p>
241
+ <p style="font-size: 0.8em; color: #999;">Powered by PodXplainClone &bull; Developed by Nick021402</p>
242
+ <p style="font-size: 0.7em; color: #aaa;">This space runs on CPU hardware for accessibility. For the original project and GPU-powered advanced models, visit the main PodXplain space.</p>
243
  </div>
244
  """)
245