Downloads · 30 days
9
9% of all-time downloads
amaai-lab/DisfluencySpeech_BenchmarkC
DisfluencySpeech_BenchmarkC is a text-to-speech model from amaai-lab. Use it when you need text read aloud. The card lists the license as mit.
Downloads · 30 days
9
9% of all-time downloads
All-time downloads
99
Public
Repo size
709 MB
Likes
0
Public
Click a slice to open those files.
.pt653 MB · 92%
From the Hugging Face model README
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
import IPython.display as ipd
models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
"amaai-lab/DisfluencySpeech_BenchmarkC",
arg_overrides={"vocoder": "hifigan", "fp16": False, "spec-bwd-max-iter": 32}
)
model = models[0]
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
generator = task.build_generator(models, cfg)
text = "Well, that's really funny, isn't it? What a strange world we live in."
sample = TTSHubInterface.get_model_input(task, text)
sample['net_input']['src_tokens'] = sample['net_input']['src_tokens'].cuda()
sample['net_input']['src_lengths'] = sample['net_input']['src_lengths'].cuda()
wav, rate = TTSHubInterface.get_prediction(task, model.cuda(), generator, sample)
ipd.Audio(wav.cpu(), rate=rate)