Skip to content

synodriver/rsilk

Repository files navigation

✨ rsilk ✨

The python binding for silk-rs

pypi python implementation wheel license action

Usage

  • encode
import rsilk

with open("tests/input.pcm", "rb") as f:
    data = f.read()

output = rsilk.encode(data, 24000, 24000)
with open("output.silk", "wb") as f:
    f.write(output)
  • decode
import rsilk

with open("input.silk", "rb") as f:
    data = f.read()

output = rsilk.decode(data, 24000)
with open("output.pcm", "wb") as f:
    f.write(output)

Exceptions

  • SilkError

Public functions

  • def decode(src: bytes, sample_rate: int, frame_size: int = 0, frames_per_packet: int = 1, more_internal_decoder_frames: bool = False, in_band_fec_offset: int = 0, loss: bool = False) -> bytes

  • def encode(input: bytes, sample_rate: int, bit_rate: int, max_internal_sample_rate: int = 24000, packet_loss_percentage: int = 0, complexity: int = 2, use_inband_fec: bool = False, use_dtx: bool = False, tencent: bool = True) -> bytes

About

silk encoder and decoder for python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published