Facepunch / garrysmod-requests

Feature requests for Garry's Mod
83 stars 24 forks source link

Raise the voice chat quality #479

Closed Leystryku closed 4 years ago

Leystryku commented 9 years ago

Hello, May you please change the voice sample rate from 11025 to 32000 ( #define VOICE_OUTPUT_SAMPLE_RATE 11025 // Sample rate that we feed to the mixer. | engine/audio/public/voice.h ) and default sv_use_steam_voice to 0?

By raising the voice sample rate from 11025 to 32000 the quality becomes decent. 11025 is the ~current quality and it sounds really bad, 22050 sounds better but is still "metallic", 32000 sounds good and 44100/48000 sounds nice, however, since it's voice chat the best is to do a compromise between quality and data size so 32000 would be perfect. Thanks.

Exho1 commented 9 years ago

+1 for not sounding like I'm speaking through a toaster

EthanTheGreat commented 9 years ago

+1 for not sounding like I'm stuck inside the toaster.

polivilas commented 9 years ago

+1 for making my dubstep HD

gspetrou commented 9 years ago

+1 for toaster dubstep

robotboy655 commented 9 years ago

Stop with the "+1" spam, it is not helping anyone.

UltimateByte commented 9 years ago

I'm just gonna try to ask the good questions here as audio is my main job. (I'm specialized into recording and mixing but btw, i got some general audio knowledge i can share) First, let's clarify something : As it's apparently lossy compressed audio, sample rate isn't enough to quantify audio quality, you have to tell about the bitrate too. Of course, sample rate affects the maximum frequency you'll be able to hear. A very good ear can hear from 20hz to around 22000hz (22Khz). So let's say that's we want to achieve. The max audio frequency rendered is half the sample rate of a digital file. so it means in order to generate an audio signal up to 22Khz, you need a sample rate of at least 44Khz. Audio CD standard sample rate is 44.1Khz. Isn't that perfect ? (video is 48Khz but whatever, fck video)

Just wondering : would this really be hard for a server to handle 44,1Khz ? Would this make a noticeable difference ? Even with 20 people speaking, it seems like it could handle it just as a TeamSpeak server does : without using CPU and with negligible bandwidth, for a server... BTW, i won't troll too much here, but if only that was bound to another CPU thread.. that wouldn't even be a question.

What's the codec GMod uses already ? Speex ? Does GMod have a way to change it or is it bound to source engine ?

Maybe something a little bit better (if not already available) like opus voice used in TeamSpeak would be great already. http://www.opus-codec.org/ It supports up to 48Khz and from 6 to 510kb/s (more than MP3 with a better latency and lower CPU usage for compressing). Just in case, don't even think about an MP3 voice stream, it would use lot of resources and cause more latency.

It could be presented as an autistic cvar (me like dat) to make it easier for server makers :

0 would be the legacy codec with default settings 1 would be Opus Voice at lowest bitrate and samplerate (for example 16Khz 20kb/s -2,5KB/s/client-), and 10 at the max (reasonable) bitrate and samplerate (for example 44Khz 128Kbits/s -16KB/s/client-). Of course, some tests would be required to find interesting values, and to check if any sample rate can be used with any bitrate, and also to test performance (brandwidth and CPU).

Other way that would need documentation and would be a bit more of a pain for server owners (but which would be very cool for audio geeks like me !) :

Once it's done, why not go further and add Opus Music, to be used through an API so the server can stream audio to users ?

Leystryku commented 9 years ago

The server does nothing with the audio except resend it to all the other clients, the same way the client who voicechatted sent it to the server. Source Engine's current sample format is mono 16 bit pcm. iirc, The speex codec included with sourceengine is narrowband so it supports up to 42,4 kbps. It changes depending on the mode you set. Source Engine seems to use mode 6 which equals ~20kbps. The dll included with the game also allows you to change it to 8, which would be a bit better, by changing the quality passed to the initialization for the src engine codec dll to 5 ( it currently uses 4 ). sv_voicecodec exists, it is in gmod too but it was abused to fuck with clients, so they kiled it.

