cs-mel-spectrogram 1.0.1

.NET Framework 4.6.1
Install-Package cs-mel-spectrogram -Version 1.0.1
dotnet add package cs-mel-spectrogram --version 1.0.1
<PackageReference Include="cs-mel-spectrogram" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add cs-mel-spectrogram --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: cs-mel-spectrogram, 1.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install cs-mel-spectrogram as a Cake Addin
#addin nuget:?package=cs-mel-spectrogram&version=1.0.1

// Install cs-mel-spectrogram as a Cake Tool
#tool nuget:?package=cs-mel-spectrogram&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


Convert audio file to melgram (that is, me-spectrogram) in .NET


Run the following nuget command to install:

Install-Package cs-mel-spectrogram


The sample code below shows how to use the MelGram to convert an (any) audio file to a mel-spectrogram image:

using System;
using System.Drawing;
using System.IO;

namespace MelGram
    class Program
        static void Main(string[] args)
            MelSpectrogram gram = new MelSpectrogram();
            string dataDirPath = Path.Combine(IOUtils.AssemblyDirectory, "..", "..", "..", "..", "gtzan", "genres");
            if (!Directory.Exists(dataDirPath))
                Console.WriteLine("{0} does not exists", dataDirPath);

            string[] subDirectories = Directory.GetDirectories(dataDirPath);
            foreach (string subDirectory in subDirectories)
                string[] files = Directory.GetFiles(subDirectory, "*.au");
                foreach (string file in files)
                    Console.WriteLine("Converting: {0}", file);
                    Bitmap img = gram.Convert(file, 48);
                    img.Save(file + ".png");

Product Versions
.NET Framework net461 net462 net463 net47 net471 net472 net48
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 1,220 4/29/2018

Audio to Mel-Spectrogram in .NET 4.6.1 and x64 Build