1
0
mirror of https://github.com/azlux/pymumble synced 2024-11-23 05:46:26 +00:00
Go to file
Nicola C 2ee3f82744
UDP encryption fix (#133)
* Fixed encryption

Before the fix the whole last block encrypted were appended to the encrypted output.
This caused a wrong checksum calculation and resulted in a wrong tag prepended to the packet, which the Mumble server discarded most of the times (in some lucky cases the remaining length.

To fix this I took inspiration from: https://github.com/ianling/mumpy/blob/dev/mumpy/mumblecrypto.py

* Added a default decryption plain_length
* Renamed send_udp to the existing send_packet_udp
* Removed error-prone length parameter
2023-10-31 11:13:52 +01:00
examples added example for playing music via ffmpeg 2020-12-04 21:53:41 +01:00
pymumble_py3 UDP encryption fix (#133) 2023-10-31 11:13:52 +01:00
.drone.yml fix drone workflow 2020-10-07 00:41:11 +02:00
.gitignore New version 2020-06-05 00:56:23 +02:00
API.md Better ask function and README 2021-04-21 14:32:20 +02:00
LICENSE Added two example bots and removed the useless part of GPL (#32) 2019-04-09 17:20:27 +02:00
README.md Fixed isAlive -> is_alive 2020-11-08 15:09:52 +01:00
requirements.txt First UDP attempt 2021-02-24 16:30:03 +01:00
setup.py add missing files into pypi 2020-07-12 12:11:18 +02:00
TODO Certificates implemented 2016-03-06 13:57:04 +01:00

PYMUMBLE python library

Description

This library acts as a mumble client, connecting to a murmur server, exchanging states and audio.

Build Status

The wiki/API explanation is HERE.

Installing/Getting started

Requirements

libopus is a mandatory OS library. Please refer to your package manager to install it.

With pip

  • pip install pymumble
  • You need to import pymumble_py3 as pymumble into your code.

PyPI version Deployment script is available here

With git

  • git clone https://github.com/azlux/pymumble.git
  • pip3 install -r requirements.txt
  • You need to import pymumble.pymumble_py3 as pymumble into your code.
  • It's will be the same if you use a git sub-module

CHANGELOG

The changelog is available on the release note.

Applications list using pymumble

For client application examples, you can check this list :

Features

Currently implemented:

  • Compatible with Mumble 1.3 and normally until 1.2.2
  • Support OPUS. Speex is not supported
  • Receive and send audio, get users and channels status
  • Set properties for users (mute, comments, etc.) and go to a specific channel
  • Kick and ban users
  • Callback mechanism to react on server events
  • Manage the blobs (images, long comments, etc.)
  • Can send text messages to user and channel
  • Ping statistics
  • Audio targets (whisper, etc.)
  • Read ACL groups

What is missing:

I don't need these features, so if you want one, open an issue and I will work on it.

  • UDP media. Currently it works only in TCP tunneling mode (the standard fallback of Mumble when UDP is not working)
  • Some server management features (user creation, editing ACLs, etc.)
  • Positioning is not managed, but it should be easy to add
  • Probably a lot of other small features
  • WONTFIX The Python 2 version is available in the master branch. It's working! But since we have moved on to Python 3, the Python 2 version will not receive future improvements.

Architecture

The library is based on the Mumble object, which a thread. When started, it will try to connect to the server and start exchanging the connection messages. This thread implements a loop which takes care of the pings, sends commands to the server, checks for incoming messages including audio, and checks for audio to be sent out. The rate of this loop is controlled by how long it will wait for an incoming message before continuing.

You can check if the thread is alive with mumble_object.is_alive(). The Mumble thread will stop if it disconnects from the server. This can be useful if you need to restart the thread when using a supervisor.

Thanks

  • @raylu for making pymumble speak into channels
  • @schlarpc for fixes on buffer
  • @Robert904 for the inital pymumble implementation

This library is a fork of a fork of a fork (initial from https://github.com/Robert904/pymumble). But we will try to make pymumble better. So I consider this fork (the @Azlux one) the current live fork of pymumble.