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 (stefano-pytgvoip-pyrogram in PyPI), could be used as reference.
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
❤️ Donate
If this project helps you, consider buying me a coffee:
PayPal.
..and yes... 😊 the paypal account is correct. Thank you so much!
📜 License
Metadata
Release files for stefano-pytgvoip 0.1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux musl 1.2+ x86-64 | Details for stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl |
| stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_aarch64.whl | CPython 3.14 | CPython 3.14 | Linux musl 1.2+ ARM64 | Details for stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_aarch64.whl |
| stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ x86-64 | Details for stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl |
| stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_aarch64.whl | CPython 3.13 | CPython 3.13 | Linux musl 1.2+ ARM64 | Details for stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_aarch64.whl |
Total release size: 16.1 MB
Release files / stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.14 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
e7e379e9ce4a3d70192a60004b884594d86b34f7b2e75fc0c7899f9159393913
|
|
BLAKE2b-256 checksum How to use checksums |
25070bd974cd36f1b596015e3e9444939c43fcd56a509b555a6aac467cddeb8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_aarch64.whl
| Download URL | stefano_pytgvoip-0.1.0.0-cp314-cp314-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.14 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
d0c21a2c5d0d84e5d36ef0cfb63dd5be20f40ea0850980e37b14b85d1c7f098f
|
|
BLAKE2b-256 checksum How to use checksums |
c3644484dc82af6f512159d12577323714f4687af06c7ef3090ec3135cbc5846
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
7f15bf816d9530247ece6ad7321d7af7b530314f86c99752505e344e86457329
|
|
BLAKE2b-256 checksum How to use checksums |
2095955897884104cb3fbf7b158588fd99e83b734b1a9f89b4fceb0bd21bb58b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_aarch64.whl
| Download URL | stefano_pytgvoip-0.1.0.0-cp313-cp313-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.13 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
0d0db8d5fb63ab72931272ff23c759b4c8ded6b1dbae8c3f994d8ceafbae754c
|
|
BLAKE2b-256 checksum How to use checksums |
0df760edd7b17c3113df8d929d26f07fba8042d56299ae8bc42fab0e47613def
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for stefano-pytgvoip 0.1.0.0
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.