script.replace("’", "'") in gradio_demo.py
prevents ’ characters from silencing succeeding word parts
This commit is contained in:
parent
c6f8d8fd5d
commit
2c7c57eda0
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
|
||||
|
@ -144,6 +145,9 @@ class VibeVoiceDemo:
|
|||
if not script.strip():
|
||||
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
|
||||
|
@ -1171,4 +1175,4 @@ def main():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue