terminal-discord / weechat-discord

Weechat plugin for Discord support - https://weechat.org/ https://discord.com/
MIT License
177 stars 16 forks source link

Voice chat support #48

Open h1nk opened 4 years ago

h1nk commented 4 years ago

Depending on how hackable the ncurses interface is would it be possible to have actual voice chat support?

Noskcaj19 commented 4 years ago

I actually (very briefly) experimented with this in discord-voice-cli. It would certainly be possible to incorporate it into weechat with commands and probably a custom buffer. In fact incorporating it would probably be quite simple.

Unfortunately sound is quite difficult and I would need to implement Voice Activity Detection and implement proper bitrate conversions, and I have no experience with either of those. It is however something I would like to do.

Noskcaj19 commented 4 years ago

Opus (or SILK?) should perform the Voice Activity Detection, however I have not had much luck figuring out how to access it from the decoder api. Bitrate conversions should be fairly straightforward, as it should be a fairly common procedure.

h1nk commented 4 years ago

Personally I've always used push-to-talk, maybe it'd be easier to start off with just a global push to talk system (then again global Xorg PTT might actually be even more work than a voice activity detection system)? Also I wanted to ask if it'd be possible to nest clients in the buflist itself without creating a custom buffer (which would probably have to be awkwardly placed in addition to the other default buffers) like:

┌─────────────────────────────────────────────────────────────────────────────────────┐
│weechat      │                                                               │person1|
│discord      │                                                               |person2│
│  #general   │                                                               │person3|
│  #blah      │                                                               │person4|
│  @voice1    │                                                               │       │
│    ○ person1│                                                               │       │
│    ● person2|                                                               │       │
│    ○ person3│                                                               │       │
│    ○ person4│                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │                                                               │       │
│             │_______________________________________________________________|       │
│             │[person1]█                                                     |       │
└─────────────────────────────────────────────────────────────────────────────────────┘

I'm going to guess it's not possible unless some seriously severe hacking is done to weechat-curses/libncurses itself.

Noskcaj19 commented 4 years ago

A global push to talk might actually be a viable option. (I only know the macOS way of doing this, but it looks like there may be some crates to do it.)

As far as more nesting in the buflist, it would appear it might be quite easy. It think it's possible for the config strings to access hdata and maybe localvars, which would mean it should be fairly easy to support Discord specific formats.