Standalone, pure Swift Discord voice library
The smoothest way to fly audio into Discord
- Voice Gateway
- Seamless Connect / Disconnect
- Auto-Reconnecting & Resumes
- Invisible DAVE (End-to-End Encryption) Support
- Granular State Tracking
- Playback
- Play, Pause, Resume, Stop
- Real-time Volume Control
- Dynamic
AudioMixerfor playing multiple tracks simultaneously - Track Queueing (
QueueManager)
- Audio Pipeline
- Opus Encoding / Decoding
- Smart Jitter Buffering (Sequence Sorting, PLC triggering)
- Strict Continuous Clock Frame Scheduling (20ms)
- Events
-
trackStarted&trackFinished -
onUserConnect&onUserDisconnect - Receive Voice Audio (
onAudioReceived)
-
- FFmpeg (
FFmpegSource)- Supports local files, HTTP streams, and everything FFmpeg can parse
- Youtube / SoundCloud (
FFmpegSourceviayt-dlp)- Supported automatically via
ytsearch:andscsearch:queries
- Supported automatically via
- Raw PCM (
AudioMixer/ Custom Sources)- Full support for writing your own custom
AudioSourcegenerator
- Full support for writing your own custom
- DCA / Pre-encoded Opus (
OpusSource)- Bypasses CPU-heavy encoding entirely for pre-processed
.dcafiles
- Bypasses CPU-heavy encoding entirely for pre-processed
- Comprehensive documentation is available in the
Bookdirectory. Check out the Installation Guide to get started!
- Keep in mind that Flight is heavily in active development. For issues, please open an issue in the Issues Tab.
- Flight is distributed via the Swift Package Manager. Just drop this in your
Package.swift:
dependencies: [
.package(url: "https://github.com/debaucheryparty/Flight.git", branch: "main")
]- Note: You must enable C++ Interoperability (
.interoperabilityMode(.Cxx)) on your target to use Flight's encryption suite smoothly.
- The dev environment used in this project is:
- macOS / Linux
- Swift toolchain:
Swift 6.0+ - System Dependencies:
ffmpeg,yt-dlp
- This should enable you to fork, compile, and test the project before opening a PR.
If you need help or ask for help, feel free to open a Discussion on GitHub or reach out to the maintainers!
