Download

UE 4.19 native spatialization, how to use?

I was able to do it by having VoiceInterfaceSteam use FVoiceEngineImpl instead of it’s own voice engine; the only other main change was using unique net ids converted to strings instead of directly for mapping the talkers (the ids are an opaque type).

I am also having issues with VOIPTalker. I feel like my subsystem is not correct. This is how I register my VOIPTalker as Ethan.Geller posted. I’ve confirmed that the code is run (aka the player state is around eventually… and the VOIP gets “registered”).

VOIP-in-Character.PNG

//DefaultEngine.ini
[OnlineSubsystem]
DefaultPlatformService=Null
bHasVoiceEnabled=true

[Voice]
bEnabled=true

//DefaultGame.ini has
[/Script/Engine.GameSession]
bRequiresPushToTalk=false

I am building my engine from source (I don’t think this matters), and I’m trying to use the Null subsystem. Maybe I’ve missed something obvious (does this work in the PIE editor window? do I have to use a different subsystem? maybe I can’t use a sourcebuilt engine?

I did everything, and GetPlayterVoice always return 0 , even its valid . any idea ?

^ this , do we have a answer for it ? @Ethan.Geller :slight_smile:

Is there any update on this? I cannot find whether Steam subsystem is now supported by UVoiTalker in 4.20.1, any info is welcome.

There is literally a million tutorials on getting voice chat to work with Steam its ridiculous, do any of you use Google?

What we really need is a REAL tutorial, a video from Epic would be cool. There is literally NO documentation on getting VOIP to work with dedicated servers. This post is the most indepth I have found.

When looking, there are literally TONS of Steam Voice Chat tutorials that show up everywhere. This is getting frustrating.

Sadly for me too, i cant get it to work.
Have you guys find soimething usefull or did any tutorial on this?

Don’t be fooled by RealAero post. He didn’t fully understand what this post about. Even 4.20 doesn’t add VOIPTalker Steam support. FVoiceEngineSteam::SubmitRemoteVoiceData simply doesn’t call it.

What’s the actual point of this component besides exposing two events?

For anyone that didn’t see, 4.21 adds support.

Can’t find any reference for VOIPTalker adding Steam support, do you happen to have a link confirming this / docs?

It is in 4.21 release notes now:

  • New: The UVOIPTalker component is now supported with the Steam Online Subsystem as well as the null online subsystem.

What is “BlueprintedTalker” in there? A spawned actor? Is it replicated?

I’m still trying to understand whether you need an already functioning VOIP (I use advanced sessions) and then you add this on top, or whether this replaces it…?

@Ethan.Geller, could you please elaborate on this? We’ve created a blueprint child class of UVOIPTalker and have put the nodes in there as per your screenshot, however how does this blueprint get loaded in the game? Does it get spawned by the character bp on beginplay? We want to use it to play beeps and clicks to simulate a military radio.

Also, would you be able to point us in the right direction on how to use source effects chains to make VOIP sound like military radio? I’ve found some guides on youtube for other audio programs but I couldn’t find anything for UE4. I know that vaguely we want to use high/low pass filters but I don’t know what settings to have them at.

Lastly, is there any way we can reduce the latency of the VOIP chat? Our users are typically playing in the same room (over LAN) which makes the latency quite noticeable.

You should be able to change


float UVOIPStatics::GetBufferingDelay()

to reduce latency. There is also some latency in the mic threshold detection itself (it listens for something to pass the threshold, then rewinds back in time to send from a bit before the threshold was crossed (to avoid a high-frequency pop going from zero to non-zero suddenly). That should be minimal, but for LAN you could just make it always on and skip that.

You can also change the frame size in the encoder to be 10ms:



Engine/Source/Runtime/Online/Voice/Private/VoiceCodecOpus.cpp

#define NUM_OPUS_FRAMES_PER_SEC 50


Change from 50 to 100 (which is equivalent to 10ms, and is the smallest frame size opus recommends).

You’ll still have a small bit of latency originating from your framerate, since networking is tick based and not event based.

Hello! I have another proplem. I use OnlineSubsystemNULL. The same things to enable Voice are written in config. My BP code to enable VOIP talker is like yours. So VOIP Talker is valid both on server and client, but attenuation doesn’t work on client side and doesn’t seem to be set, but on server it works.If I set VOIP setting’s defaults with my attenuation , on server side it works fine, on client it doesn’t work , but attenuation is set. What should I do to resolve this problem? Thanks

Anyone having issues on 4.22? My VOIPTalker quit working (unspatialized voip still works fine if I comment out the CreateTalkerForPlayer call).

Ok after some struggling, i got it working in 4.21.
Before i used the VOIPTalker i was using the default voice so i tested if it works without calling PlayerController->StartTalking() and in result it seems that its not required for spatial voice.
All you need to do is, to add the VOIPTalker component to your Character and Multicast the Voice Init as described before.
VOIP seems to not work in PIE Sessions so run your game as standalone

when it runs on server and not on client, it should tell you all.
check your replication check if you are on server, and if so, then perform a multicast of the voice init

Edit:
I want to mention, that it runs perfectly over Steam and also with Subsystem NULL, just checkout the config settings in the posts before, thank you guys for working out this thread and providing these informations!

Awesome job for this update and the spatial voice implementation just epic…, as always.
Epic - I love you so much <3
You make me feel like a christmas child every single day

Hi!
Is there any step by step documentation how to make a voip?
From all that I found - I do not even have this in the engine (custom 4.22). There are not all the functions that are in the screenshot, and it is not clear where to create, what settings.
Is there an article in which the working method of creating a voip is already described, step by step, or git?

I have a setup very similar to this, I even copied your check just to see if it helped. I’m building this in VR, and as soon as I start the game in preview mode it seems to register. However, when I push the button I’ve designated to enable talking, I just get this error: StartLocalVoiceProcessing(): Device is currently owned by another user

and it does not seem to function at all. No sound comes out with the loop turned on. if I add a tick function “is local player talking” and print on that statement, I get nothing when the button is pushed.

Yes I’ve set up the engine file with the proper booleans for voip per instructions. These screenshots are inside a function, so the player state check is done outside the function in graph, just before this is called.

FWIW it always seems to log that once even when it is working.

It usually logs that, then comes back around to the same point in the code later and succeeds (you can try putting a breakpoint there and see if it comes to the enclosing block twice).

If you are launching two instances in preview, you probably need to instead launch outside of the editor with ‘-game’. I think it uses some global static variables and stuff in a way that doesn’t play nice with two instances running in the same process.