Extend pieces of your music with MusicGen AI. This desktop app lets you cut, prompt, and generate new audio extensions while preserving original context.
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.
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.
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.
Before running this application on your machine, make sure that:
- You have an Account in Replicate.
- You have an Online Server.
- Upload FFMpeg files to Modules Folder.
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.
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:
- To be validated during the setup step (GET Method):
{
"success": true,
"message": "Endpoint is active, check documentation for more details."
}
- When you need to send an audio file (POST Method):
- The file must be provided in the
filefield. - 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.
This project requires FFMpeg to process audio files after they are uploaded.
-
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/ -
Extract the downloaded files.
-
Copy the following executables into the
Modulesfolder:ffmpeg.exeffplay.exe(optional, only if you need playback features)ffprobe.exe(optional, only if you need media info features)
-
Ensure that these executables are in the same directory as
uploader.phpif you plan to run audio processing directly from the script.
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.
This script is open-source and available under the MIT License.



