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

TypeError: SynthesizerTrn.__init__() missing 1 required positional argument: 'n_speakers' #1026

Closed
2 tasks done
mirfan899 opened this issue Nov 21, 2023 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@mirfan899
Copy link

Describe the bug

Trying to use the latest release and getting this error

To Reproduce

use 4.1.31

taylorswift_model = Svc(
        net_g_path="./logs/44k/TaylorSwift/G_106400.pth",
        config_path="./logs/44k/TaylorSwift/config.json",
        cluster_model_path=None,
        device=get_optimal_device()
    )


audio, _ = librosa.load(iput, sr=taylorswift_model.target_sample)

audio = taylorswift_model.infer_silence(
    audio.astype(np.float32),
    speaker=0,
    transpose=0,
    auto_predict_f0=False,
    cluster_infer_ratio=float(0),
    noise_scale=float(0.4),
    f0_method="dio",
    db_thresh=-40,
    pad_seconds=float(0.5),
    chunk_seconds=float(0.5),
    absolute_thresh=False,
    max_chunk_seconds=float(40),
)
soundfile.write(str(oput), audio, taylorswift_model.target_sample)

Additional context

No response

Version

4.1.31

Platform

Ubuntu 20.04

Code of Conduct

  • I agree to follow this project's Code of Conduct.

No Duplicate

  • I have checked existing issues to avoid duplicates.
@mirfan899 mirfan899 added the bug Something isn't working label Nov 21, 2023
@34j
Copy link
Collaborator

34j commented Nov 22, 2023

Your config file needs to have that key, would be better to
generate it using pre-config

@mirfan899
Copy link
Author

my mistake, the config was missing the n_speakers key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants