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+)
Metadata
Release files for pytgvoip 0.0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytgvoip-0.0.7.1.tar.gz | 2.1 MB | Without provenance | Details for pytgvoip-0.0.7.1.tar.gz |
Release files / pytgvoip-0.0.7.1.tar.gz
| Download URL | pytgvoip-0.0.7.1.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24196c27211677487311dd0b5fbd843b028e9ba5b8c16d87d5130672980f54df
|
|
BLAKE2b-256 checksum How to use checksums |
dc0023d27c9ed17cce94b07852a8896be145c1e9dcb62cdd7353897c28491c0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Security for pytgvoip 0.0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.