Downloads · 30 days
0
master00gwgay-s-student/Voice_Cloning
Voice_Cloning is a machine learning model from master00gwgay-s-student. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
from transformers import AutoModelForTextToSpeech, AutoProcessor
Downloads · 30 days
0
Access
Public
Updated Aug 30, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 73%
From the Hugging Face model README
from transformers import AutoModelForTextToSpeech, AutoProcessor
model_name = "speechbrain/tts-tacotron2-1jspeech" model = AutoModelForTextToSpeech.from_pretrained(model_name) processor = AutoProcessor.from_pretrained(model_name)
text = "Hello, world!" inputs = processor(text, return_tensors="pt") speech = model.generate(inputs)
with open("output.wav", "wb") as f: f.write(speech.numpy()[0])
license: apache-2.0 datasets: