minicpmo-utils 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,6 @@ import time
16
16
  from typing import Generator
17
17
  from tqdm import tqdm
18
18
  from hyperpyyaml import load_hyperpyyaml
19
- from modelscope import snapshot_download
20
19
  import torch
21
20
  from cosyvoice.cli.frontend import CosyVoiceFrontEnd
22
21
  from cosyvoice.cli.model import CosyVoiceModel, CosyVoice2Model
@@ -30,8 +29,6 @@ class CosyVoice:
30
29
  self.instruct = True if '-Instruct' in model_dir else False
31
30
  self.model_dir = model_dir
32
31
  self.fp16 = fp16
33
- if not os.path.exists(model_dir):
34
- model_dir = snapshot_download(model_dir)
35
32
  hyper_yaml_path = '{}/cosyvoice.yaml'.format(model_dir)
36
33
  if not os.path.exists(hyper_yaml_path):
37
34
  raise ValueError('{} not found!'.format(hyper_yaml_path))
@@ -154,8 +151,6 @@ class CosyVoice2(CosyVoice):
154
151
  self.instruct = True if '-Instruct' in model_dir else False
155
152
  self.model_dir = model_dir
156
153
  self.fp16 = fp16
157
- if not os.path.exists(model_dir):
158
- model_dir = snapshot_download(model_dir)
159
154
 
160
155
  if config_path is None:
161
156
  config_path = f'{model_dir}/cosyvoice2.yaml'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: minicpmo-utils
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Unified utilities package for MiniCPM-o: includes cosyvoice + stepaudio2 and extensible utils.
5
5
  Author: MiniCPM-o Utils Maintainers
6
6
  License: Apache-2.0
@@ -14,23 +14,29 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
- Requires-Dist: torch>=2.3.0
18
- Requires-Dist: torchaudio>=2.3.0
19
- Requires-Dist: transformers>=4.49.0
20
17
  Requires-Dist: numpy
21
- Requires-Dist: hyperpyyaml
22
- Requires-Dist: modelscope
23
- Requires-Dist: openai-whisper
24
- Requires-Dist: tqdm
25
- Requires-Dist: tiktoken
26
- Requires-Dist: inflect
27
- Requires-Dist: omegaconf
28
- Requires-Dist: einops
18
+ Requires-Dist: pillow
29
19
  Requires-Dist: librosa
30
- Requires-Dist: onnxruntime>=1.18.0
31
- Requires-Dist: diffusers
20
+ Requires-Dist: decord
21
+ Provides-Extra: tts
22
+ Requires-Dist: torch>=2.3.0; extra == "tts"
23
+ Requires-Dist: torchaudio>=2.3.0; extra == "tts"
24
+ Requires-Dist: transformers>=4.49.0; extra == "tts"
25
+ Requires-Dist: hyperpyyaml; extra == "tts"
26
+ Requires-Dist: openai-whisper; extra == "tts"
27
+ Requires-Dist: tqdm; extra == "tts"
28
+ Requires-Dist: tiktoken; extra == "tts"
29
+ Requires-Dist: inflect; extra == "tts"
30
+ Requires-Dist: omegaconf; extra == "tts"
31
+ Requires-Dist: einops; extra == "tts"
32
+ Provides-Extra: streaming
33
+ Requires-Dist: minicpmo-utils[tts]; extra == "streaming"
34
+ Requires-Dist: onnxruntime>=1.18.0; extra == "streaming"
35
+ Requires-Dist: diffusers; extra == "streaming"
32
36
  Provides-Extra: gpu
33
37
  Requires-Dist: onnxruntime-gpu>=1.18.0; sys_platform == "linux" and extra == "gpu"
38
+ Provides-Extra: all
39
+ Requires-Dist: minicpmo-utils[gpu,streaming,tts]; extra == "all"
34
40
 
35
41
  ## minicpmo-utils
36
42
 
@@ -38,17 +44,32 @@ Requires-Dist: onnxruntime-gpu>=1.18.0; sys_platform == "linux" and extra == "gp
38
44
 
39
45
  ### 安装方式
40
46
 
41
- - 从源码本地安装(开发态,可编辑):
47
+ - 从源码本地安装(开发态,可编辑,默认只装公共依赖):
42
48
  ```bash
43
49
  cd minicpmo-utils
44
50
  pip install -e .
45
51
  ```
46
52
 
53
+ - 如果只想安装 cosyvoice 相关依赖(TTS):
54
+ ```bash
55
+ pip install -e .[tts]
56
+ ```
57
+
58
+ - 如果只想安装 stepaudio2 / streaming 相关依赖:
59
+ ```bash
60
+ pip install -e .[streaming]
61
+ ```
62
+
63
+ - 同时安装 cosyvoice + stepaudio2 相关依赖:
64
+ ```bash
65
+ pip install -e .[tts,streaming]
66
+ ```
67
+
47
68
  - 构建并安装 wheel(推荐分发):
48
69
  ```bash
49
70
  cd minicpmo-utils
50
71
  python -m build # 生成 dist/*.whl
51
- pip install dist/minicpmo_utils-0.1.0-py3-none-any.whl
72
+ pip install \"dist/minicpmo_utils-0.1.0-py3-none-any.whl[tts,streaming]\"
52
73
  ```
