Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harmonyland/harmony_voice
Discord Voice API implementation for Deno, built on modern Web Streams API.
https://github.com/harmonyland/harmony_voice
deno discord-voice music typescript udp voice wasm
Last synced: 3 months ago
JSON representation
Discord Voice API implementation for Deno, built on modern Web Streams API.
- Host: GitHub
- URL: https://github.com/harmonyland/harmony_voice
- Owner: harmonyland
- License: apache-2.0
- Created: 2021-04-16T04:15:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-15T12:45:40.000Z (about 3 years ago)
- Last Synced: 2024-04-14T05:29:46.208Z (10 months ago)
- Topics: deno, discord-voice, music, typescript, udp, voice, wasm
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# harmony_voice
Discord Voice API implementation for Deno.
## Features
- Built on modern Web Streams API.
- Works with any Discord API library with some effort.
- Experimental Voice Receive support.## Usage
```ts
const conn = new VoiceConnect(botUserID);
// Obtained from VOICE_STATE_UPDATE Gateway Event
conn.voiceStateUpdate({ channelID, guildID, sessionID });
// Obtained from VOICE_SERVER_UPDATE
conn.voiceServerUpdate({ token, endpoint });conn.connect();
// To play something
const player = conn.player();
pcmStreamFromSomewhere.pipeTo(player.writable);// ytdl_core example
const player = conn.player();
const info = await getInfo("id"); // from x/ytdl_corenew PCMStream(stream.formats.find((e) => e.hasAudio && !e.hasVideo)!.url)
.pipeTo(player.writable);
```## License
Check [LICENSE](./LICENSE) for more info.
Copyright 2022 © DjDeveloperr