austinroy commited on
Commit
307452c
Β·
1 Parent(s): bf4bbc3

Initial commit

Browse files
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. app.py +5 -5
  2. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/__init__.py +0 -0
  3. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/__init__.cpython-311.pyc +0 -0
  4. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/tts.cpython-311.pyc +0 -0
  5. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/utils.cpython-311.pyc +0 -0
  6. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/vc.cpython-311.pyc +0 -0
  7. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__init__.py +0 -0
  8. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/__init__.cpython-311.pyc +0 -0
  9. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/const.cpython-311.pyc +0 -0
  10. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/decoder.cpython-311.pyc +0 -0
  11. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/f0_predictor.cpython-311.pyc +0 -0
  12. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/flow.cpython-311.pyc +0 -0
  13. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/flow_matching.cpython-311.pyc +0 -0
  14. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/hifigan.cpython-311.pyc +0 -0
  15. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/s3gen.cpython-311.pyc +0 -0
  16. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/xvector.cpython-311.pyc +0 -0
  17. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/const.py +0 -0
  18. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/decoder.py +0 -0
  19. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/f0_predictor.py +0 -0
  20. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/flow.py +0 -0
  21. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/flow_matching.py +0 -0
  22. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/hifigan.py +0 -0
  23. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/__pycache__/decoder.cpython-311.pyc +0 -0
  24. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/__pycache__/flow_matching.cpython-311.pyc +0 -0
  25. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/__pycache__/transformer.cpython-311.pyc +0 -0
  26. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/decoder.py +0 -0
  27. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/flow_matching.py +0 -0
  28. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/text_encoder.py +0 -0
  29. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/transformer.py +0 -0
  30. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/s3gen.py +0 -0
  31. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__init__.py +0 -0
  32. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/__init__.cpython-311.pyc +0 -0
  33. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/activation.cpython-311.pyc +0 -0
  34. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/attention.cpython-311.pyc +0 -0
  35. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/convolution.cpython-311.pyc +0 -0
  36. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/embedding.cpython-311.pyc +0 -0
  37. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/encoder_layer.cpython-311.pyc +0 -0
  38. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/positionwise_feed_forward.cpython-311.pyc +0 -0
  39. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/subsampling.cpython-311.pyc +0 -0
  40. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/upsample_encoder.cpython-311.pyc +0 -0
  41. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/activation.py +0 -0
  42. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/attention.py +0 -0
  43. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/convolution.py +0 -0
  44. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/embedding.py +0 -0
  45. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/encoder_layer.py +0 -0
  46. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/positionwise_feed_forward.py +0 -0
  47. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/subsampling.py +0 -0
  48. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/upsample_encoder.py +0 -0
  49. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/utils/__pycache__/class_utils.cpython-311.pyc +0 -0
  50. {chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/utils/__pycache__/mask.cpython-311.pyc +0 -0
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import random
2
  import numpy as np
3
  import torch
4
- from chatterbox.src.chatterbox.tts import ChatterboxTTS
5
  import gradio as gr
6
  import spaces
7
 
@@ -12,13 +12,13 @@ print(f"πŸš€ Running on device: {DEVICE}")
12
  MODEL = None
13
 
14
  def get_or_load_model():
15
- """Loads the ChatterboxTTS model if it hasn't been loaded already,
16
  and ensures it's on the correct device."""
17
  global MODEL
18
  if MODEL is None:
19
  print("Model not loaded, initializing...")
20
  try:
21
- MODEL = ChatterboxTTS.from_pretrained(DEVICE)
22
  if hasattr(MODEL, 'to') and str(MODEL.device) != DEVICE:
23
  MODEL.to(DEVICE)
24
  print(f"Model loaded successfully. Internal device: {getattr(MODEL, 'device', 'N/A')}")
@@ -52,7 +52,7 @@ def generate_tts_audio(
52
  cfgw_input: float
53
  ) -> tuple[int, np.ndarray]:
54
  """
55
- Generates TTS audio using the ChatterboxTTS model.
56
 
57
  Args:
58
  text_input: The text to synthesize (max 300 characters).
@@ -87,7 +87,7 @@ def generate_tts_audio(
87
  with gr.Blocks() as demo:
88
  gr.Markdown(
89
  """
90
- # Chatterbox TTS Demo
91
  Generate high-quality speech from text with reference audio styling.
92
  """
93
  )
 
1
  import random
2
  import numpy as np
3
  import torch
4
+ from echobox.src.echobox.tts import EchoBoxTTS
5
  import gradio as gr
6
  import spaces
7
 
 
12
  MODEL = None
13
 
14
  def get_or_load_model():
15
+ """Loads the EchoBoxTTS model if it hasn't been loaded already,
16
  and ensures it's on the correct device."""
17
  global MODEL
18
  if MODEL is None:
19
  print("Model not loaded, initializing...")
20
  try:
21
+ MODEL = EchoBoxTTS.from_pretrained(DEVICE)
22
  if hasattr(MODEL, 'to') and str(MODEL.device) != DEVICE:
23
  MODEL.to(DEVICE)
24
  print(f"Model loaded successfully. Internal device: {getattr(MODEL, 'device', 'N/A')}")
 
52
  cfgw_input: float
53
  ) -> tuple[int, np.ndarray]:
54
  """
55
+ Generates TTS audio using the EchoboxTTS model.
56
 
57
  Args:
58
  text_input: The text to synthesize (max 300 characters).
 
87
  with gr.Blocks() as demo:
88
  gr.Markdown(
89
  """
90
+ # EchoBox TTS Demo
91
  Generate high-quality speech from text with reference audio styling.
92
  """
93
  )
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/__init__.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/__init__.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/tts.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/utils.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/__pycache__/vc.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__init__.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/__init__.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/const.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/decoder.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/f0_predictor.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/flow.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/flow_matching.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/hifigan.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/s3gen.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/__pycache__/xvector.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/const.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/decoder.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/f0_predictor.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/flow.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/flow_matching.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/hifigan.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/__pycache__/decoder.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/__pycache__/flow_matching.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/__pycache__/transformer.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/decoder.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/flow_matching.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/text_encoder.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/matcha/transformer.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/s3gen.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__init__.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/__init__.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/activation.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/attention.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/convolution.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/embedding.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/encoder_layer.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/positionwise_feed_forward.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/subsampling.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/__pycache__/upsample_encoder.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/activation.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/attention.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/convolution.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/embedding.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/encoder_layer.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/positionwise_feed_forward.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/subsampling.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/transformer/upsample_encoder.py RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/utils/__pycache__/class_utils.cpython-311.pyc RENAMED
File without changes
{chatterbox/src/chatterbox β†’ echobox/src/echobox}/models/s3gen/utils/__pycache__/mask.cpython-311.pyc RENAMED
File without changes