net8.0
silk v3 codec binding, support wechat and tencent
Published
Sep 5, 2024
2y ago
Total Downloads
2.9K
2,926
Deprecated Package Version
Reason: CriticalBugs
Install
dotnet add package DrAbc.SilkSharp --version 2.0.0
| Product | Versions |
|---|---|
| .NET |
README
SilkSharp
SilkSharp is a simple binding for silk-codec https://github.com/foyoux/silk-codec
It can convert audio in s16le format to silk v3 format
Compatible wechat and QQ
SilkSharp 是一个 silk-codec https://github.com/foyoux/silk-codec 的简单绑定
它可以将s16le格式的音频转换为silk v3格式
兼容微信和QQ格式
usage:
//Encoding
Encoder encoder = new();
//File
encoder.EncodeAsync("./rasputin.pcm", "./rasputin.silk");
//Stream
using FileStream fse = File.OpenRead("./rasputin.pcm");
using MemoryStream mse = new(await encoder.EncodeAsync(fse));
//Decoding
Decoder decoder = new();
//File
encoder.EncodeAsync("./badmoonrising.silk", "./badmoonrising.pcm");
//Stream
using FileStream fsd = File.OpenRead("./badmoonrising.silk");
using MemoryStream msd = new(await encoder.EncodeAsync(fsd));
E.g: Convert other audio to pcm (NAudio)
using NAudio.Wave;
using Mp3FileReader reader = new("input.mp3");
WaveFormat pcmFormat = new(16000, 16, 1);
using WaveFormatConversionStream conversionStream = new(pcmFormat, reader);
Encoder encoder = new()
{
//Same with your music
Rate = 16000,
FS_API = 16000,
//QQ and Wechat Compatibility
Tencent = true
};
using MemoryStream silk = new(await encoder.EncodeAsync(conversionStream));
Changes from Previous Version
No structural changes between v1.0.0 and v2.0.0.
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
NuGet marks this package as deprecated. Review the publisher's migration guidance before adopting it.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.