MWONGOZO WA AI wa Sauti

MuzikiGen

MusicGen is Meta's open-weight text-to-music model, published in June 2023, that writes music as a sequence of compressed audio tokens using a single transformer language model.

Sikiliza mwongozo huuInaonyeshwa na AI · ~8 min

Katika ukurasa huudk 9 kusoma
  1. Muhtasari
  2. Mambo muhimu ya kuchukua
  3. Dive ya kina
  4. Generating and checking a short MusicGen clip
  5. Utekelezaji wa Ulimwengu Halisi
  6. Mustakabali wa MuzikiGen
  7. Kuiweka katika vitendo
  8. Vyanzo na kusoma zaidi
  9. Endelea Kuchunguza
  10. Maswali yanayoulizwa mara kwa mara

Muhtasari

It can follow a text description such as a genre and mood, or a hummed or played melody, and outputs 32 kHz audio. Its code is MIT-licensed, while its weights are licensed for non-commercial use.

Mambo muhimu ya kuchukua

  1. MusicGen is a single-stage transformer that generates EnCodec audio tokens from a text description and, optionally, a melody.
  2. Meta released MusicGen weights and code as part of AudioCraft on 2 August 2023.
  3. MusicGen was trained on about 20,000 hours of licensed music and comes in 300M, 1.5B and 3.3B parameter sizes.
  4. The delay interleaving pattern turns 30 seconds of four-codebook audio into about 1,500 autoregressive steps.
  5. MusicGen cannot produce realistic vocals, because vocals were removed from its training data.
  6. MusicGen code is MIT-licensed, but its model weights are CC-BY-NC 4.0, which prohibits commercial use.

Dive ya kina

MusicGen is a model that generates music from a text description, optionally guided by a melody. It was introduced by Jade Copet and colleagues at Meta AI in the paper "Simple and Controllable Music Generation", first posted to arXiv in June 2023. It works the way a text language model does, predicting the next token from the previous ones, except that its tokens represent short slices of compressed audio rather than words. A separate neural audio codec turns those tokens back into sound. The word simple in the title refers to the design: one transformer generates everything in a single stage, instead of the chain of models that earlier systems such as Google's MusicLM used to go from coarse to fine detail.

The first ingredient is EnCodec, a neural audio codec from the same Meta team, described in an October 2022 paper. A codec compresses audio into a compact form and reconstructs it. The MusicGen version takes 32 kHz mono audio, downsamples it by a stride of 640 samples to 50 frames per second, and represents each frame with residual vector quantization (RVQ): four codebooks of 2,048 entries each, where the first codebook captures the coarse content and each later codebook encodes what the previous ones missed. Thirty seconds of music therefore becomes 1,500 frames, each with four tokens.

The second ingredient is how those four parallel token streams are fed to one transformer. Predicting all 6,000 tokens of a 30-second clip one by one, called flattening, is accurate but slow. Predicting all four codebooks of a frame at once, called parallel, is fast but ignores dependencies between them. MusicGen's default "delay" pattern offsets each codebook by one step, so at each step the model predicts codebook 1 for the current frame, codebook 2 for the previous frame, and so on. The paper says this turns 30 seconds of audio into 1,500 autoregressive steps. In its ablation, flattening still scored best, delay came close, and parallel was worst.

Conditioning steers the generation. Text prompts are encoded by a frozen T5 text encoder, and the paper also tested FLAN-T5 and CLAP. For melody, the model reads a chromagram, a representation of how much energy falls in each of the 12 pitch classes over time. The authors found that the raw chromagram led the model to copy the original track, so they kept only the dominant pitch class at each step and used Demucs, a source-separation model, to remove drums and bass first, because those dominated the chromagram. Generation uses classifier-free guidance: during training the condition is dropped 20% of the time, and at inference the model blends conditioned and unconditioned predictions with a guidance scale of 3.0 to follow the prompt more closely.

Training used about 20,000 hours of licensed music: an internal set of 10,000 high-quality tracks plus 25,000 and 365,000 instrument-only tracks from the ShutterStock and Pond5 collections, all at 32 kHz with text descriptions and metadata. The team trained models of 300 million, 1.5 billion and 3.3 billion parameters for one million steps on 30-second crops, using 32, 64 and 96 GPUs respectively. Meta announced the model publicly on 2 August 2023 as part of AudioCraft, alongside AudioGen for sound effects and an improved EnCodec decoder. The Hugging Face model card says the version 1 models were trained between April and May 2023.

