Simple Skype-silk codec kotlin native wrapper. No dependencies needed.
Supports: linuxX64, linuxArm64, mingwX64.
JVM & macOS is not supported yet.
repositories {
maven("https://repo.rtast.cn/packages/")
}
sourceSets {
commonMain.dependencies {
implementation("cn.rtast.silk-codec:silk-codec:0.0.1")
}
}https://repo.rtast.cn/packages/-/cn.rtast.silk-codec:silk-codec
fun main() {
val samplePCM = SystemFileSystem.source(Path("src/commonTest/resources/sample.pcm")).buffered()
.use { it.readByteArray() }
val encoded: ByteArray = encodeToSilk(samplePCM)
val decodeBack: ByteArray = decodeFromSilk(encoded)
println(encoded.toHexString())
println(decodeBack.toHexString())
}Only supports input/output PCM format, also compat Tencent QQ/WeChat format
fun main() {
val encoded: ByteArray = encodeToSilk(samplePCM, flag = SilkFlag.Tencent)
}Skype LICENSE -> LICENSE
NOTICE -> NOTICE
silk-codec open source under Apache-2.0