Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add numpy2 support #47

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions TTS/vc/models/freevc.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,7 @@ def load_pretrained_speaker_encoder(self):
"""Load pretrained speaker encoder model as mentioned in the paper."""
logger.info("Loading pretrained speaker encoder model ...")
self.enc_spk_ex = SpeakerEncoderEx(
"https://github.com/coqui-ai/TTS/releases/download/v0.13.0_models/speaker_encoder.pt",
device=self.device
"https://github.com/coqui-ai/TTS/releases/download/v0.13.0_models/speaker_encoder.pt", device=self.device
)

def init_multispeaker(self, config: Coqpit):
Expand Down
4 changes: 2 additions & 2 deletions TTS/vocoder/models/wavernn.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(
use_aux_net,
):
super().__init__()
self.total_scale = np.cumproduct(upsample_scales)[-1]
self.total_scale = np.cumprod(upsample_scales)[-1]
self.indent = pad * self.total_scale
self.use_aux_net = use_aux_net
if use_aux_net:
Expand Down Expand Up @@ -239,7 +239,7 @@ class of models has however remained an elusive problem. With a focus on text-to

if self.args.use_upsample_net:
assert (
np.cumproduct(self.args.upsample_factors)[-1] == config.audio.hop_length
np.cumprod(self.args.upsample_factors)[-1] == config.audio.hop_length
), " [!] upsample scales needs to be equal to hop_length"
self.upsample = UpsampleNetwork(
self.args.feat_dims,
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = [
"setuptools",
"cython~=0.29.30",
"numpy>=1.24.3",
"numpy>=2.0.0",
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -84,7 +84,7 @@ dev = [
"coverage[toml]",
"nose2",
"pre-commit",
"ruff==0.3.0",
"ruff==0.4.9",
"tomli; python_version < '3.11'",
]
# Dependencies for building the documentation
Expand Down Expand Up @@ -169,6 +169,7 @@ lint.extend-select = [
"PLR1711", # useless-return
"PLW",
"W291", # trailing-whitespace
"NPY201", # NumPy 2.0 deprecation
]

lint.ignore = [
Expand Down
2 changes: 1 addition & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ black==24.2.0
coverage[toml]
nose2
pre-commit
ruff==0.3.0
ruff==0.4.9
tomli; python_version < '3.11'
Loading