Files
derp/Containerfile
user d884d2bb55 refactor: switch Mumble voice to pymumble transport
asyncio's SSL memory-BIO transport silently drops voice packets even
though text works fine. pymumble uses blocking ssl.SSLSocket.send()
which reliably delivers voice data.

- Rewrite MumbleBot to use pymumble for connection, SSL, ping, and
  voice encoding/sending
- Bridge pymumble thread callbacks to asyncio via
  run_coroutine_threadsafe for text dispatch
- Voice via sound_output.add_sound(pcm) -- pymumble handles Opus
  encoding, packetization, and timing
- Remove custom protobuf codec, voice varint, and opus ctypes wrapper
- Add container patches for pymumble ssl.wrap_socket (Python 3.13) and
  opuslib find_library (musl/Alpine)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:15:42 +01:00

18 lines
496 B
Docker

FROM python:3.13-alpine
RUN apk add --no-cache opus ffmpeg yt-dlp && \
ln -s /usr/lib/libopus.so.0 /usr/lib/libopus.so
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Patch pymumble for Python 3.13 (ssl.wrap_socket was removed)
COPY patches/apply_pymumble_ssl.py /tmp/apply_pymumble_ssl.py
RUN python3 /tmp/apply_pymumble_ssl.py && rm /tmp/apply_pymumble_ssl.py
ENV PYTHONPATH=/app/src
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["python", "-m", "derp"]