Views
No views yet
Most neural vocoders employ band-limited mel-spectrograms to generate waveforms. If full-band spectral features are used as the input, the vocoder can be provided with as much acoustic information as possible. However, in some models employing full-band mel-spectrograms, an over-smoothing problem occurs as part of which non-sharp spectrograms are generated. To address this problem, we propose UnivNet, a neural vocoder that synthesizes high-fidelity waveforms in real time. Inspired by works in the field of voice activity detection, we added a multi-resolution spectrogram discriminator that employs multiple linear spectrogram magnitudes computed using various parameter sets. Using full-band mel-spectrograms as input, we expect to generate high-resolution signals by adding a discriminator that employs spectrograms of multiple resolutions as the input. In an evaluation on a dataset containing information on hundreds of speakers, UnivNet obtained the best objective and subjective results among competing models for both seen and unseen speakers. These results, including the best subjective score for text-to-speech, demonstrate the potential for fast adaptation to new speakers without a need for training from scratch.
transformers implementation is also based).
As far as I know, there is no official model or code release by the original authors from Kakao Enterprise.transformers model and feature extractor (to prepare inputs for the model) can be downloaded as follows:1from transformers import UnivNetFeatureExtractor, UnivNetModel
2
3model_id_or_path = "dg845/univnet-dev"
4feature_extractor = UnivNetFeatureExtractor.from_pretrained(model_id_or_path)
5model = UnivNetModel.from_pretrained(model_id_or_path)transformers is as follows:1import torch
2from scipy.io.wavfile import write
3from datasets import Audio, load_dataset
4
5from transformers import UnivNetFeatureExtractor, UnivNetModel
6
7model_id_or_path = "dg845/univnet-dev"
8model = UnivNetModel.from_pretrained(model_id_or_path)
9feature_extractor = UnivNetFeatureExtractor.from_pretrained(model_id_or_path)
10
11ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
12# Resample the audio to the model and feature extractor's sampling rate.
13ds = ds.cast_column("audio", Audio(sampling_rate=feature_extractor.sampling_rate))
14# Pad the end of the converted waveforms to reduce artifacts at the end of the output audio samples.
15inputs = feature_extractor(
16 ds[0]["audio"]["array"], sampling_rate=ds[0]["audio"]["sampling_rate"], pad_end=True, return_tensors="pt"
17)
18
19with torch.no_grad():
20 audio = model(**inputs)
21
22# Remove the extra padding at the end of the output.
23audio = feature_extractor.batch_decode(**audio)[0]
24# Convert to wav file
25write("sample_audio.wav", feature_extractor.sampling_rate, audio)