古风汉服美女图集
导语: unit_hifigan_mhubert_vp_en_...,

facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur


unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur

Speech-to-speech translation model from fairseq S2UT (paper/code):

  • Spanish-English
  • Trained on mTEDx, CoVoST 2, Europarl-ST and VoxPopuli


Usage

import json<br /> import os<br /> from pathlib import Path<br /> import IPython.display as ipd<br /> from fairseq import hub_utils<br /> from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub<br /> from fairseq.models.speech_to_text.hub_interface import S2THubInterface<br /> from fairseq.models.text_to_speech import CodeHiFiGANVocoder<br /> from fairseq.models.text_to_speech.hub_interface import VocoderHubInterface<br /> from huggingface_hub import snapshot_download<br /> import torchaudio<br /> cache_dir = os.getenv("HUGGINGFACE_HUB_CACHE")<br /> #models, cfg, task = load_model_ensemble_and_task_from_hf_hub(<br /> # "facebook/xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022",<br /> # arg_overrides={"config_yaml": "config.yaml", "task": "speech_to_text"},<br /> # cache_dir=cache_dir,<br /> # )<br /> # model = models[0].cpu()<br /> # cfg["task"].cpu = True<br /> # generator = task.build_generator([model], cfg)<br /> # # requires 16000Hz mono channel audio<br /> # audio, _ = torchaudio.load("/Users/lpw/git/api-inference-community/docker_images/fairseq/tests/samples/sample2.flac")<br /> # sample = S2THubInterface.get_model_input(task, audio)<br /> # unit = S2THubInterface.get_prediction(task, model, generator, sample)<br /> # speech synthesis<br /> library_name = "fairseq"<br /> cache_dir = (<br /> cache_dir or (Path.home() / ".cache" / library_name).as_posix()<br /> )<br /> cache_dir = snapshot_download(<br /> f"facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur", cache_dir=cache_dir, library_name=library_name<br /> )<br /> x = hub_utils.from_pretrained(<br /> cache_dir,<br /> "model.pt",<br /> ".",<br /> archive_map=CodeHiFiGANVocoder.hub_models(),<br /> config_yaml="config.json",<br /> fp16=False,<br /> is_vocoder=True,<br /> )<br /> with open(f"{x['args']['data']}/config.json") as f:<br /> vocoder_cfg = json.load(f)<br /> assert (<br /> len(x["args"]["model_path"]) == 1<br /> ), "Too many vocoder models in the input"<br /> vocoder = CodeHiFiGANVocoder(x["args"]["model_path"][0], vocoder_cfg)<br /> tts_model = VocoderHubInterface(vocoder_cfg, vocoder)<br /> tts_sample = tts_model.get_model_input(unit)<br /> wav, sr = tts_model.get_prediction(tts_sample)<br /> ipd.Audio(wav, rate=sr)<br />


收录说明:
1、本网页并非 facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur 官网网址页面,此页面内容编录于互联网,只作展示之用;2、如果有与 facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur 相关业务事宜,请访问其网站并获取联系方式;3、本站与 facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur 无任何关系,对于 facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur 网站中的信息,请用户谨慎辨识其真伪。4、本站收录 facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur 时,此站内容访问正常,如遇跳转非法网站,有可能此网站被非法入侵或者已更换新网址,导致旧网址被非法使用,5、如果你是网站站长或者负责人,不想被收录请邮件删除:i-hu#Foxmail.com (#换@)

前往AI网址导航
1、本文来自 AIGC网址导航 投稿的内容 facebook/unit_hifigan_mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj_dur ,所有言论和图片纯属作者个人意见,版权归原作者所有;不代表 本站 立场;
2、本站所有文章、图片、资源等如果未标明原创,均为收集自互联网公开资源;分享的图片、资源、视频等,出镜模特均为成年女性正常写真内容,版权归原作者所有,仅作为个人学习、研究以及欣赏!如有涉及下载请24小时内删除;
3、如果您发现本站上有侵犯您的权益的作品,请与我们取得联系,我们会及时修改、删除并致以最深的歉意。邮箱: i-hu#(#换@)foxmail.com

2023-12-26

2023-12-26

古风汉服美女图集
扫一扫二维码分享