Log file
Log file
❯ cd spark-test
❯ ls
❯ git clone https://github.com/SparkAudio/Spark-TTS.git
Cloning into 'Spark-TTS'...
remote: Enumerating objects: 260, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 260 (delta 24), reused 24 (delta 24), pack-reused 231 (from 1)
Receiving objects: 100% (260/260), 7.02 MiB | 6.36 MiB/s, done.
Resolving deltas: 100% (99/99), done.
❯ cd Spark-TTS
❯ ls
LICENSE README.md cli example
requirements.txt sparktts src webui.py
❯ conda create -n sparktts -y python=3.12
zsh: command not found: conda
❯ python3 -m venv env
❯ source env/bin/activate
❯ pip install --upgrade setuptools
Collecting setuptools
Downloading setuptools-68.0.0-py3-none-any.whl (804 kB)
|████████████████████████████████| 804 kB 912 kB/s
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 47.1.0
Uninstalling setuptools-47.1.0:
Successfully uninstalled setuptools-47.1.0
Successfully installed setuptools-68.0.0
WARNING: You are using pip version 20.1.1; however, version 24.0 is available.
You should consider upgrading via the '/Users/macmini/Documents/spark-test/Spark-
TTS/env/bin/python3 -m pip install --upgrade pip' command.
❯ pip install --upgrade pip
Collecting pip
Downloading pip-24.0-py3-none-any.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 734 kB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.1.1
Uninstalling pip-20.1.1:
Successfully uninstalled pip-20.1.1
Successfully installed pip-24.0
❯ pip install -r requirements.txt
ERROR: Ignored the following versions that require a different python version:
0.6.2rc0 Requires-Python >=3.8; 0.7.0 Requires-Python >=3.8; 0.7.0rc1 Requires-
Python >=3.8; 0.7.0rc2 Requires-Python >=3.8; 0.8.0 Requires-Python >=3.8; 0.8.1
Requires-Python >=3.8
ERROR: Could not find a version that satisfies the requirement einops==0.8.1 (from
versions: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1, 0.5.0, 0.6.0, 0.6.1)
ERROR: No matching distribution found for einops==0.8.1
❯ python3 --version
Python 3.7.8
❯ python --version
Python 3.7.8
❯ python --versions
unknown option --versions
usage: /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/
Contents/MacOS/Python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
❯ python --version
Python 3.7.8
❯ ls -ls /usr/bin/python*
24 -rwxr-xr-x 78 root wheel 118848 4 Feb 22:57 /usr/bin/python3
❯ yum list installed
zsh: command not found: yum
❯ ython --version && python3 --version
ERROR: Could not find a version that satisfies the requirement einops==0.8.1 (from
versions: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1, 0.5.0, 0.6.0, 0.6.1)
ERROR: No matching distribution found for einops==0.8.1
❯ python3 --version
Python 3.7.8
❯ python --version
Python 3.7.8
❯ python --versions
unknown option --versions
usage: /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/
Contents/MacOS/Python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
❯ python --version
Python 3.7.8
❯ ls -ls /usr/bin/python*
24 -rwxr-xr-x 78 root wheel 118848 4 Feb 22:57 /usr/bin/python3
❯ yum list installed
zsh: command not found: yum
❯ ython --version && python3 --version
If you do not need a specific version of Python, and always want Homebrew's
`python3` in your PATH:
brew install python3
See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺 /usr/local/Cellar/[email protected]/3.12.9: 3,271 files, 61.5MB
==> Running `brew cleanup [email protected]`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> [email protected]
Python is installed as
/usr/local/bin/python3.12
If you do not need a specific version of Python, and always want Homebrew's
`python3` in your PATH:
brew install python3
See: https://docs.brew.sh/Homebrew-and-Python
❯ python --version
Python 3.7.8
❯ python3 --version
Python 3.7.8
❯ python2 --version
zsh: command not found: python2
❯ python --version
Python 3.7.8
❯ python3.12 -m venv env12
❯ source env12/bin/activate
❯ which python
/Users/macmini/Documents/spark-test/Spark-TTS/env12/bin/python
❯ python --version
Python 3.12.9
❯ pip install --upgrade setuptools
Collecting setuptools
Downloading setuptools-76.0.0-py3-none-any.whl.metadata (6.7 kB)
Downloading setuptools-76.0.0-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 35.1 MB/s eta 0:00:00
Installing collected packages: setuptools
Successfully installed setuptools-76.0.0
Traceback (most recent call last): File "<frozen runpy>", line 198, in
_run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/inference.py", line 19,
in <module>
import torch
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/__init__.py", line 1477, in <module>
from .functional import * # noqa: F403
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/functional.py", line 9, in <module>
import torch.nn.functional as F
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/__init__.py", line 1, in <module>
from .modules import * # noqa: F403
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/__init__.py", line 35, in <module>
from .transformer import TransformerEncoder, TransformerDecoder, \
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/transformer.py", line 20, in <module>
device: torch.device = torch.device(torch._C._get_default_device()), #
torch.device('cpu'),
/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-packages/
torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy:
_ARRAY_API not found (Triggered internally at
/Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), #
torch.device('cpu'),
The cache for model files in Transformers v4.22.0 has been updated. Migrating your
old cache. This is a one-time only operation. You can interrupt this and resume the
migration later on by calling `transformers.utils.move_cache()`.
0it [00:00, ?it/s]
2025-03-10 15:41:52,668 - INFO - Using model from: pretrained_models/Spark-TTS-0.5B
2025-03-10 15:41:52,668 - INFO - Saving audio to: example/results
/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-packages/
torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is
deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of
torch.nn.utils.parametrizations.weight_norm.")
Missing tensor: mel_transformer.spectrogram.window
Missing tensor: mel_transformer.mel_scale.fb
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/inference.py", line 104,
in <module>
run_tts(args)
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/inference.py", line 75,
in run_tts
model = SparkTTS(args.model_dir, device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/SparkTTS.py", line 44, in
__init__
self._initialize_inference()
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/SparkTTS.py", line 50, in
_initialize_inference
self.audio_tokenizer = BiCodecTokenizer(self.model_dir, device=self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/macmini/Documents/spark-test/Spark-TTS/sparktts/models/audio_tokenizer.py",
line 42, in __init__
self._initialize_model()
File
"/Users/macmini/Documents/spark-test/Spark-TTS/sparktts/models/audio_tokenizer.py",
line 46, in _initialize_model
self.model = BiCodec.load_from_checkpoint(f"{self.model_dir}/BiCodec").to(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 1152, in to
return self._apply(convert)
^^^^^^^^^^^^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 802, in _apply
module._apply(fn)
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 802, in _apply
module._apply(fn)
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 802, in _apply
module._apply(fn)
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 825, in _apply
param_applied = fn(param)
^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 1150, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None,
non_blocking)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/cuda/__init__.py", line 293, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
❯ cat infer.sh
#!/bin/bash
source sparktts/utils/parse_options.sh
# Run inference
python -m cli.inference \
--text "${text}" \
--device "${device}" \
--save_dir "${save_dir}" \
--model_dir "${model_dir}" \
--prompt_text "${prompt_text}" \
--prompt_speech_path "${prompt_speech_path}"
%
❯ bash infer.sh
Traceback (most recent call last): File "<frozen runpy>", line 198, in
_run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/inference.py", line 19,
in <module>
import torch
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/__init__.py", line 1477, in <module>
from .functional import * # noqa: F403
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/functional.py", line 9, in <module>
import torch.nn.functional as F
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/__init__.py", line 1, in <module>
from .modules import * # noqa: F403
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/__init__.py", line 35, in <module>
from .transformer import TransformerEncoder, TransformerDecoder, \
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/transformer.py", line 20, in <module>
device: torch.device = torch.device(torch._C._get_default_device()), #
torch.device('cpu'),
/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-packages/
torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy:
_ARRAY_API not found (Triggered internally at
/Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), #
torch.device('cpu'),
2025-03-10 15:44:38,661 - INFO - Using model from: pretrained_models/Spark-TTS-0.5B
2025-03-10 15:44:38,661 - INFO - Saving audio to: example/results
/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-packages/
torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is
deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of
torch.nn.utils.parametrizations.weight_norm.")
Missing tensor: mel_transformer.spectrogram.window
Missing tensor: mel_transformer.mel_scale.fb
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/inference.py", line 104,
in <module>
run_tts(args)
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/inference.py", line 75,
in run_tts
model = SparkTTS(args.model_dir, device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/SparkTTS.py", line 44, in
__init__
self._initialize_inference()
File "/Users/macmini/Documents/spark-test/Spark-TTS/cli/SparkTTS.py", line 50, in
_initialize_inference
self.audio_tokenizer = BiCodecTokenizer(self.model_dir, device=self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/macmini/Documents/spark-test/Spark-TTS/sparktts/models/audio_tokenizer.py",
line 42, in __init__
self._initialize_model()
File
"/Users/macmini/Documents/spark-test/Spark-TTS/sparktts/models/audio_tokenizer.py",
line 46, in _initialize_model
self.model = BiCodec.load_from_checkpoint(f"{self.model_dir}/BiCodec").to(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 1152, in to
return self._apply(convert)
^^^^^^^^^^^^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 802, in _apply
module._apply(fn)
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 802, in _apply
module._apply(fn)
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 802, in _apply
module._apply(fn)
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 825, in _apply
param_applied = fn(param)
^^^^^^^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/nn/modules/module.py", line 1150, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None,
non_blocking)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^
File "/Users/macmini/Documents/spark-test/Spark-TTS/env12/lib/python3.12/site-
packages/torch/cuda/__init__.py", line 293, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled