Spek.NET 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Spek.NET --version 0.1.0
                    
NuGet\Install-Package Spek.NET -Version 0.1.0
                    
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="Spek.NET" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Spek.NET" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Spek.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Spek.NET --version 0.1.0
                    
#r "nuget: Spek.NET, 0.1.0"
                    
#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.
#:package Spek.NET@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Spek.NET&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Spek.NET&version=0.1.0
                    
Install as a Cake Tool

Spek.NET

Spek.NET turns an audio file into a spectrogram the way Spek does, with Spek's palettes, window functions, dB scale and rulers. It has no UI. For a WinUI 3 control that draws the result, use Spek.NET.WinUI.

Spek.NET decodes with ffmpeg.exe, which it runs as a separate process. The package doesn't include ffmpeg.

using Spek.Net;

var ffmpeg = new Ffmpeg(Ffmpeg.Find([]) ?? throw new FileNotFoundException("ffmpeg isn't on PATH."));
var info = await ffmpeg.ProbeAsync(@"C:\Music\song.flac");
if (info.Error != AudioError.None) throw new InvalidOperationException(SpekDescription.ErrorText(info.Error));

var settings = new AnalysisSettings(Channel: 0, FftBits: 11, WindowFunction: WindowFunction.Hann);
var spectrogram = new Spectrogram(800, SpekDefaults.BinsFor(settings.FftBits), Palette.Spectrum, lowerDb: -120, upperDb: 0);
await SpekAnalyzer.AnalyzeAsync(ffmpeg, info, settings, spectrogram);

// spectrogram.Pixels holds 800 x 1025 BGRA pixels, with the highest frequency in the top row.
// spectrogram.GetValue(x, bin) is the level of one bin in dB.
  • Ffmpeg.ProbeAsync reads the streams, sample rate, channels, bit depth, bitrate and duration from ffmpeg's output.
  • SpekAnalyzer.AnalyzeAsync decodes one channel of one stream and fills the Spectrogram column by column, so a UI can draw it while it runs. Cancelling the token stops ffmpeg.
  • Spectrogram.SetRangeAndPalette recolours without analysing again.
  • SpectrogramPipeline is the column maths on its own, for samples from another decoder.
  • SpekDescription and Ruler give Spek's description line and ruler ticks.
  • Spectrogram.GetProfile(firstColumn, endColumn, sampleRate) measures a selected passage's spectrum. SpectrumProfile.FindDrop() returns an optional measured spectral drop, not an estimate of the original codec or bitrate. A deliberately low-pass-filtered master can produce the same result.
  • FrequencyRange handles frequency coordinates and anchored zoom. EncoderReferences.Mp3Lame lists nominal LAME stereo CBR low-pass targets as optional inspection guides, not universal MP3 boundaries.

Licensed under GPL-3.0, like Spek. Source: https://github.com/DerekYang2/FluentSpek

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Spek.NET:

Package Downloads
Spek.NET.WinUI

A WinUI 3 control that draws Spek's spectrogram of an audio file with Win2D as it decodes, and saves it as a PNG.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0-preview.1 209 10/17/2026
0.2.0 136 10/17/2026
0.1.0 118 10/15/2026