cs-mel-spectrogram 1.0.1

dotnet add package cs-mel-spectrogram --version 1.0.1
NuGet\Install-Package cs-mel-spectrogram -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<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
#r "nuget: cs-mel-spectrogram, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. 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

cs-mel-spectrogram

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

Install

Run the following nuget command to install:

Install-Package cs-mel-spectrogram

Usage

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);
                return;
            }

            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 Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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,622 4/29/2018

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