On the MusicCaps benchmark of expert-written music descriptions, MusicGen compared well. Frechet Audio Distance (FAD), which measures how far generated audio statistics are from real audio, was 3.1 for the 300M model, against 4.0 reported for MusicLM, 7.5 for Mousai and 14.8 for Riffusion; Noise2Music reported the best FAD at 2.1. In human ratings on a 1 to 100 scale, the 3.3B model scored 84.81 for overall quality and the 1.5B model 83.70 for relevance to the text, against 80.51 and 82.35 for the public MusicLM demo. The authors note that larger models did not always improve automatic metrics even when listeners preferred them. With melody conditioning, the similarity between the reference and generated chromagrams rose from 0.10 to 0.66. A stereo variant, fine-tuned from the mono model with eight codebooks, was rated higher than mono.

Compared with alternatives, MusicGen's main trade is simplicity for some control. Hierarchical systems like MusicLM cascade several models, which the MusicGen authors avoided. Diffusion-based systems such as Riffusion and Mousai generate spectrograms or latents through iterative denoising rather than token by token. Within token-based models, MusicGen's interleaving patterns are its distinguishing choice. Its open release is also a difference: Meta published weights and code, while MusicLM's implementation was not public at the time of the paper.

The limitations are stated by Meta itself. The model card says MusicGen cannot generate realistic vocals, because vocals were removed from training data; works best with English descriptions; performs unevenly across musical styles and cultures; sometimes collapses to silence at the end of a song; and may need prompt engineering. The paper's authors note that their method offers no fine-grained control over how closely the output follows the conditioning beyond classifier-free guidance, and that the dataset contains a larger proportion of Western-style music. They also raise the concern that generative models could compete unfairly with artists. The weights are licensed CC-BY-NC 4.0, which rules out commercial use, even though the code is MIT-licensed. In practice, running MusicGen requires Python, PyTorch and ffmpeg per the AudioCraft README, and a GPU is advisable for the larger checkpoints; the model card's examples generate clips of a few seconds at a time.

04Mfano uliofanya kazi

Generating and checking a short MusicGen clip

  1. Install Hugging Face Transformers version 4.31.0 or later and scipy, and confirm the use is non-commercial under the CC-BY-NC 4.0 weight license.

  2. Load facebook/musicgen-small through the text-to-audio pipeline to keep memory use low for a first test.

  3. Generate a clip from the prompt 'lo-fi hip hop beat with soft piano and vinyl crackle' and save the returned 32 kHz array as a WAV file.

  4. Generate a second clip from the same prompt and listen to both; sampling with top-k makes each run different.

  5. Change one element of the prompt, such as swapping piano for saxophone, and check whether the instrumentation changes accordingly.

  6. Compare with the melody checkpoint by supplying a short reference melody and listening for whether the tune carries over.

Nini inaonyesha

Two or more short instrumental clips at 32 kHz that reflect the prompt's genre and instruments. Check them by listening for prompt adherence, for any collapse to silence near the end, and by noting that no realistic vocals appear, both of which match the limitations in Meta's model card.

Utekelezaji wa Ulimwengu Halisi

Meta released MusicGen with AudioGen and EnCodec as the AudioCraft framework on 2 August 2023, publishing model weights and training code so researchers could train models on their own data.

Melody conditioning: the MusicGen melody checkpoint extracts a chromagram from a reference track after removing drums and bass, then generates new music that follows that tune while matching a text prompt.

Researchers load the small, medium, large or melody checkpoints through Hugging Face Transformers (version 4.31.0 or later) with the text-to-audio pipeline to produce mono 32 kHz clips.

In the paper's listening tests on MusicCaps, the 3.3B-parameter MusicGen scored 84.81 out of 100 for overall quality, above the 80.51 measured for the public MusicLM demo.

The AudioCraft repository later added related research models such as MAGNeT, a non-autoregressive text-to-music model, and AudioSeal for audio watermarking, built on the same codebase.

Mustakabali wa MuzikiGen

The MusicGen paper names its own open problems: finer control over how strictly output follows its conditioning, and better data augmentation and guidance for audio conditioning such as melodies. Meta's August 2023 announcement acknowledged that the training data skews toward Western-style music and English-only descriptions, which limits the model's range. Since 2023, the AudioCraft repository has grown to include MAGNeT, a non-autoregressive text-to-music and text-to-sound model, MusicGen Style, JASCO for conditioning on chords, melodies and drum tracks, and AudioSeal for watermarking generated audio, which shows the research direction toward faster generation, richer musical controls and provenance tools. Questions about training-data licensing, attribution and the economic effect on working musicians remain unresolved across the field, and the MusicGen authors flagged unfair competition for artists as an open issue. Evaluations using shared benchmarks such as MusicCaps, together with human listening tests, remain the main way to compare newer music models with MusicGen.

