Vencord / Vesktop

Vesktop is a custom Discord App aiming to give you better performance and improve linux support
GNU General Public License v3.0
3.81k stars 179 forks source link

Sent voice audio is delayed ~0.5 seconds. #314

Closed CodeF53 closed 1 week ago

CodeF53 commented 9 months ago

Describe the bug When in a call, audio recorded in Vesktop experiences a delay of ~0.5 seconds before being sent

To Reproduce Apologies for the jank setup, but this is the best way I could think of to reproduce the problem.

In all calls, one person is muted and observes the audio received

  1. Start a call using a service other than Discord to provide a static reference audio channel to listen to, I used steam chat
  2. Start a call in Vesktop, say some stuff, and observe the difference between audio received in Discord vs Steam Chat
  3. Switch to the Discord's native desktop client and say some stuff, and observe the difference between audio received

Reproduction Video

https://github.com/Vencord/Vesktop/assets/37855219/3f6648ea-9b83-40fb-b24d-4a495ab5520e

I start by saying something while connected through Vesktop, and there is a noticeably large delay between audio from steam chat and audio from discord. I then switch to Discord (native desktop client), and the delay between steam chat audio and discord audio becomes very minor.

Additional info Sending party on Windows 11 Receiving party on Windows 10 Testing done on Vesktop 0.4.4 Vesktop and Discord (native desktop client) have Voice & Video audio processing stuff disabled:

lewisakura commented 9 months ago

Is this just a side effect of Discord web? Can you also perform this experiment in Chromium itself, rather than Vesktop?

CodeF53 commented 9 months ago

I will test that next time my friend is on.

Skiftstar commented 8 months ago

Is this just a side effect of Discord web? Can you also perform this experiment in Chromium itself, rather than Vesktop?

Tested in browser (chrome), as well as other discord packages like discord-screen-audio on arch linux, I checked the voice output in your Voice & Video settings:

Vesktop, Browser and Discord-Screen-Audio are delayed compared to the official discord package, so seems to be a web version issue?

ToRRent1812 commented 7 months ago

I can also confirm this. Tried armcord and vesktop, both sent my voice with delay.

yesrod commented 7 months ago

Try setting noise suppression to Standard or None (i.e. not Krisp). This got rid of the delay for me.

CodeF53 commented 7 months ago

Try setting noise suppression to Standard or None (i.e. not Krisp). This got rid of the delay for me.

This does not have any effect for me. (see the start of the issue thread, where my tests have all of that disabled). Others should try this. If it works for them, use Nvidia Broadcast or RTX Voice, since they have significantly less delay

LauraYukiko commented 6 months ago

My partner on Windows 10 is having the same issue only when running Vesktop, Discord Web is working fine. all audio settings already got played around with and nothing changed. She's using a studio mic, but we also tried lowering the sample rate and it didn't change stuff.

zxsleebu commented 4 months ago

i have the same issue. also the delay is even bigger for me, and my voice becomes choppy for some reason

graygrotesque commented 4 months ago

Same is happening here. Delay is big and I think gets even bigger after some time and my voice is choppy for other people. I can hear everyone fine though

3ri4nG0ld commented 1 month ago

Is there any solution to this?, it is very uncomfortable, especially when I am playing CS2 online with friends.

Clayrok commented 1 month ago

Same problem here. Huge delay compared to the native Discord client. Which is weird cause the official client is made with Electron and uses Chromium as well if understood correctly

ehabajmal commented 1 week ago

Hey, just tested this by stripping out pretty much everything Vencord does except loading https://discord.com/app and concluded that the delay is 99% something with electron.

You can test this yourself by cloning electron's quick start app here and replacing function createWindow() in main.js with the code block below. Login to your discord and then do a mic test (User Settings > Voice & Video > Let's Check). You'll notice the same delay exists.

function createWindow () {
  // Create the browser window.
  const mainWindow = new BrowserWindow();

  // Load discord
  mainWindow.loadURL(`https://discord.com/app`);
}
Vendicated commented 1 week ago

it's just a discord browser thing, nothing to do with vencord/vesktop. the same will happen on vanilla discord.com/app inside your browser

desktop app uses different vc protocol, web (& vesktop) uses webrtc

matt1432 commented 1 week ago

Is there a bug tracker, an issue or any way to get updates for this anywhere?

lewisakura commented 1 week ago

This is essentially unfixable for us. We aren't really in the business of writing custom native modules to use Discord's voice protocol, and since it happens on regular Discord web this isn't a bug with Vesktop.

RokeJulianLockhart commented 1 week ago

Is there a bug tracker, an issue or any way to get updates for this anywhere? ^0

@matt1432, https://support.discord.com/hc/en-us/articles/1500006052822-How-to-Report-a-Bug.