Skip to content

micilini/MusicExtensor

Repository files navigation

Music Extensor Flow For Windows (0.0.1)

Extend pieces of your music with MusicGen AI. This desktop app lets you cut, prompt, and generate new audio extensions while preserving original context.

Music Extensor Flow

Music Extensor Flow

With Music Extendor Flow, you can select an audio (.wav, .mp3 or .flac), select a 10-second track you want to record, and send it to MusicGen (Artificial Intelligence) so it continues to extend the music for you.

How to install this application?

This application is made for Windows (x86/x64) and can be downloaded in Releases Page. Don't forget to see the topic What do you need to know after running this application on your machine? to understand the steps you need to do before running the app.

How to runs this application locally?

This application was made using the following technologies:

  • C#
  • Windows Presentation Foundation (WPF)
  • Python
  • ReactJS

To run this application on your local machine, make sure you have the latest version of Visual Studio Community 2022.

First of all, clone the repository to your local machine, and then simply open the MusicExtensor.sln file to open the project.

If you want to make any changes to the application's layout, simply modify the existing files within the WebModel folder. It was built with ReactJS and has functions that communicate with C# through the WebView2 library.

Just don't forget to run npm install to download the ReactJS dependencies, and npm run build to generate the folder containing the static files, which will be read by C#.

Furthermore, behind the scenes, C# calls a Python library that communicates directly with MusicGen through the Replicate SDK. If you want to change the logic of this file, simply open the Modules > MusicGenHook.py file.

Don't forget to use PyInstaller to generate a single executable file.

What do you need to know after running this application on your machine?

Before running this application on your machine, make sure that:

  1. You have an Account in Replicate.
  2. You have an Online Server.
  3. Upload FFMpeg files to Modules Folder.

Setup an Account in Replicate

First of all, you need to have an account on Replicate.com to have access to one of the music generation models, which is MusicGen.

If you need help during the API creation process, just follow this link.

Setup your own Online Server

Next, make sure you have an online server capable of receiving audio files in POST format to make them publicly available on the internet (MusicGen needs to consume them this way).

Inside the Modules folder, there is a file called uploader.php that simulates an audio receiving API, with the goal of making it public.

It's important to note that Music Extensor Flow expects to receive the following response from the server:

  1. To be validated during the setup step (GET Method):
{
"success": true,
"message": "Endpoint is active, check documentation for more details."
}
  1. When you need to send an audio file (POST Method):
  • The file must be provided in the file field.
  • Allowed file extensions: .mp3, .wav, .flac.
  • Maximum file size: 50MB (can be changed).
  • The uploaded file will be saved on the server with the fixed name cut_audio.<extension>, overwriting any previous upload (in real logic you can change this).

After a successful upload, the server responds with a JSON object like this:

{
  "success": true,
  "message": "File uploaded successfully.",
  "url": "http(s)://<host>/<path_to>/cut_audio.<extension>",
  "filename": "cut_audio.<extension>"
}

Important: The uploader.php file is for illustrative purposes only. In real environments, I recommend creating a more secure and robust structure.

Download FFMpeg executables and put in Modules Folder

This project requires FFMpeg to process audio files after they are uploaded.

  1. Download the FFMpeg executables from the official website:
    https://ffmpeg.org/download.html
    or from the prebuilt binaries repository:
    https://www.gyan.dev/ffmpeg/builds/

  2. Extract the downloaded files.

  3. Copy the following executables into the Modules folder:

    • ffmpeg.exe
    • ffplay.exe (optional, only if you need playback features)
    • ffprobe.exe (optional, only if you need media info features)
  4. Ensure that these executables are in the same directory as uploader.php if you plan to run audio processing directly from the script.

Application Images

Imagem 1 Imagem 2 Imagem 3

Contribuite

Want to create new features for Minimal Text Editor (Lite)? Then make sure you create a new feature (or a new translation file) and submit a new Pull Request (PR).

Feel free to open new Pull Requests (PR) whenever you create new bug fixes or new translations.

License

This script is open-source and available under the MIT License.

About

Extend pieces of your music with MusicGen AI. This desktop app lets you cut, prompt, and generate new audio extensions while preserving original context.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors