VocGAN | Fidelity Real-time Vocoder | Speech library

 by   rishikksh20 Python Version: Current License: MIT

kandi X-RAY | VocGAN Summary

kandi X-RAY | VocGAN Summary

VocGAN is a Python library typically used in Artificial Intelligence, Speech, Deep Learning, Pytorch, Generative adversarial networks applications. VocGAN has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

This repo implements modified version of VocGAN: A High-Fidelity Real-time Vocoder with a Hierarchically-nested Adversarial Network using Pytorch, for actual VocGAN checkout to baseline branch. I bit modify the VocGAN's generator and used Full-Band MelGAN's discriminator instead of VocGAN's discriminator, as in my research I found MelGAN's discriminator is very fast while training and enough powerful to train Generator to produce high fidelity voice whereas VocGAN Hierarchically-nested JCU discriminator is quite huge and extremely slows the training process. Tested on Python 3.6.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              VocGAN has a low active ecosystem.
              It has 178 star(s) with 39 fork(s). There are 11 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 8 have been closed. On average issues are closed in 16 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of VocGAN is current.

            kandi-Quality Quality

              VocGAN has 0 bugs and 0 code smells.

            kandi-Security Security

              VocGAN has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              VocGAN code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              VocGAN is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              VocGAN releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              VocGAN saves you 619 person hours of effort in developing the same functionality from scratch.
              It has 1446 lines of code, 83 functions and 22 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed VocGAN and discovered the below as its top functions. This is intended to give you an instant insight into VocGAN implemented functionality, and help decide if they suit your requirements.
            • Train the model
            • Validate audio
            • Calculate the total number of trainable parameters
            • Evaluate the model
            • Compute mel spectrum
            • Generate a signal with grill - fit
            • Compute a squared window of a window
            • Inverse transform
            • Calculate the spectral loss function
            • Compute the Fourier Transform
            • Inverse inference function
            • Perform a forward transformation
            • Computes the mel spectrum of the spectrum
            • Read a wav file
            • Create a data loader
            • Load HParam from a string
            • Calculates the inverse of the transformation
            • Transform the input_data into a reconstruction matrix
            Get all kandi verified functions for this library.

            VocGAN Key Features

            No Key Features are available at this moment for VocGAN.

            VocGAN Examples and Code Snippets

            No Code Snippets are available at this moment for VocGAN.

            Community Discussions

            Trending Discussions on VocGAN

            QUESTION

            About the usage of vocoders
            Asked 2022-Feb-01 at 23:05

            I'm quite new to AI and I'm currently developing a model for non-parallel voice conversions. One confusing problem that I have is the use of vocoders.

            So my model needs Mel spectrograms as the input and the current model that I'm working on is using the MelGAN vocoder (Github link) which can generate 22050Hz Mel spectrograms from raw wav files (which is what I need) and back. I recently tried WaveGlow Vocoder (PyPI link) which can also generate Mel spectrograms from raw wav files and back.

            But, in other models such as, WaveRNN , VocGAN , WaveGrad There's no clear explanation about wav to Mel spectrograms generation. Do most of these models don't require the wav to Mel spectrograms feature because they largely cater to TTS models like Tacotron? or is it possible that all of these have that feature and I'm just not aware of it?

            A clarification would be highly appreciated.

            ...

            ANSWER

            Answered 2022-Feb-01 at 23:05
            How neural vocoders handle audio -> mel

            Check e.g. this part of the MelGAN code: https://github.com/descriptinc/melgan-neurips/blob/master/mel2wav/modules.py#L26

            Specifically, the Audio2Mel module simply uses standard methods to create log-magnitude mel spectrograms like this:

            • Compute the STFT by applying the Fourier transform to windows of the input audio,
            • Take the magnitude of the resulting complex spectrogram,
            • Multiply the magnitude spectrogram by a mel filter matrix. Note that they actually get this matrix from librosa!
            • Take the logarithm of the resulting mel spectrogram.
            Regarding the confusion

            Your confusion might stem from the fact that, usually, authors of Deep Learning papers only mean their mel-to-audio "decoder" when they talk about "vocoders" -- the audio-to-mel part is always more or less the same. I say this might be confusing since, to my understanding, the classical meaning of the term "vocoder" includes both an encoder and a decoder.

            Unfortunately, these methods will not always work exactly in the same manner as there are e.g. different methods to create the mel filter matrix, different padding conventions etc.

            For example, librosa.stft has a center argument that will pad the audio before applying the STFT, while tensorflow.signal.stft does not have this (it would require manual padding beforehand).

            An example for the different methods to create mel filters would be the htk argument in librosa.filters.mel, which switches between the "HTK" method and "Slaney". Again taking Tensorflow as an example, tf.signal.linear_to_mel_weight_matrix does not support this argument and always uses the HTK method. Unfortunately, I am not familiar with torchaudio, so I don't know if you need to be careful there, as well.

            Finally, there are of course many parameters such as the STFT window size, hop length, the frequencies covered by the mel filters etc, and changing these relative to what a reference implementation used may impact your results. Since different code repositories likely use slightly different parameters, I suppose the answer to your question "will every method do the operation(to create a mel spectrogram) in the same manner?" is "not really". At the end of the day, you will have to settle for one set of parameters either way...

            Bonus: Why are these all only decoders and the encoder is always the same?

            The direction Mel -> Audio is hard. Not even Mel -> ("normal") spectrogram is well-defined since the conversion to mel spectrum is lossy and cannot be inverted. Finally, converting a spectrogram to audio is difficult since the phase needs to be estimated. You may be familiar with methods like Griffin-Lim (again, librosa has it so you can try it out). These produce noisy, low-quality audio. So the research focuses on improving this process using powerful models.

            On the other hand, Audio -> Mel is simple, well-defined and fast. There is no need to define "custom encoders".

            Now, a whole different question is whether mel spectrograms are a "good" encoding. Using methods like variational autoencoders, you could perhaps find better (e.g. more compact, less lossy) audio encodings. These would include custom encoders and decoders and you would not get away with standard librosa functions...

            Source https://stackoverflow.com/questions/70942123

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install VocGAN

            You can download it from GitHub.
            You can use VocGAN like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rishikksh20/VocGAN.git

          • CLI

            gh repo clone rishikksh20/VocGAN

          • sshUrl

            git@github.com:rishikksh20/VocGAN.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link