Changing to Opus ( which requires them to make a new codec dll themselfs, compatible with the current system ) and changing the voice chatting sys to be able to use these convars ( sv_voicebitrate, sv_voicesamplerate ) is way more work, and considering this request has been dying since a month the chances of that happening is even lower.

UltimateByte commented 9 years ago

Thanks for informations about the current Speex codec. Just one small correction : If i remember well, we call PCM uncompressed audio with basic format like WAV or AIFF, so if i'm right, Speex would not be PCM.

Just one more question as you seem to know it well : does the command to change quality (sv_voicequality ?) also changes the sample rate, or just the bitrate (which would invalidate this request if it's 32Khz already). As the author of this request said, it could change samplerate which i guess would be pretty effortless to implement compared to what i said..

I think my proposal s more of a thing that could be integrated to SRCDS servers at the beginning, it should not be up to GMod team but to Valve's team.

bmwalters commented 7 years ago

TF2 just got CELT. http://www.teamfortress.com/post.php?id=25766

JShorthouse commented 7 years ago

This needs to happen, I don't know why this issue has been sitting here for 2 years because the ingame voice quality is honestly awful by modern standards. CS:GO has a better codec / higher bitrate even though it is a game where low latency is far more important so I no reason why gmod can't do the same.

@UltimateByte 's suggestion sounds great, if that's too much work for the developers then I see no reason why they can't take 5 seconds to change a variable like the original post was suggesting.

NanoAi commented 7 years ago

Why not use Opus? Even the Speex website just says to use Opus... https://speex.org/

Myaats commented 7 years ago

They just added CELT to the source2013 sdk, css dod and hl:dm

http://store.steampowered.com/news/?appids=243750

TheBlueTroll commented 6 years ago

While i would also like to see this happen, Facepunch more then likely have moved on to the new Gmod, S&box. as such i doubt they will do anything except fix bugs in gmod. its pritty sad that we will be stuck with toaster voice, but theres not much that would be done.

Frictione commented 6 years ago

I do not understand how this issue still persists. TF2 just got Opus codec. http://www.teamfortress.com/jungleinferno/notes.php To quote: "The default codec now defaults to steam voice Steam voice is now using the opus codec at a higher bitrate than the default CELT codec."

I believe it is not because of the complexity but due to lack of importance given to this issue.

Why doesnt GMOD use steam voice alternatively?

vingard commented 6 years ago

Please follow through with this suggestion, a codec update has been needed for a long time.

davidepaci commented 6 years ago

PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

OmarAssadi commented 6 years ago

It would be nice to see Opus included.

VaasKahnGrim commented 6 years ago

could you please solve the voice quality issues, its really straining on communities when the voice quality is kinda low forcing people to get a teamspeak server to try and fix the issue themselves. that and the other voice bugs where people randomly can't hear anything

ExtReMLapin commented 6 years ago

dumb and silly bump but since speex is harcoded and as far as i understood it's using the voice code of source 2007 (the errors message are in source 2007, not in source 2013), it would be nice to update it to use opus

svensis commented 5 years ago

add

midlow commented 5 years ago

yes

kyokyoknutt commented 5 years ago

+1

Kialoa commented 5 years ago

4 years after and there is still old codec

UltimateByte commented 5 years ago

Happy birthday to Garry's Mod old codec :)

VaasKahnGrim commented 5 years ago

its still better then Discord audio atleast :)

UltimateByte commented 4 years ago

Congrats for implementing this. No congrats for the delay, though. Almost 5 years.

ExtReMLapin commented 4 years ago

Congrats for implementing this. No congrats for the delay, though. Almost 5 years.

what an attitude

Kialoa commented 4 years ago

Congrats for implementing this. No congrats for the delay, though. Almost 5 years.

the thing is they always had it, it was code capped! can you believe that

JShorthouse commented 4 years ago

what an attitude

I'm thankful that this is finally here but I don't think it's unreasonable at all to be annoyed that it took them 5 whole years to change a single variable. This wasn't some minor issue either, it was a major complaint that all players had.

UltimateByte commented 4 years ago

what an attitude

Problem? We're talking about Facepunch stuff, I assume it is normal to react with some kind of facepalm or facepunch to the way issues are handled. 5 years to use a native Source function, sounds like a hell of a lot to me.

