# Steam Voice Chat Cutting Out

**URL:** <https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010>\
**Category:** Platform & Builds\
**Tags:** onlinesubsystem, Steam, voice-chat, UE4-12, unreal-engine, question\
**Created:** [July 5, 2016, 1:30pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010 "2016-07-05T13:30:29Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alderbit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alderbit](https://forums.unrealengine.com/u/Alderbit)\
**Post date:** [July 5, 2016, 1:30pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/1 "2016-07-05T13:30:29Z")

</div>

In 4.12 there is a problem where voice chat over steam cuts out after a few seconds. Everything was working fine in 4.11 but now appears to be broken. Basically when one person starts talking, his voice plays back on the connected client but after a short time or when the talker’s volume drops too low, sound playback stops.

The stat NET command shows that voice packets are continuously being received so it doesn’t appear to be a network issue. The stat AUDIO command shows that an audio source is created when a person starts talking. If the person stops talking for several seconds the audio source will be destroyed. He can then begin talking again and will be audible for a few more seconds following the creation of a new audio source. Could there be an issue with audio components and streaming sounds?

Here are my configuration settings.

**DefaultEngine.ini**

```
[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[Voice] 
bEnabled=true
 
[OnlineSubSystem]
DefaultPlatformService=Steam
bHasVoiceEnabled=true
PollingIntervalInMs=20

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bVACEnabled=0
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
AllowDownloads=false

[/Script/OnlineSubsystemUtils.IpNetDriver]
InitialConnectTimeout=120.0

```

**DefaultGame.ini**

```
[/Script/Engine.GameSession]
bRequiresPushToTalk=false

```

Here is an example project that shows the problem. It’s just a first person template project with steam voice chat enabled and a menu that allows hosting and joining an online session.

[Sample project - 4.12.4  
_Voice chat cuts out_

This is the same project made in 4.11 where voice chat is working fine.

[Sample project - 4.11.3][2]  
_Voice chat works_

[https://drive](https://drive)…com/uc?export=download&id=0Bwkk9IIFWMFbMGFTQmZtOTRaNWc  
[2]: [https://drive](https://drive)…com/uc?export=download&id=0Bwkk9IIFWMFbcExmaFpPaHAyTFk

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [July 8, 2016, 7:32pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/2 "2016-07-08T19:32:25Z")

</div>

,

Thanks for your report. UE-31605 is the report for this issue. It’s currently on our to do list and is listed as a priority 2, major bug.

Thank you!

---

<div class="post-metadata">

**Author:** ![Spiris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spiris](https://forums.unrealengine.com/u/Spiris)\
**Post date:** [July 16, 2016, 12:02am UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/3 "2016-07-16T00:02:40Z")

</div>

This is the exact issue our game is having as well. We are using specially routed voice packets (not using the online subsystem) and the problem is still present. Is there any news regarding this issue? Voice communication is a rather large part of our project.

---

<div class="post-metadata">

**Author:** ![Spiris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spiris](https://forums.unrealengine.com/u/Spiris)\
**Post date:** [July 16, 2016, 7:15pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/4 "2016-07-16T19:15:11Z")

</div>

Hi , my team is having the same issues with voice being choppy in 4.12, we would sincerely like a fix sooner than later as the function is very important to our project. Is there any engine code that your team is aware of that could be grafted into 4.12 as a hotfix? I have been browsing your master and promoted branch only to find that the code and commit comments, or the solution itself, is not transparent enough for me to bring over without guidance.  
If there is nothing for it, we understand and hope to see it fixed soon.  
-Spiris

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [July 18, 2016, 9:26pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/5 "2016-07-18T21:26:11Z")

</div>

I have informed our Developers that there is an increased need for this to be resolved as soon as possible. While I cannot say at this time whether or not it’ll be resolved any sooner, I can advise you that it is considered a major bug - so it’ll be reviewed after all extreme/blocking issues are taken care of.

Thank you!

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [July 27, 2016, 9:34pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/6 "2016-07-27T21:34:33Z")

</div>

I would also like to see this resolved. Voip on dedicated server was working in 4.11 with this pull [https://github.com/EpicGames/UnrealEngine/pull/1661/](https://github.com/EpicGames/UnrealEngine/pull/1661/) but now voip is pretty broken.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_92200967](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_92200967](https://forums.unrealengine.com/u/anonymous_user_92200967)\
**Post date:** [July 28, 2016, 8:36pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/7 "2016-07-28T20:36:49Z")

</div>

Would love to see the push to master that fixes this. That way we can implement it in our source. Can you let us know when that happens ? Thanks!

---

<div class="post-metadata">

**Author:** ![Burnz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burnz](https://forums.unrealengine.com/u/Burnz)\
**Post date:** [July 28, 2016, 10:19pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/8 "2016-07-28T22:19:45Z")

</div>

Hi there,  
our studio would be interested in this as well. If you cannot release another hotfix for 4.12 please at least show us the fix on your master branch. Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [July 29, 2016, 9:28pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/9 "2016-07-29T21:28:57Z")

</div>

UE-31605 is still on our to do list as a major bug. Feel free to follow up if you have any additional questions.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mentos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mentos](https://forums.unrealengine.com/u/Mentos)\
**Post date:** [July 31, 2016, 2:25pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/10 "2016-07-31T14:25:49Z")

</div>

Hey ,

Having VOIP work for dedicated servers is also a big priority for our game. I tried to implement the following pull request to enable VOIP over dedicated servers: [https://github.com/EpicGames/UnrealEngine/pull/1661/files](https://github.com/EpicGames/UnrealEngine/pull/1661/files) but had similar issues where the voice would drop out (in 4.12).

In debugging this myself I found that moving the line ‘QueuedData-\>AudioComponent-\>Play();’ to the end of the ‘FVoiceEngineSteam::SubmitRemoteVoiceData(…)’ function fixed voice from dropping out however the audio would cut in and out and with lots of players became unintelligible. But I think the logic surrounding when to play voice data may be the culprit. Hoping this may help Epic address this sooner! Here is the function in question:

```
uint32 FVoiceEngineSteam::SubmitRemoteVoiceData(const FUniqueNetId& RemoteTalkerId, uint8* Data, uint32* Size) 
{
	UE_LOG(LogVoiceDecode, VeryVerbose, TEXT("SubmitRemoteVoiceData(%s) Size: %d received!"), *RemoteTalkerId.ToDebugString(), *Size);

	const FUniqueNetIdSteam& SteamId = (const FUniqueNetIdSteam&)RemoteTalkerId;
	FRemoteTalkerDataSteam* QueuedData = RemoteTalkerBuffers.Find(SteamId);

	if (QueuedData == NULL)
	{
		RemoteTalkerBuffers.Add(SteamId, FRemoteTalkerDataSteam());
		QueuedData = RemoteTalkerBuffers.Find(SteamId);
	}

	check(QueuedData);

	// new voice packet.
	QueuedData->LastSeen = FPlatformTime::Seconds();

	uint32 BytesWritten = 0;

	DecompressedVoiceBuffer.Empty(MAX_UNCOMPRESSED_VOICE_BUFFER_SIZE);
	DecompressedVoiceBuffer.AddUninitialized(MAX_UNCOMPRESSED_VOICE_BUFFER_SIZE);
	const EVoiceResult VoiceResult = SteamUserPtr->DecompressVoice(Data, *Size, DecompressedVoiceBuffer.GetData(),
		DecompressedVoiceBuffer.Num(), &BytesWritten, SteamUserPtr->GetVoiceOptimalSampleRate());

	if (VoiceResult != k_EVoiceResultOK)
	{
		UE_LOG(LogVoiceDecode, Warning, TEXT("SubmitRemoteVoiceData: DecompressVoice failure: VoiceResult: %s"), *SteamVoiceResult(VoiceResult));
		*Size = 0;
		return E_FAIL;
	}

	// If there is no data, return
	if (BytesWritten <= 0)
	{
		*Size = 0;
		return S_OK;
	}

	// Generate a streaming wave audio component for voice playback
	if (QueuedData->AudioComponent == NULL || QueuedData->AudioComponent->IsPendingKill())
	{
		if (SerializeHelper == NULL)
		{
			SerializeHelper = new FVoiceSerializeHelper(this);
		}

		QueuedData->AudioComponent = CreateVoiceAudioComponent(SteamUserPtr->GetVoiceOptimalSampleRate());
		if (QueuedData->AudioComponent)
		{
			QueuedData->AudioComponent->OnAudioFinishedNative.AddRaw(this, &FVoiceEngineSteam::OnAudioFinished);
            //QueuedData->AudioComponent->Play();
		}
	}

	if (QueuedData->AudioComponent != NULL)
	{
		USoundWaveProcedural* SoundStreaming = CastChecked<USoundWaveProcedural>(QueuedData->AudioComponent->Sound);
		if (SoundStreaming->GetAvailableAudioByteCount() == 0)
		{
			UE_LOG(LogVoiceDecode, Log, TEXT("VOIP audio component was starved!"));
		}
		SoundStreaming->QueueAudio(DecompressedVoiceBuffer.GetData(), BytesWritten);
		QueuedData->AudioComponent->Play(); //moved Play() to come after QueueAudio(...)
	}

	return S_OK;
}

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 2, 2016, 9:05pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/11 "2016-08-02T21:05:22Z")

</div>

UE-31605 has been closed out as cannot reproduce however, UE-34081 was created in it’s place for procedural sound wave failing to play when returning 0 bytes in GeneratePCMData callback.

---

<div class="post-metadata">

**Author:** ![Burnz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burnz](https://forums.unrealengine.com/u/Burnz)\
**Post date:** [August 8, 2016, 3:43pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/12 "2016-08-08T15:43:59Z")

</div>

This is still full reproducable using the Sample Projects provided.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 15, 2016, 5:51pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/13 "2016-08-15T17:51:30Z")

</div>

The original bug was closed out as cannot reproduce however, there was another (UE-34081) added which has since been fixed. We expect it to be added into 4.13.

If you feel that there is still an issue, please elaborate further.

Thank you!

---

<div class="post-metadata">

**Author:** ![muchcharles](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@muchcharles](https://forums.unrealengine.com/u/muchcharles)\
**Post date:** [August 31, 2016, 6:59pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/14 "2016-08-31T18:59:06Z")

</div>

Hi , I’ve been looking into fixing this. Procedural sound already has a way of asking a delegate to run when it would otherwise generate 0 bytes:

```
DECLARE_DELEGATE_TwoParams( FOnSoundWaveProceduralUnderflow, class USoundWaveProcedural*, int32 );

```

I think the online voice subsystem just needs to be updated to use that. However, I looked into just providing empty data and it seems that will keep the audio component from ever closing, which online voice tries to do to conserve resources. Something more nuanced is probably needed.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_92200967](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_92200967](https://forums.unrealengine.com/u/anonymous_user_92200967)\
**Post date:** [August 31, 2016, 11:18pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/15 "2016-08-31T23:18:09Z")

</div>

We’re testing with 4.13 Preview 3 now. Voice seems to be slightly better, but still cutting in and out and generally terrible.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_92200967](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_92200967](https://forums.unrealengine.com/u/anonymous_user_92200967)\
**Post date:** [September 1, 2016, 9:08pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/16 "2016-09-01T21:08:28Z")

</div>

Update to above ^: 4.13 totally works and fixes this issue. It was crappy for me because I was flooding the network with other stuff.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [September 1, 2016, 10:01pm UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/17 "2016-09-01T22:01:12Z")

</div>

I’m so happy to hear that 4.13.0 release has resolved the issue your project was running in to. Please let us know if you have any further questions, thanks!

---

<div class="post-metadata">

**Author:** ![tmek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tmek](https://forums.unrealengine.com/u/tmek)\
**Post date:** [October 5, 2016, 1:29am UTC](https://forums.unrealengine.com/t/steam-voice-chat-cutting-out/363010/18 "2016-10-05T01:29:32Z")

</div>

Hi ,

You reference UE-31605 multiple times in relation to extremely choppy voice chat but that issue only mentions it’s for the NULL online subsystem.

I think it’s important to note people, including the original poster here are noting the spotty/choppy voice chat is affecting Steam Online Subsystem as well.

Perhaps UI-31605 (or a seperate issue) should include that we are experiencing unusable voice chat with Steam Online Subsystem in addition to the NULL online subsystem. Hopefully fixing one fixes the other but it still seems to be an issue as of today.

Thank you!
