EzAudio
1.0.0

? Ezaudio是一种基于扩散的文本到原告生成模型。 Ezaudio专为现实世界的音频应用而设计,将高质量的音频综合汇集在一起,计算需求较低。
?与Ezaudio一起玩文本,编辑和介绍:Ezaudio Space
?可用Ezaudio-Controlnet:Ezaudio-Controlnet空间
克隆存储库:
git clone [email protected]:haidog-yaqub/EzAudio.git
安装依赖项:
cd EzAudio
pip install -r requirements.txt
下载CheckPonts(可选):https://huggingface.co/opensound/ezaudio
您可以将模型与以下代码使用:
from api . ezaudio import EzAudio
import torch
import soundfile as sf
# load model
device = 'cuda' if torch . cuda . is_available () else 'cpu'
ezaudio = EzAudio ( model_name = 's3_xl' , device = device )
# text to audio genertation
prompt = "a dog barking in the distance"
sr , audio = ezaudio . generate_audio ( prompt )
sf . write ( f' { prompt } .wav' , audio , sr )
# audio inpainting
prompt = "A train passes by, blowing its horns"
original_audio = 'ref.wav'
sr , audio = ezaudio . editing_audio ( prompt , boundary = 2 , gt_file = original_audio ,
mask_start = 1 , mask_length = 5 )
sf . write ( f' { prompt } _edit.wav' , audio , sr )如果您发现该代码对您的研究有用,请考虑引用:
@article { hai2024ezaudio ,
title = { EzAudio: Enhancing Text-to-Audio Generation with Efficient Diffusion Transformer } ,
author = { Hai, Jiarui and Xu, Yong and Zhang, Hao and Li, Chenxing and Wang, Helin and Elhilali, Mounya and Yu, Dong } ,
journal = { arXiv preprint arXiv:2409.10819 } ,
year = { 2024 }
}一些代码是从或启发的:U-Vit,Pixel-Art,Huyuan-Dit和稳定的音频。