the thing is they always had it, it was code capped! can you believe that

Was there a limitation that prevented Facepunch from implementing this that I was unaware of? If so, then my bad.

I'm thankful that this is finally here but I don't think it's unreasonable at all to be annoyed that it took them 5 whole years to change a single variable. This wasn't some minor issue either, it was a major complaint that all players had.

Spot on, that's exactly my point. Should I say "Thank you" for finally implementing something we asked 5 years ago, or complain about it because it took so long? I'm quite unsure here. Anyhow, if we keep posting on this, the issue will soon be locked so I don't think we will have a chance to discuss that anyway. :)

Edit: Should I also mention that during this time:

What kind of a customer service is this? Hint: Facepunch

robotboy655 commented 4 years ago

Again, do you want me to pointlessly comment on every issue so you don't "feel ignored" or do you want me to actually solve the issues? And again, there's only 1 of me and hundreds of your issues. I can't solve everything instantly. What messages you want upon closing the issue? The issue has been addressed. Would a comment saying "Fixed" change anything at all? Also this is not customer support. It's a bug tracker.

ExtReMLapin commented 4 years ago

No apologize for the delay

lmao

UltimateByte commented 4 years ago

Again, do you want me to pointlessly comment on every issue so you don't "feel ignored" or do you want me to actually solve the issues? And again, there's only 1 of me and hundreds of your issues. I can't solve everything instantly.

I don't understand, are you working for free and are you alone working on this? I hope not.

What messages you want upon closing the issue? The issue has been addressed. Would a comment saying "Fixed" change anything at all?

People usually appreciate human behaviors, words, explanations, excuses... They also can feel compassion rather than anger if they get why it is difficult to get the work done.

If you need a template, it can look like that: "Sorry for the delay, I finally had time to implement this, it took so long because -insert reason here- but it's there! To use it, just -insert how to use here-. Hope you appreciate the work. Cheers!"

Also this is not customer support. It's a bug tracker.

Well, call it and consider it as you wish, it still allows actual customers (people who payed a product) to get fixes and improvements. In my book, after doing sysadmin & customer support for 3 years, people who bought something gain the right to get support to actually enjoy and get the full potential of what they bought.

robertdrakedennis commented 4 years ago

I wish I could feel this conceited on a daily basis

ExtReMLapin commented 4 years ago

When you don't understand why the developer personally fixing your problem (which is not even a problem but a request) isn't acting like a L1 support.

UltimateByte commented 4 years ago

You're reacting as if Facepunch was a crew of two amateurs working for free. Aren't they an actual company which should have professional standards? Well, maybe not, and I should then lower my standards with them (which I have actually already done a long time ago for them and many others, since mediocrity is kind of the norm in our society, but I sometimes try to push towards higher standards, in moments of hope).

I wish I could feel this conceited on a daily basis

If you're talking about robotboy655's way, I believe the way is to try being a robot and to consider everyone as a loss of time; consider any of your actions and interactions with others as a blessing. You should achieve pretty similar results.

If you're talking about mine, then work hard, get good work done on a daily basis and be human and friendly with others. You will get happy customers (and coworkers) and will be able to be proud of what you achieved. I hope everyone working actually experiences this. Then upon talking with people who happen to disappoint their customers for various reasons, the confrontation of your points of view might naturally make you look conceited.

When you don't understand why the developer personally fixing your problem (which is not even a problem but a request) isn't acting like a L1 support.

What do you mean "personally"? Is he working on his own for free, or does he somehow represent Facepunch, being an actual employee with responsibilities and duties? When the dev interacts with the public, he shall endorse this role of offering technical support, be human and friendly. I don't care if it's a bug fix or a request, what matters is that people care about the issue. Otherwise, keep the dev in a cave doing its stuff and let other people who actually care about others and know how to act in public as a company do the exchange and communication with customers.

thegrb93 commented 4 years ago

tl;dr

fyi gmod was a finished product over 10 years ago. It's worked on and continually improved because of the passion they have for it and the community. If this was any other company, they would be charging DLC money for updates. Now shut.

