silk encode and decode
Project description
✨ pysilk ✨
The python binding for silk-v3-decoder
安装
pip install silk-python
使用
- 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接口的参数,当然他们都有合理的默认值
- 基于
Cython
, 关键部位 内联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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
silk-python-0.1.2.tar.gz
(224.5 kB
view hashes)
Built Distributions
Close
Hashes for silk_python-0.1.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76beaf1ba202e0f1820e93218148adcdc2c750fe9bfe60eb40d6647cc6de8e50 |
|
MD5 | 0c015b2bb99cc78d2579348fe7d468d0 |
|
BLAKE2b-256 | 22d9995f60899a9eec06408890a1f85dd6bc343f94bf3b9fe12a4852da19f12d |
Close
Hashes for silk_python-0.1.2-cp310-cp310-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff4d6d0ae698cb44def0573a66409142d7765a0e548d9648257a21b247e29fe1 |
|
MD5 | fb2358ab6d2e0a0611193b34d6dad255 |
|
BLAKE2b-256 | 4b4fa00521647a753f6b18e46effb4fea982680f8739e1dc137e7dc994b37c43 |
Close
Hashes for silk_python-0.1.2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f840b7149cbcdca72316525bf78db02bb68fc4fdfba90358f709646ddb342bb9 |
|
MD5 | bd7c6d634266c70891387e13ae643509 |
|
BLAKE2b-256 | 1cb0233ea8029843d6fb80cfdb7d7a2a3c850569901d2497987a8e20651b9e9f |
Close
Hashes for silk_python-0.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e48dddd4e16d68a8b31e3cc51a128b3c6cceeb93852f65d9762b8607f55ecf61 |
|
MD5 | e9b293d72851ebece778bcad22a4f1b1 |
|
BLAKE2b-256 | 6d50b4eceda88af124eac9b84281631595726f7982d8e1e496de8132f997a931 |
Close
Hashes for silk_python-0.1.2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08da58a23bd4c55d09007739e5417552a4c4ee08db7559fde8ae8d320ee60187 |
|
MD5 | 1acd63634c0f572fc36b3e8cf330e3cf |
|
BLAKE2b-256 | 8ac0ed7e772e144f79c3f53af80003be0e4d5f00e6f3eb6330788b732771af29 |
Close
Hashes for silk_python-0.1.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcea5a59efc9bd9443e63d96a69fc9b7a33e6d65af48028622a7e795d92a1e0f |
|
MD5 | b9a0e04549fafc04b648aff15bfe1787 |
|
BLAKE2b-256 | bb1fac1aee2efaff19ec60179e2c2fc6bb3e8b16519c2c87c6b4cab7dbd6660d |
Close
Hashes for silk_python-0.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08a7aa3ac334f1a604a0a92e154518c36a29606aee51de19120b6e31845dd66a |
|
MD5 | e2ca8ddbc2132730cfe8fc5dea6c4419 |
|
BLAKE2b-256 | 042186dcb7786802d1a36bed1049534175d358913c7779cd933b61988092d26c |
Close
Hashes for silk_python-0.1.2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ff3eb6c5f81654673c403d238334fc9ac4f8e9d1d2b68108cf15aef69601428 |
|
MD5 | 38420cddce9b3b7c622548122e109226 |
|
BLAKE2b-256 | 4283e300bde13980841f86ca79bf807f3508824653d13c2d8f12015cfce8ee73 |
Close
Hashes for silk_python-0.1.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b893cbfecf9f0a7a1ebd3d667646955c1e41fdf08d7a754f60060a386953c39f |
|
MD5 | 65c5506d327f288e2a7f2030f07e43be |
|
BLAKE2b-256 | 03c9b4a6716e5af3d51bcbceb9bbebbdf18433e36ef7e586ff4816ffbad8ee02 |
Close
Hashes for silk_python-0.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 913be12bd60a4bdcca6f82612baafbf54f000291792a63ec187ceea3c9af85af |
|
MD5 | 692c1106958b272e7995b443748cd329 |
|
BLAKE2b-256 | b89b821dd00c2fe7945f0a594f2583ab905d5fe3f68165fedd79d346d5aa6e93 |
Close
Hashes for silk_python-0.1.2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23b30c8f2ebb471eeb76b8fa25ac690f64b165e7e5def7920c5b6a5f0f89976b |
|
MD5 | 52b18ffd84563a055dad23b1a2d677dc |
|
BLAKE2b-256 | 4cff174314893c43ea4fb12ff43eba90bb9a3818b7c08cbf0b7bda6faab4d957 |
Close
Hashes for silk_python-0.1.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5922b9a969b3ca85ece88b874d5575837fa90b917ea9eed08543723079c3f5b |
|
MD5 | 32c7b693148df2fcc9b9ae4bb1cb6906 |
|
BLAKE2b-256 | 8d1c8387d1c7f2357510ac586534085de191fcfb29c26b6555008e1890464e73 |
Close
Hashes for silk_python-0.1.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a976dffa2a99516991c889c9a22a987ca87e30b159b5a65eafb2201c1681c7ba |
|
MD5 | 50dd2b22021f3e89180183fd86a0fd99 |
|
BLAKE2b-256 | bf86f9b419ee24eb33692b98f6f3302876b69f0acd07be5918de059bf81b0e9d |
Close
Hashes for silk_python-0.1.2-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c51dea359106aba0d92f252acb9ba72b1f543a9b414607ce3a11d2a50746a58b |
|
MD5 | 4e1e4a2d41f2c001f2cf7ba04e6c34d9 |
|
BLAKE2b-256 | d8904a791362bbf8f2f09e701f7587e20781a725886b601dca9a97d09f6effa9 |
Close
Hashes for silk_python-0.1.2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8ee05c340e15ceaa4bc98dd28b19ea387045a3c830497518722b868106bd922 |
|
MD5 | 2e804042d460ee768378ff2f00a04f12 |
|
BLAKE2b-256 | eb516022eed0fffb1cd9cb7b04257405bc5f900a2be8202105d40078501b3c1f |