Skip to main content

base16384 encode and decode

Project description

✨ pysilk-cffi ✨

The cffi binding for silk-v3-decoder

pypi python implementation wheel license action

安装

pip install pysilk-cffi

使用

  • encode
import pysilk

with open("verybiginput.pcm", "rb") as pcm, open("output.silk", "wb") as silk:
    pysilk.encode(pcm, silk, 24000, 24000)
  • decode
import pysilk

with open("verybiginput.silk", "rb") as silk, open("output.pcm", "wb") as pcm:
    pysilk.decode(silk, pcm, 24000)

支持功能

  • 接受任何二进制的file-like object,比如BytesIO,可以流式解码大文件
  • 包装了silk的全部C接口的参数,当然他们都有合理的默认值

公开函数

from typing import BinaryIO

def encode(input: BinaryIO, output: BinaryIO, 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: ...
def decode(input: BinaryIO, output: BinaryIO, 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: ...

公开异常

class SilkError(Exception):
    pass

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysilk_cffi-0.1.0.dev1-cp38-cp38-win_amd64.whl (114.0 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

Details for the file pysilk_cffi-0.1.0.dev1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pysilk_cffi-0.1.0.dev1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 114.0 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.11

File hashes

Hashes for pysilk_cffi-0.1.0.dev1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 42e8f6043d732a17e3f2352f673084eb023d053764af28ceb810183de10a71e7
MD5 f8ce03a3a0f4845519d360c4c8459e73
BLAKE2b-256 f1439cd7541ba35c0767d113d83af8f55ac08d7c62a2a3ff8980b82114e5851c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page