playmak3r commited on
Commit
e245dba
·
1 Parent(s): 6ec47b5

fix: update voice and text examples dir

Browse files
Files changed (2) hide show
  1. app.py +3 -5
  2. model.py +2 -2
app.py CHANGED
@@ -22,9 +22,7 @@ snapshot_download(repo_id="microsoft/VibeVoice-1.5B", local_dir="./ckpts/vibevoi
22
  def create_demo_interface(demo_instance: VibeVoiceDemo):
23
  """Create the Gradio interface with streaming support."""
24
 
25
- # Custom CSS for high-end aesthetics with lighter theme
26
  custom_css = ""
27
-
28
  with gr.Blocks(
29
  title="VibeVoice - AI Podcast Generator",
30
  css=custom_css,
@@ -62,8 +60,9 @@ def create_demo_interface(demo_instance: VibeVoiceDemo):
62
  gr.Markdown("### 🎭 **Speaker Selection**")
63
 
64
  available_speaker_names = list(demo_instance.available_voices.keys())
65
- # default_speakers = available_speaker_names[:4] if len(available_speaker_names) >= 4 else available_speaker_names
66
- default_speakers = ['en-Alice_woman', 'en-Carter_man', 'en-Frank_man', 'en-Maya_woman']
 
67
 
68
  speaker_selections = []
69
  for i in range(4):
@@ -451,7 +450,6 @@ def main():
451
  #share= args.share,
452
  #server_port=args.port,
453
  #server_name="0.0.0.0" if args.share else "127.0.0.1",
454
- show_api=False, # Hide API docs for cleaner interface
455
  show_error=True,
456
  )
457
  except KeyboardInterrupt:
 
22
  def create_demo_interface(demo_instance: VibeVoiceDemo):
23
  """Create the Gradio interface with streaming support."""
24
 
 
25
  custom_css = ""
 
26
  with gr.Blocks(
27
  title="VibeVoice - AI Podcast Generator",
28
  css=custom_css,
 
60
  gr.Markdown("### 🎭 **Speaker Selection**")
61
 
62
  available_speaker_names = list(demo_instance.available_voices.keys())
63
+ #default_speakers = available_speaker_names[:4] if len(available_speaker_names) >= 4 else available_speaker_names
64
+ #default_speakers = ['en-Alice_woman', 'en-Carter_man', 'en-Frank_man', 'en-Maya_woman']
65
+ default_speakers = available_speaker_names
66
 
67
  speaker_selections = []
68
  for i in range(4):
 
450
  #share= args.share,
451
  #server_port=args.port,
452
  #server_name="0.0.0.0" if args.share else "127.0.0.1",
 
453
  show_error=True,
454
  )
455
  except KeyboardInterrupt:
model.py CHANGED
@@ -31,8 +31,8 @@ def convert_to_16_bit_wav(data):
31
  return data
32
 
33
  class VibeVoiceDemo:
34
- voices_dir = os.path.join(os.path.dirname(__file__), "voices")
35
- examples_dir = os.path.join(os.path.dirname(__file__), "text_examples")
36
 
37
  def __init__(self, model_path: str, device: str = "cuda", inference_steps: int = 5, adapter_path: Optional[str] = None):
38
  """Initialize the VibeVoice demo with model loading."""
 
31
  return data
32
 
33
  class VibeVoiceDemo:
34
+ voices_dir = os.path.join(os.path.dirname(__file__), "static", "voices")
35
+ examples_dir = os.path.join(os.path.dirname(__file__), "static", "text_examples")
36
 
37
  def __init__(self, model_path: str, device: str = "cuda", inference_steps: int = 5, adapter_path: Optional[str] = None):
38
  """Initialize the VibeVoice demo with model loading."""