script.replace("’", "'") in gradio_demo.py

prevents ’ characters from silencing succeeding word parts
This commit is contained in:
_ 2025-08-26 01:00:37 +01:00 committed by GitHub
parent c6f8d8fd5d
commit 2c7c57eda0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()