Kuiweka katika vitendo

Kwa nini ni muhimu

  • Kufikia na kufikia. Huboresha ufikiaji kupitia manukuu, simulizi na violesura vya sauti.
  • Gharama na bajeti. Timu za media zinaweza kusafirisha sauti iliyoboreshwa haraka na bajeti ndogo.
  • Kasi na kiwango. Mifumo inayowakabili wateja inaweza kuchakata mwingiliano wa mazungumzo kwa kiwango kikubwa.

Jihadharini na

  • Hatari za matumizi mabaya ya sauti na uigaji huongezeka wakati kibali kinakosekana.
  • Usahihi unaweza kushuka katika lafudhi, lahaja au mazingira yenye kelele.
  • Sauti ya syntetisk inaweza kudhaniwa kimakosa kuwa usemi halisi bila kuweka lebo wazi.

Hatua zinazofuata

  1. Pata idhini ya moja kwa moja ya kunasa sauti, kuunda na kutumia tena.
  2. Jaribu ubora kwenye spika na hali mbalimbali za usuli.
  3. Bainisha wakati ni lazima binadamu akague au aidhinishe matokeo.
  4. Weka lebo sauti ya sintetiki na uhifadhi rekodi za asili kwa uwajibikaji.

Vyanzo na kusoma zaidi

  1. arXiv (Meta AI)Kizazi rahisi na kinachoweza kudhibitiwa cha muziki
  2. GitHub (facebookresearch)AudioCraft: Open source code for audio generation
  3. Hugging Facefacebook/musicgen-large model card
  4. Meta AIAudioCraft: A simple one-stop shop for audio modeling
  5. arXiv (Meta AI)High Fidelity Neural Audio Compression

Endelea Kuchunguza

Jarida halali

Pata taarifa ya kila siku ya AI

Hadithi tatu za AI zilizothibitishwa kila asubuhi ya wiki, zimetengenezwa kwa Kiingereza rahisi. Bila malipo daima, hakuna matangazo.

Barua pepe moja kila siku ya wiki. Jiondoe kwa bonyeza moja. Hatutauza au kushiriki anwani yako.

Jijaribu mwenyewe

Take the MusicGen quiz

Maoni ya haraka juu ya kila jibu, na cheti kinachoweza kushirikishwa na kitambulisho kinachoweza kuthibitishwa baada ya kupita kozi.

Anza chemsha bongo

Changia elimu ya AI bila malipo. AI Understanding ni 501(c)(3) isiyo na faida — hakuna matangazo, hakuna kizuizi cha malipo, daima. Toa mchango

Maswali yanayoulizwa mara kwa mara

MusicGen ni nini?

MusicGen is Meta's open-weight text-to-music model, published in June 2023, that writes music as a sequence of compressed audio tokens using a single transformer language model. It can follow a text description such as a genre and mood, or a hummed or played melody, and outputs 32 kHz audio. Its code is MIT-licensed, while its weights are licensed for non-commercial use.

Which input can a melody-conditioned MusicGen variant accept in addition to text?

The melody-conditioned variant can use a text description and a reference melody; this input is not available in every text-only checkpoint.

Ni kodeki gani ya neural hutoa tokeni za sauti ambazo MusicGen inatabiri?

Miundo ya MusicGen tokeni tofauti zinazozalishwa na Meta kodeki ya EnCodec, ambayo pia hutenganisha tokeni zilizotabiriwa kuwa sauti.

How does MusicGen model multiple EnCodec code streams?

The architecture uses delayed interleaving in a single-stage autoregressive model; “single-stage” does not mean the whole song is generated in one forward pass.

Je, MusicGen inafuataje wimbo uliotolewa bila kunakili rekodi halisi?

Chromagram inanasa ni aina gani za sauti zipo kwa wakati, na kuruhusu MusicGen ilingane na uwiano na mtaro wa wimbo bila kutoa tena timbre asili.

Ni mradi na kampuni gani iliyotolewa MusicGen?

MusicGen ilitolewa mwaka wa 2023 kama sehemu ya Meta mradi wa AudioCraft wa AI, ukiwa na msimbo wazi na uzani wa mfano.