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.5 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.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0729baec01cfeee2c777a72c9b76bfafe3cce596bdbf3a30622882dddda370c |
|
MD5 | 963d262f0cd781c39e8a5a6bb3a37664 |
|
BLAKE2b-256 | aa2dc9105f9dc1a7726458d1f839b55845be144b9757ee5de286389056081099 |
Hashes for pytgvoip-0.0.6-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 470d1f7c5dcea06d3c0dc671707c7adcceb858b31b5de03e32885160585e3545 |
|
MD5 | d96af398349e928025863784d6453d79 |
|
BLAKE2b-256 | 7b257698a505475a9fedbb82acbaa0ac3ee5fbd6dabc8f32c5496275d3bbb264 |
Hashes for pytgvoip-0.0.6-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ca94c333b1c8d5f62cf24d09767ca8b1cc159e43d8e54d57758af90f493dd2e |
|
MD5 | bb6bd8994825d7befa7c2ddf190e577f |
|
BLAKE2b-256 | eb07872d6c508afd9d34ba849c98c6fd1b46b5723e8eed79d26a9d2a475f71fc |
Hashes for pytgvoip-0.0.6-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67acbfb3e7c1754302c82082bf550c9c7687d3768128ce3ef055fc7892c967ea |
|
MD5 | f41e1f87abf4a633f8f4fb4f2962fce9 |
|
BLAKE2b-256 | 5c6cfcc0d5023dddd09a2b2c9108204232ed4d62d530a899338ccf69d55a8e4c |
Hashes for pytgvoip-0.0.6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96696bcb686296e488dcc2bf87dd9a4340bcbaf1eeeff4c31faa6714427d6524 |
|
MD5 | 1db3f3b37f7ad989451fdb2a58f96e35 |
|
BLAKE2b-256 | c0c64ce20a705912493089af03017167ba608254fb3b5fd5e52eda4c6915f242 |
Hashes for pytgvoip-0.0.6-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e6d23e91c34bd5ad577a9c45888a873db7b9d610c4325322b1bf35dbd852b54 |
|
MD5 | 5a39d6cb8a173b0e7bb63e168a056ce2 |
|
BLAKE2b-256 | 6007a0176bc6eaa3c39a6923a2bb7f0010887aac7667dafc3c61f3f56bc5df9e |
Hashes for pytgvoip-0.0.6-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f502d8fdd57455cf13cdf05c87a842a6b55fccce859222f98ab90543098a658a |
|
MD5 | 760f7298b3c4613cbd29c7994da400b0 |
|
BLAKE2b-256 | 359d5e997cc2036e28e6f08669b9a524cf65b9968979527a90152b05b28fd4b4 |
Hashes for pytgvoip-0.0.6-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39baaaec1d16585f9825123fbd8610f19ee5c9b35a6617d82499c0c3fd46f77b |
|
MD5 | 896762bb4954b17bec78711ea020b984 |
|
BLAKE2b-256 | a03cdbe89430609b394b4244d6be2d505d407ef6c4b25b34f36c95db316ee0f2 |