hivecorp commited on
Commit
85ad137
·
verified ·
1 Parent(s): df8e684

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- rate_str = f"{'+' if rate > 0 else ''}{rate}%"
 
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,