Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -161,7 +161,8 @@ async def generate_accurate_srt(text, voice, rate, pitch, words_per_line, lines_
|
|
| 161 |
|
| 162 |
async def process_text(text, pitch, rate, voice, words_per_line, lines_per_segment):
|
| 163 |
pitch_str = f"{pitch}Hz" if pitch != 0 else "0Hz"
|
| 164 |
-
|
|
|
|
| 165 |
|
| 166 |
srt_path, audio_path = await generate_accurate_srt(
|
| 167 |
text,
|
|
|
|
| 161 |
|
| 162 |
async def process_text(text, pitch, rate, voice, words_per_line, lines_per_segment):
|
| 163 |
pitch_str = f"{pitch}Hz" if pitch != 0 else "0Hz"
|
| 164 |
+
# Fix: Always include + sign for zero and positive rates
|
| 165 |
+
rate_str = f"+{rate}%" if rate >= 0 else f"{rate}%"
|
| 166 |
|
| 167 |
srt_path, audio_path = await generate_accurate_srt(
|
| 168 |
text,
|