53
74
 
54
75
  ### 导入方式
@@ -5,7 +5,7 @@ cosyvoice/bin/export_onnx.py,sha256=nUHWmNTkGMowvHuXI92OR7R6v1doVsDxvxEzP5GWiQk,
5
5
  cosyvoice/bin/inference_deprecated.py,sha256=d4x-8eER00VwuOEHnObd9kd7cOriv_xbXZOAEXG60fk,6126
6
6
  cosyvoice/bin/train.py,sha256=1bpuU0d8fwc5ygrY65FbT9kfWpdZkfsXX83NBkNAMLc,8071
7
7
  cosyvoice/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- cosyvoice/cli/cosyvoice.py,sha256=WCNOWg-_CJ-y9HDxL1tFrCirnB2a030jyN5EaELke6s,12808
8
+ cosyvoice/cli/cosyvoice.py,sha256=8PSF5BY30zOwz7yqDNEggryjBqJB-FFM2SKADSYQ8-8,12577
9
9
  cosyvoice/cli/frontend.py,sha256=8z3yYsmjTpi8olTD2DNooPuW0nFnwDKSJIzPETvqv4c,13827
10
10
  cosyvoice/cli/model.py,sha256=X3Za8Ak5LEeRUldLalztoSnu6UsCP9WcYQFvu9MDacQ,24008
11
11
  cosyvoice/dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -96,7 +96,7 @@ s3tokenizer/assets/BAC009S0764W0122.wav,sha256=V2DHrOCSOkmfYF03MBHHqvZY4wSgmZpJP
96
96
  s3tokenizer/assets/mel_filters.npz,sha256=dFCucHI6XvnTQePO5ijHywF382zkLES37SvzMl8PbUw,4271
97
97
  stepaudio2/__init__.py,sha256=ahfLETm7fp_A320ERK6j2xT4nTyecy8OA8Z-syVLuQQ,1547
98
98
  stepaudio2/stepaudio2.py,sha256=hf1EZl5odF8wFqs0VqC-B_DBioHrfpzWgZN501o1-YA,9265
99
- stepaudio2/token2wav.py,sha256=eAhDCCXjf9R7F5TsNfbNP5Se256Kqq9gKIrKFh0I5qE,11642
99
+ stepaudio2/token2wav.py,sha256=BZjCWtmIP3XW1coeknbAOtv6A1eilEIWQZjqaTGgbvs,11616
100
100
  stepaudio2/utils.py,sha256=p83TqxnLAu2OyAq3eCnESlkbU9kkNdH5Tnh1Da-J7Fg,3384
101
101
  stepaudio2/cosyvoice2/__init__.py,sha256=VFv7gYSAXPuP6d6arx-EqTy8W1WbPM4lGmdmPENMWT8,44
102
102
  stepaudio2/cosyvoice2/flow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -142,7 +142,7 @@ stepaudio2/flashcosyvoice/utils/audio.py,sha256=afxVAIkV_QliIzAwyOW1QygyjZxBUXjL
142
142
  stepaudio2/flashcosyvoice/utils/context.py,sha256=y_u92r100Wp7xjs4tQd70eB00iaqUOa92qkb5sw-8ho,821
143
143
  stepaudio2/flashcosyvoice/utils/loader.py,sha256=ETQwg7E6HxndH-hWSwTcSg2Q2MWrPDTEZtb2ebZaxS0,6030
144
144
  stepaudio2/flashcosyvoice/utils/memory.py,sha256=ciip3CEUfiSGe6qOFOfsYsGi6yYFcNcZVoAjnABVp28,597
145
- minicpmo_utils-0.1.0.dist-info/METADATA,sha256=dVIxQpW56luyHDeDXMrGMnyKNgUo9VBEo61Zi1a5YCA,2120
146
- minicpmo_utils-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
147
- minicpmo_utils-0.1.0.dist-info/top_level.txt,sha256=yIeAnGCB_ihapVKakC0wqRtAwCjezcDPCC-z6Vjlt0s,49
148
- minicpmo_utils-0.1.0.dist-info/RECORD,,
145
+ minicpmo_utils-0.1.1.dist-info/METADATA,sha256=yE6QDqsXo1CD7aj13bEidVx1j9fM0w1GL4JLTIHmxpw,2867
146
+ minicpmo_utils-0.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
147
+ minicpmo_utils-0.1.1.dist-info/top_level.txt,sha256=yIeAnGCB_ihapVKakC0wqRtAwCjezcDPCC-z6Vjlt0s,49
148
+ minicpmo_utils-0.1.1.dist-info/RECORD,,
stepaudio2/token2wav.py CHANGED
@@ -7,7 +7,6 @@ import torchaudio
7
7
  import s3tokenizer
8
8
  import onnxruntime
9
9
  import numpy as np
10
- from copy import deepcopy
11
10
 
12
11
  import torchaudio.compliance.kaldi as kaldi
13
12
  from stepaudio2.flashcosyvoice.modules.hifigan import HiFTGenerator