fbpx

Exploring Hugging Face: Text to Audio

Exploring Hugging Face: Text to Audio

MusicGen

Photo by Maxim Berg on Unsplash

A “text-to-audio” activity usually refers to changing written textual content into (music) audio.

MusicGen (Facebook) is a mannequin that transforms textual content or audio prompts into high-quality music samples, leveraging the facility of text-to-music era.

import scipy
from transformers import pipeline
from IPython.show import Audio

synthesiser = pipeline("text-to-audio", "fb/musicgen-small")

music = synthesiser("an afro beat, round 120 bpm with upbeat feeling", forward_params={"do_sample": True})

scipy.io.wavfile.write("music.wav", charge=music["sampling_rate"], knowledge=music["audio"])

Audio("music.wav")

Read More

Sources

https://huggingface.co/fb/musicgen-small


Exploring Hugging Face: Text to Audio was initially revealed in AWS Tip on Medium, the place persons are persevering with the dialog by highlighting and responding to this story.

HI-FI News

by way of AWS Tip – Medium https://ift.tt/0ejPY2k

March 4, 2024 at 07:25PM

Select your currency