Blazingly fast MVSep API client PowerShell module
Install-Module mvsepclient -Scope CurrentUser-
PowerShell core
-
RequiredModules (installed automatically)
-
API key. Get yours here
Import-Module mvsepclient
# Get your API token from https://mvsep.com/user-api
$client = [MvsepClient]::new("YOUR_API_KEY")
# Get available algorithms
$algos = $client.GetAlgorithms()The module provides a CLI interface via Invoke-MvSepClient (alias: MvSepClient):
Import-Module mvsepclientInvoke-MvSepClient get-types --token YOUR_API_KEY
# Or use the alias :)
MvSepClient algorithms --token YOUR_API_KEYMvSepClient separate --input song.mp3 --output ./output --token YOUR_API_KEY --sep_type 48Wait for processing to complete and download automatically:
MvSepClient separate --input song.mp3 --output ./output --token YOUR_API_KEY --sep_type 48 --waitMvSepClient separate --input ./audio --output ./output --token YOUR_API_KEY --sep_type 48MvSepClient get-result --hash YOUR_HASH --output ./output --token YOUR_API_KEYMvSepClient queue --token YOUR_API_KEYMvSepClient news --token YOUR_API_KEY --lang en --limit 10MvSepClient history --token YOUR_API_KEY --start 0 --limit 20# Enable premium
MvSepClient premium-enable --token YOUR_API_KEY
# Disable premium
MvSepClient premium-disable --token YOUR_API_KEY# Enable long filenames
MvSepClient long-filenames-enable --token YOUR_API_KEY
# Disable long filenames
MvSepClient long-filenames-disable --token YOUR_API_KEYImport-Module mvsepclient
# Basic usage
$client = [MvsepClient]::new("YOUR_API_KEY")
# With custom retries
$client = [MvsepClient]::new("YOUR_API_KEY", 60, 30)
# Or use the static factory method
$client = [MvsepClient]::New("YOUR_API_KEY")$algos = $client.GetAlgorithms()
# Or use static method (no instance needed)
$algos = [MvsepClient]::GetAlgorithmsStatic()# For a local file
$params = @{
audiofile = "song.mp3"
sep_type = 48 # MelBand Roformer
add_opt1 = 1
output_format = 1 # WAV
}
$result = $client.CreateSeparation($params)
if ($result.success) {
$hash = $result.data.hash
Write-Host "Created task: $hash"
}$hash = "YOUR_TASK_HASH"
# Poll for status
for ($i = 0; $i -lt 30; $i++) {
$status = $client.GetSeparationStatus($hash)
if ($status.status -eq "done") {
Write-Host "Processing complete!"
break
}
if ($status.status -in @("failed", "error")) {
Write-Host "Processing failed"
break
}
Start-Sleep -Seconds 20
}
# Download files
foreach ($file in $status.data.files) {
$url = $file.url.Replace('\/', '/')
$client.DownloadTrack($url, "./output/$($file.download)")
}$options = @{
sep_type = 48 # MelBand Roformer
add_opt1 = 1
output_format = 1 # WAV
}
$client.ProcessDirectory("./input", "./output", $options)# Instance method
$queue = $client.GetQueueInfo()
# Static method
$queue = [MvsepClient]::GetQueueInfoStatic()# Instance method
$news = $client.GetNews("en", 0, 10)
# Static method
$news = [MvsepClient]::GetNewsStatic("en", 0, 10)$history = $client.GetHistory(0, 20)$client.EnablePremium()
$client.DisablePremium()$client.EnableLongFilenames()
$client.DisableLongFilenames()$result = $client.CreateQualityEntry(
"path/to/results.zip",
"MelBand Roformer",
"Test results",
0, # dataset_type
0, # ensemble
"" # password (optional)
)| ID | Name | Description |
|---|---|---|
| 48 | MelBand Roformer | Vocals, instrumental |
| 40 | BS Roformer | Vocals, instrumental |
| 20 | Demucs4 HT | Vocals, drums, bass, other |
| 25 | MDX23C | Vocals, instrumental |
| 46 | SCNet | Vocals, instrumental |
| 9 | Ultimate Vocal Remover VR | Vocals, music |
| 26 | Ensemble | Vocals, instrum |
| 28 | Ensemble All-In | Multiple stems |
For the complete list, run:
MvSepClient get-types --token YOUR_API_KEYThis project is licensed under the WTFPL License.