Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -119,7 +119,7 @@ async def batch_process_srt_and_audio(script_text, pitch, rate, voice, progress=
|
|
| 119 |
async def process_script(script_text, pitch, rate, voice):
|
| 120 |
# Format pitch correctly for edge-tts
|
| 121 |
pitch_str = f"{pitch}Hz" if pitch != 0 else "-1Hz"
|
| 122 |
-
formatted_rate = f"{'+' if rate >
|
| 123 |
srt_path, audio_path = await batch_process_srt_and_audio(script_text, pitch_str, formatted_rate, voice_options[voice])
|
| 124 |
return srt_path, audio_path, audio_path
|
| 125 |
|
|
|
|
| 119 |
async def process_script(script_text, pitch, rate, voice):
|
| 120 |
# Format pitch correctly for edge-tts
|
| 121 |
pitch_str = f"{pitch}Hz" if pitch != 0 else "-1Hz"
|
| 122 |
+
formatted_rate = f"{'+' if rate > 1 else ''}{int(rate)}%"
|
| 123 |
srt_path, audio_path = await batch_process_srt_and_audio(script_text, pitch_str, formatted_rate, voice_options[voice])
|
| 124 |
return srt_path, audio_path, audio_path
|
| 125 |
|