Skip to main content

silk v3 codec CSCore extensions, support WeChat and QQ

Total Downloads
114
114
Published
Aug 26, 2026
1mo ago

Get Started

dotnet add package DrAbc.SilkCodec.CSCore --version 1.0.0
ProductVersions
.NET
net10.0-windows7.0net8.0-windows7.0
Other
.NETFramework4.7.2

README

SilkCodec.NET.CSCore

CSCore extensions for SilkCodec.NET. Convert any CSCore-readable audio format to Silk v3, and decode Silk v3 to WAV, PCM, MP3, AAC/M4A or WMA.

Windows only (net10.0-windows, net8.0-windows, net472). Compressed formats use Media Foundation.

Install

dotnet add package SilkCodec.NET.CSCore

Encode

using SilkCodec.NET;
using SilkCodec.NET.CSCore;
using CSCore;
using CSCore.Codecs;

var encoder = new SilkEncoder(new SilkEncoderOptions
{
    SampleRate = 24000,
    BitRate = 25000,
    Tencent = true
});

byte[] silk = encoder.EncodeFile("voice.mp3");
encoder.EncodeFile("voice.wav", "voice.silk");

using IWaveSource source = CodecFactory.Instance.GetCodec("voice.flac");
byte[] fromSource = encoder.Encode(source);
byte[] fromExtension = source.ToSilk(encoder.Options);

.pcm, .raw and .s16le files are treated as signed 16-bit little-endian mono at encoder.Options.SampleRate.

Decode

var decoder = new SilkDecoder(new SilkDecoderOptions { SampleRate = 24000 });

decoder.DecodeFile("voice.silk", "voice.wav");
decoder.DecodeFile("voice.silk", "voice.mp3");
byte[] wav = decoder.DecodeToWav(File.ReadAllBytes("voice.silk"));

using IWaveSource wave = decoder.DecodeToWaveSource(File.ReadAllBytes("voice.silk"));

Output format is inferred from the file extension: .wav, .pcm/.raw/.s16le, .mp3, .m4a/.aac/.mp4, .wma.

MP3, AAC and WMA encoding may resample to 44.1 kHz because Windows Media Foundation often rejects 24 kHz mono.

License

MIT (Expat), see the repository LICENSE.

Downloads by Version

Not enough data for chart

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.