How to install Audiocraft (Meta’s open source audio generation tool) locally, create long songs and integrate it into an existing codebase

<p>On Friday, June 9, 2023, Meta unveiled yet another amazing AI tool: Audiocraft. It is a music generator and audio processing tool powered by deep learning. In contrast to Google&rsquo;s MusicLM, Audiocraft is an open-source platform, providing users with the freedom to explore and experiment as much as they desire. Today, we will delve into the process of installing it and learning how to extend the duration limit (120 seconds) so we can create full-length songs. We will also examine how to import and use Audiocraft in a Streamlit app, so you can also integrate it with your projects.</p> <p>Examples:</p> <p><iframe frameborder="0" height="166" scrolling="no" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F1536177184%26show_artwork%3Dtrue&amp;display_name=SoundCloud&amp;url=https%3A%2F%2Fsoundcloud.com%2Fal_musica%2Findie-bolero-audiocraft-experiment%3Fsi%3D2d1f71ecf34e4df199c878640ecfd3d4%26utm_source%3Dclipboard%26utm_medium%3Dtext%26utm_campaign%3Dsocial_sharing&amp;image=https%3A%2F%2Fi1.sndcdn.com%2Fartworks-6ju0wQb7BGfxSM8N-F466tQ-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" title="Indie Bolero (audiocraft experiment) by A L" width="680"></iframe></p> <p><iframe frameborder="0" height="166" scrolling="no" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F1536178339%26show_artwork%3Dtrue&amp;display_name=SoundCloud&amp;url=https%3A%2F%2Fsoundcloud.com%2Fal_musica%2Flofi-bolero-audiocraft-experiment%3Fsi%3D6035ca14aab0452fb90c266e1763c7f0%26utm_source%3Dclipboard%26utm_medium%3Dtext%26utm_campaign%3Dsocial_sharing&amp;image=https%3A%2F%2Fi1.sndcdn.com%2Fartworks-6ju0wQb7BGfxSM8N-F466tQ-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" title="Lofi - Bolero (audiocraft experiment) by A L" width="680"></iframe></p> <p>You need to have&nbsp;<a href="https://www.python.org/downloads/release/python-3913/" rel="noopener ugc nofollow" target="_blank">Python 3.9</a>&nbsp;(tested with 3.10 too) and pip installed on your machine, as well as pytorch &ge;2.0 and ffmpeg.</p> <p><a href="https://medium.com/@alfredolhuissier/how-to-install-audiocraft-meta-ai-music-generation-ai-locally-on-mac-and-windows-too-f340ceb75ada"><strong>Learn More</strong></a></p>