Merge pull request #9 from twobob/twobob-patch-1
Fix: script.replace("’", "'") in gradio_demo.py
This commit is contained in:
commit
b2bf6de828
1 changed files with 5 additions and 1 deletions
|
@ -136,6 +136,7 @@ class VibeVoiceDemo:
|
|||
speaker_4: str = None,
|
||||
cfg_scale: float = 1.3) -> Iterator[tuple]:
|
||||
try:
|
||||
|
||||
# Reset stop flag and set generating state
|
||||
self.stop_generation = False
|
||||
self.is_generating = True
|
||||
|
@ -145,6 +146,9 @@ class VibeVoiceDemo:
|
|||
self.is_generating = False
|
||||
raise gr.Error("Error: Please provide a script.")
|
||||
|
||||
# Defend against common mistake
|
||||
script = script.replace("’", "'")
|
||||
|
||||
if num_speakers < 1 or num_speakers > 4:
|
||||
self.is_generating = False
|
||||
raise gr.Error("Error: Number of speakers must be between 1 and 4.")
|
||||
|
|
Loading…
Reference in a new issue