Spaces:
Sleeping
Sleeping
Update audio_gen.py
Browse files- audio_gen.py +1 -1
audio_gen.py
CHANGED
|
@@ -96,7 +96,7 @@ def edit_section_text(original_text: str, new_text: str, voice_model: str, audio
|
|
| 96 |
return None, None
|
| 97 |
|
| 98 |
# 2) Re-generate the audio for the new text
|
| 99 |
-
|
| 100 |
audio_file_path = generate_audio(updated_audio_text, voice_model, audio_model=audio_model)
|
| 101 |
return updated_text, audio_file_path
|
| 102 |
|
|
|
|
| 96 |
return None, None
|
| 97 |
|
| 98 |
# 2) Re-generate the audio for the new text
|
| 99 |
+
updated_audio_text = re.sub(r"<.*?>", "", updated_text)
|
| 100 |
audio_file_path = generate_audio(updated_audio_text, voice_model, audio_model=audio_model)
|
| 101 |
return updated_text, audio_file_path
|
| 102 |
|