Telegram VoIP Library for Python
Project description
pytgvoip
Telegram VoIP Library for Python
PytgVoIP is a Telegram VoIP library written in Python and C++.
It uses libtgvoip (a library used in official clients) for voice encoding and transmission, and pybind11 for simple generation of Python extension written in C++.
It is targeted to MTProto client library developers, detailed usage guide is available here.
An example of usage with Pyrogram is available here (pytgvoip_pyrogram
in PyPI), could be used as reference.
Hopefully this module support will be integrated in Pyrogram itself, also @cher-nov has plans to integrate it into Telethon as well
Features
- Python callbacks for sending and receiving audio stream frames allow flexible control
- Pre-built Windows wheels in PyPI
Requirements
- Python 3.4 or higher
Linux, MacOS: (use binary wheels from PyPI for Windows)
- libtgvoip
- CMake, C++11-compatible compiler, Python headers
Installing
pip3 install pytgvoip
Install pytgvoip_pyrogram
to use this module with Pyrogram.
Encoding audio streams
Streams consumed by libtgvoip
should be encoded in 16-bit signed PCM audio.
$ ffmpeg -i input.mp3 -f s16le -ac 1 -ar 48000 -acodec pcm_s16le input.raw # encode
$ ffmpeg -f s16le -ac 1 -ar 48000 -acodec pcm_s16le -i output.raw output.mp3 # decode
Copyright & License
- Copyright (C) 2019 bakatrouble
- Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pytgvoip-0.0.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab46d2a2e25ab09d36f2e4d0de0a6f111cd49b52bc4f23a398d4d351940b7f4 |
|
MD5 | 77361d9b44c7d3d84d5c0c09e832d9f7 |
|
BLAKE2b-256 | 9949420cd7d4b84b4d8127a9ae76ee71cddea5e39661f55641fb9e501f8771b5 |
Hashes for pytgvoip-0.0.5-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 292b8e387a42570dadd51bc1a0b4ae82d611c844757852d3faaadd742d0ab8b4 |
|
MD5 | 2c4a5b733b2e1aa2f9de74d05c85524c |
|
BLAKE2b-256 | 9b1c870c6e06504620af72e3af63a65a4f1267fbbe1b0c1180cff06d8c8cede9 |
Hashes for pytgvoip-0.0.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f511464b1172bafa005c40624ac73b97b140da105387dafa13919a54e263f35 |
|
MD5 | d64114126ac7c478e8cc2aba5e8bcc98 |
|
BLAKE2b-256 | 198dce8189504cb83cc701f1efb40398112b95aa097cb246c4bab491a98ad539 |
Hashes for pytgvoip-0.0.5-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1d02625f3ac939a6c95a7e0eb5c6ea4fc784e9b104b98d57da931c9f627791c |
|
MD5 | 8c59ae4aa94c8b5a59380459e959baaf |
|
BLAKE2b-256 | 4171cd2edc318052a17833e8afc13741db55c630bdaf0ece6a71d1c9c551fea1 |
Hashes for pytgvoip-0.0.5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5229be28e6be4bafbf71f167da28f2a3e2d825da63739855a0b0173b37769793 |
|
MD5 | 26e17688c7ef60e67df3f1881ae12cd7 |
|
BLAKE2b-256 | e385219d3eb908b30b51f4d08268a33283297e4640086d203475eb93d2791892 |
Hashes for pytgvoip-0.0.5-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d15c04e79346e011a9f126b073ba555bb52534e813f9f8b7aed5f75e735edcc8 |
|
MD5 | 927e8bdeb64e5e929293519538fefcff |
|
BLAKE2b-256 | 116d0b1ccfb1a727b659a275ac73242bb6e1cd36cb8b13a3214198630623ecf0 |
Hashes for pytgvoip-0.0.5-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb3144cf87cb4a5e6bc59bbf874cbb21b5e46881263bab266c28288174044c44 |
|
MD5 | 34c144bdb190315a309d9f3c696404de |
|
BLAKE2b-256 | 6d75deddd4c2e8fbf8b9fc08a964b4d0463a5b60d18c9b4c73287ef9be8f6526 |
Hashes for pytgvoip-0.0.5-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f461698aac9cddbb8132d0485a2941c8bcceb1a36f9bceefbe8c5a32b5522c1d |
|
MD5 | 4a7eb54b734915a3104194e4f447e96a |
|
BLAKE2b-256 | 12a953a93ffbe0b08b707540ee26ee25cc2e7d945ebf76bbf062ffa6c81d4e8e |