ExtReMLapin commented 4 years ago

Imagine calling yourself UltimateByte, openly saying your company is HaiSoftSARL and being such a douche.

This isn't wise at all.

UltimateByte commented 4 years ago

@thegrb93 Too bad that you couldn't bear reading something longer than a Twitter post.

All about passion... For a game with 10M to 20M owners. Sorry but I find that hard to believe. https://steamdb.info/app/4000/graphs/

gmod chart

Of course it's still developed, since people keep buying it, it has to get support to keep the player base and keep selling. If you're working for free, I'm sorry for you. If not, then act as a company.

@ExtReMLapin

As far as I know, I'm not currently working for customers of my company here, and I have nothing to be ashamed of neither here or at work. If you have any actual argument, please comment. Otherwise you can GTFO and go back playing, you'll be more useful there.

ExtReMLapin commented 4 years ago

As far as I know, I'm not currently working for customers of my company here, and I have nothing to be ashamed of neither here or at work. If you have any actual argument, please comment. Otherwise you can GTFO and go back playing, you'll be more useful there.

At this point it's not just being a keyboard warrior, you just turned yourself into a keyboard commando

UltimateByte commented 4 years ago

@ExtReMLapin Very interesting point of view. You can maybe discuss this philosophy with your dog (or rabbit), he might be interested.

thegrb93 commented 4 years ago

You're implying being popular means they're obligated to push updates. Also an interesting point of view. Your cat may like to hear as well.

UltimateByte commented 4 years ago

It goes along. Don't you see why?

If it is popular, that makes loads of support requests, then if it's properly supported, it gives reasons to stay popular. And if it makes money on top of that, that's one hell more of a reason for a company to want to keep it supported, therefore popular to keep making money, because that's what companies do to pay the bills and expand.

thegrb93 commented 4 years ago

Considering half the issues here are source-engine issues (INCLUDING THIS ONE). Why not complain to valve while you're at it? Imo valve are the real shit company in this situation.

UltimateByte commented 4 years ago

Considering half the issues here are source-engine issues (INCLUDING THIS ONE). Why not complain to valve while you're at it? Imo valve are the real shit company in this situation.

How could I know since nobody from Facepunch communicates useful info on these issues?

JShorthouse commented 4 years ago

Considering half the issues here are source-engine issues (INCLUDING THIS ONE)

Yes, this is surely a problem with the source engine when every other source game has had perfectly clear audio for years

Kefta commented 4 years ago

Because not even Facepunch knows every detail and limitation of the Source engine - iirc the reason https://github.com/Facepunch/garrysmod-requests/issues/647 hasn't even been attempted yet is because how voice chat is exactly handled and passed thru on the server is still a mystery.

Yes, this is surely a problem with the source engine when every other source game has had perfectly clear audio for years

CS:S is calling.

ExtReMLapin commented 4 years ago

Imagine being this 30yo dude talking like a 13yo angry kid about communication.

UltimateByte commented 4 years ago

Because not even Facepunch knows every detail and limitation of the Source engine - iirc the reason #647 hasn't even been attempted yet is because how voice chat is exactly handled and passed thru on the server is still a mystery.

Well, in that case, what does it cost to say "we didn't yet find a way to implement this"? Or "we found a lead but are stuck on X detail", that's what Github is supposed to be... Devs helping each others.

Lack of communication is the pain here, people waiting with no idea of what's going on. Especially when on top of that, rare staff answers are pretty much always salty and unprofessional. Are devs here even Facepunch employees? Because they're acting as volunteers. And if they are employees, is there actually any leadership in this stupid company to guide towards at least the basic baselines of communication?

Imagine being this 30yo dude talking like a 13yo angry kid about communication.

The only 13yo here is you, bragging while having 0 argument or anything relevant to say, no idea to develop. Your talk is empty, you're the cancer of the internet. Please, go back to your unemployment and leave adults discuss.

Kefta commented 4 years ago

Lack of communication rare staff answers salty and unprofessional

You were obviously not around for when Garry was the primary developer. Rubat communicates far more than he ever did. I brought up the lack of communication years ago on a PR and the frequency has greatly improved since then. I really don't see any issue here.