AksharPatel commited on
Commit
300ab36
·
1 Parent(s): 5781f0e
Files changed (2) hide show
  1. app.py +14 -0
  2. requirements.txt +33 -7
app.py CHANGED
@@ -22,6 +22,20 @@ def setup_glm_tts():
22
  check=True
23
  )
24
  print("✅ GLM-TTS repository cloned")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  # Add to Python path
27
  if str(glm_tts_dir) not in sys.path:
 
22
  check=True
23
  )
24
  print("✅ GLM-TTS repository cloned")
25
+
26
+ # Install additional requirements from GLM-TTS if they exist
27
+ glm_requirements = glm_tts_dir / "requirements.txt"
28
+ if glm_requirements.exists():
29
+ print("📦 Installing GLM-TTS requirements...")
30
+ try:
31
+ subprocess.run(
32
+ [sys.executable, "-m", "pip", "install", "-r", str(glm_requirements)],
33
+ check=False, # Don't fail if some packages are already installed
34
+ capture_output=True
35
+ )
36
+ print("✅ GLM-TTS requirements installed")
37
+ except Exception as e:
38
+ print(f"⚠️ Warning: Could not install all GLM-TTS requirements: {e}")
39
 
40
  # Add to Python path
41
  if str(glm_tts_dir) not in sys.path:
requirements.txt CHANGED
@@ -1,33 +1,59 @@
 
1
  gradio>=4.0.0
2
  torch>=2.0.0
3
  torchaudio>=2.0.0
4
  transformers>=4.30.0
5
  huggingface-hub>=0.20.0
 
 
6
  numpy<2.0.0
7
  scipy>=1.10.0
 
 
8
  librosa>=0.10.0
9
  soundfile>=0.12.0
 
 
 
 
10
  onnxruntime>=1.15.0
11
- pyyaml>=6.0
12
  einops>=0.7.0
13
  timm>=0.9.0
 
 
 
 
 
 
 
14
  hydra-core>=1.3.0
15
  omegaconf>=2.3.0
16
- WeTextProcessing
17
- soxr
18
  matplotlib>=3.7.0
19
  tensorboard
20
  tensorboardX
 
 
21
  kaldiio
 
 
22
  pypinyin
23
  jieba
24
  cn2an
 
 
 
 
25
  inflect
26
  eng_to_ipa
27
  unidecode
28
  g2p_en
 
 
 
29
  regex
30
- safetensors
31
- accelerate
32
- sentencepiece
33
- protobuf
 
1
+ # Core dependencies
2
  gradio>=4.0.0
3
  torch>=2.0.0
4
  torchaudio>=2.0.0
5
  transformers>=4.30.0
6
  huggingface-hub>=0.20.0
7
+
8
+ # Numerical and scientific computing
9
  numpy<2.0.0
10
  scipy>=1.10.0
11
+
12
+ # Audio processing
13
  librosa>=0.10.0
14
  soundfile>=0.12.0
15
+ soxr
16
+ pydub
17
+
18
+ # ML and deep learning
19
  onnxruntime>=1.15.0
 
20
  einops>=0.7.0
21
  timm>=0.9.0
22
+ safetensors
23
+ accelerate
24
+ sentencepiece
25
+ protobuf
26
+
27
+ # Configuration and utilities
28
+ pyyaml>=6.0
29
  hydra-core>=1.3.0
30
  omegaconf>=2.3.0
31
+
32
+ # Visualization
33
  matplotlib>=3.7.0
34
  tensorboard
35
  tensorboardX
36
+
37
+ # Audio features
38
  kaldiio
39
+
40
+ # Text processing - Chinese
41
  pypinyin
42
  jieba
43
  cn2an
44
+ opencc-python-reimplemented
45
+ WeTextProcessing
46
+
47
+ # Text processing - English
48
  inflect
49
  eng_to_ipa
50
  unidecode
51
  g2p_en
52
+ contractions
53
+
54
+ # Utilities
55
  regex
56
+ tqdm
57
+ requests
58
+ modelscope
59
+ onnx