Skip to content

Anyone with the horrible distorted audio for wav/mp3... #138

@DarkAlchy

Description

@DarkAlchy

The issue is the dev wrote a bad maths routine. The vae already gives the proper output so this code:

                output = (
                output.to(torch.float32)
                .div(torch.max(torch.abs(output)))
                .clamp(-1, 1)
                .mul(32767)
                .to(torch.int16)
                .cpu()
            )

Made it min, max, 0 in the output wav, and if you change that, in infer.py, to this:

            output = (
                output.to(torch.float32)
                .div(torch.max(torch.abs(output)))
                .clamp(-1, 1)
                .cpu()
            )

it should cure it as it did for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions