How to use the nnmnkwii.preprocessing.preemphasis function in nnmnkwii

To help you get started, we’ve selected a few nnmnkwii examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github r9y9 / nnmnkwii / tests / test_preprocessing.py View on Github external
def test_preemphasis():
    for dtype in [np.float32, np.float64]:
        np.random.seed(1234)
        x = np.random.rand(16000 * 5).astype(dtype)
        y = preemphasis(x, 0.97)
        assert x.shape == y.shape
        assert x.dtype == y.dtype
        x_hat = inv_preemphasis(y, 0.97)
        assert x_hat.dtype == x.dtype
        assert np.allclose(x_hat, x, atol=1e-5)

    x = np.random.rand(16000)
    assert np.allclose(P.preemphasis(x, 0), x)
    assert np.allclose(P.inv_preemphasis(P.preemphasis(x, 0), 0), x)
github r9y9 / nnmnkwii / tests / test_preprocessing.py View on Github external
def test_preemphasis():
    for dtype in [np.float32, np.float64]:
        np.random.seed(1234)
        x = np.random.rand(16000 * 5).astype(dtype)
        y = preemphasis(x, 0.97)
        assert x.shape == y.shape
        assert x.dtype == y.dtype
        x_hat = inv_preemphasis(y, 0.97)
        assert x_hat.dtype == x.dtype
        assert np.allclose(x_hat, x, atol=1e-5)

    x = np.random.rand(16000)
    assert np.allclose(P.preemphasis(x, 0), x)
    assert np.allclose(P.inv_preemphasis(P.preemphasis(x, 0), 0), x)
github hash2430 / dv3_world / audio.py View on Github external
def preemphasis(x):
    from nnmnkwii.preprocessing import preemphasis
    return preemphasis(x, hparams.preemphasis)
github G-Wang / Text2Speech-Pytorch / tts / preprocess / audio.py View on Github external
def preemphasis(x):
    from nnmnkwii.preprocessing import preemphasis
    return preemphasis(x, hparams.preemphasis)
github SforAiDl / Neural-Voice-Cloning-With-Few-Samples / dv3 / audio.py View on Github external
def preemphasis(x):
    from nnmnkwii.preprocessing import preemphasis
    return preemphasis(x, hparams.preemphasis)
github Sharad24 / Neural-Voice-Cloning-with-Few-Samples / deepvoice3_pytorch / audio.py View on Github external
def preemphasis(x):
    from nnmnkwii.preprocessing import preemphasis
    return preemphasis(x, hparams.preemphasis)
github G-Wang / WaveRNN-Pytorch / audio.py View on Github external
def preemphasis(x):
    from nnmnkwii.preprocessing import preemphasis
    return preemphasis(x, hparams.preemphasis)