Koe
Tiny and embeddable Discord media transport library based on Netty.
Install / Use
/learn @KyokoBot/KoeREADME
koe
Tiny, minimal dependency and embeddable library implementing Discord media server protocols, built on Netty, aiming for high performance and reduced GC usage.
Versioning and stability policy
Koe follows semantic versioning. API/ABI stability is defined as follows:
- 🟢 Public API (all packages except
.experimentaland.internal) is guaranteed to be stable and is only extended when needed. Minor and patch releases preserve binary compatibility for the public API. - 🚧 Experimental API (
moe.kyokobot.koe.experimental) - APIs in this package are subject to change or removal in any minor release (e.g. 3.1, 3.2). Use only if you can tolerate breaking changes between minor versions. - 🔒 Internal API (
moe.kyokobot.koe.internal) - For internal use only. Not part of the public API; may change or break in any release, including patch releases.
Example:
repositories {
maven { url 'https://maven.lavalink.dev/releases' }
// maven { url 'https://maven.lavalink.dev/snapshots' }
}
// ...
dependencies {
implementation 'moe.kyokobot.koe:core:VERSION'
}
VERSION can be either a tag or a git commit hash (first 9 characters).
Dependencies
- Netty
- slf4j
- Java 11+
Features
- Supports voice gateway v4, v5 and v8.
- Easily extendable for stuff such as support for codecs other than Opus or video sending, if Discord ever decides to support it on bots.
- Experimental video support.
- Basic RTCP support for measuring packet loss and other stuff.
Non-goals / won't do
- Encoding - Koe only implements voice server communication, not voice handling itself, so it only accepts Opus frames and you have set up an encoder yourself, use lavaplayer, libav/ffmpeg or anything else.
- Voice receiving support - it's not supported by Discord anyway, although someone could implement it by registering hooks.
Extensions
Credits
Lavalink team for being the main consumer of Koe and providing most feedback and improvements. @TheAkio for name idea.
Koe includes modified/stripped-down parts based on following open-source projects:
- tweetnacl-java (Poly1305, SecretBox)
- nanojson (modified for bytebuf support, changed the API a bit and etc.)
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
