Create/Join Session Blueprint Voice Chat

I have been struggling to get an online session going in code so I decided to try through blueprints. I believe it is actually working, it’s really hacky, but my main goal is to demonstrate voice chat on Macs. Here is a picture of MyGameInstance setting up the network:

And the basic UMG widget:

When I build this out the two Macs will connect to each other over LAN. I can’t get voice chat to work. Here is my DefauleEngine.ini code:



Here is my DefaultGame.ini code:


Does anyone have any idea what else needs to happen? Do the macs need microphones plugged into them to send voice chat over? Any help would be awesome! Thanks!

well obviously you need a microphone on both computers, other than that I have no idea and would also like to know about it.

Haha! Yeah, I worded that incorrectly… I meant to say, “does a built in microphone work?” as all Macs include a microphone built in.

oh, I guess that would not be a problem at all, I never used a mac and never will but if the mic is working on other apps, then the ue4 should detect it too and it should work I guess.

From everything I see online, this should work. It’s really got me stumped. You’d think once the two computers are running the same program the voice would be going with bRequiresPushToTalk set to false.

I am still stuck on this, I know the two computers are connecting using the online system. I just can’t get the voice chat to work. Is there no one that knows why this isn’t working?

Hi StretchMan,

Unfortunately we haven’t implemented the voice module for Mac OS yet. We are tracking this feature internally, so keep an eye out for it in a future release.

If you’re interested, we’re always happy to look at a GitHub pull request as well!

Do you have a timeline on this? I was really looking to do a quick proof of concept to show UE4’s graphics for Mac but I need Voice Chat included. I am not sure if I was intending to do something as complex as building in Voice Chat for a platform that isn’t supported. Well, on the bright side, that explains the last few weeks of frustration. Thanks!

Sorry, we don’t have a timeline to share for this feature right now.

I would really be interested in voice chat on mac too. By the way, is voice chat available on mobile platforms (android / iOS)?

Also, where can I find documentation about voice chat? At the moment I found only this:

I’ve just added a really trivial OpenAL implementation for OS X in Main, CL #2468783, Git:
It’ll be in the 4.8 binary release, but is very small & could theoretically be spot merged into 4.7 if you are building from source (with the usual caveat that it hasn’t been fully tested yet).

That’s just great!! thanks, I’ll check it out soon!
could this possibly work also on android or iOS devices?

OpenAL should be available on iOS, so in theory it might work there too, but I can’t say for sure as I’ve not checked/tested it. it won’t work on Android as that uses a very different audio API.

Ok thanks! I’ve compiled 4.7.2 replacing the three files you modified, packaged a multiplayer standalone client following these instructions:
(changed DefaultEngine.ini and DefaultGame.ini basically)
I connected the two clients (running on 2 different macs) but I didn’t manage to have voice chat working (couldn’t hear anything on none of the two sides). Is there anything else I am supposed to do to enable the functionality?
I tried to type DumpVoiceMutingState in the console but the command was not recognised. How can I debug what’s going on?

Make sure that you have correctly setup your input device in System Preferences > Sound.

Try a simpler test case - on one Mac bring down the console & enter ‘online test voice’ without the quotes. This should start playing the capture back through the speakers. During implementation, I disabled the compression/decompression routines so that I could be sure that what I’d done worked by modifying the default value for bUseDecompressed in TestVoice.cpp. If that makes the test work then at least we know the problem is somewhere in the encoding or decoding.

Ok, ‘online test voice’ works, I can hear my voice. Is there a way I can test if voice chat is working using a single mac? (e.g. both clients on the same machine?)

Exiting the clients or the editor I often get the following crash log:

Exiting the client often I get this crash:

OALCaptureDevice::~OALCaptureDevice() Address = 0x1088dbf41 (filename not found) [in OpenAL]
alcCaptureCloseDevice() Address = 0x1088c1843 (filename not found) [in OpenAL]
FVoiceCaptureOpenAL::~FVoiceCaptureOpenAL() Address = 0x1030ec97e (filename not found) [in xxx]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x10310d5cb (filename not found) [in xxx]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x10310d95e (filename not found) [in xxx]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x10310fd05 (filename not found) [in xxx]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x1031100ae (filename not found) [in xxx]
FOnlineSubsystemNull::Shutdown() Address = 0x1045e3184 (filename not found) [in xxx]
FOnlineSubsystemModule::ShutdownOnlineSubsystem() Address = 0x1030dd557 (filename not found) [in xxx]
FModuleManager::UnloadModule(FName, bool) Address = 0x101bb4dea (filename not found) [in xxx]
FModuleManager::UnloadModulesAtShutdown() Address = 0x101bb5986 (filename not found) [in xxx]
FEngineLoop::Exit() Address = 0x1019e58ca (filename not found) [in xxx]
GuardedMain(wchar_t const*) Address = 0x1019e638e (filename not found) [in xxx]
-[UE4AppDelegate() Address = 0x1019f1a93 (filename not found) [in xxx]
-[FCocoaGameThread() Address = 0x101acf038 (filename not found) [in xxx]
NSThread__main() Address = 0x7fff8e29c90a (filename not found) [in Foundation]
_pthread_body() Address = 0x7fff92fa3268 (filename not found) [in libsystem_pthread.dylib]
_pthread_body() Address = 0x7fff92fa31e5 (filename not found) [in libsystem_pthread.dylib]
thread_start() Address = 0x7fff92fa141d (filename not found) [in libsystem_pthread.dylib]

Also, compiling for iOS fails with the following crash log:

Thread 4 Crashed:
0 UE4Editor-Core.dylib 0x00000001086fa985 rml::internal::Block::freePublicObject(rml::internal::FreeObject*) + 69
1 UE4Editor-Core.dylib 0x00000001088c26c9 operator delete(void*) + 9
2 0x0000000118488f41 OALCaptureDevice::~OALCaptureDevice() + 41
3 0x000000011846e843 alcCaptureCloseDevice + 226
4 UE4Editor-Voice.dylib 0x00000001184e33be FVoiceCaptureOpenAL::~FVoiceCaptureOpenAL() + 254 (VoiceModuleMac.cpp:77)
5 UE4Editor-Voice.dylib 0x00000001184e294e FVoiceCaptureOpenAL::~FVoiceCaptureOpenAL() + 14 (VoiceModule.cpp:8)
6 UE4Editor-OnlineSubsystemUtils.dylib 0x00000001182c0780 FVoiceEngineImpl::~FVoiceEngineImpl() + 336 (SharedPointerInternals.h:260)
7 UE4Editor-OnlineSubsystemUtils.dylib 0x00000001182c0b7e FVoiceEngineImpl::~FVoiceEngineImpl() + 14 (OnlineSubsystemUtils.cpp:31)
8 UE4Editor-OnlineSubsystemUtils.dylib 0x00000001182c3195 FOnlineVoiceImpl::~FOnlineVoiceImpl() + 181 (SharedPointerInternals.h:192)
9 UE4Editor-OnlineSubsystemUtils.dylib 0x00000001182c358e FOnlineVoiceImpl::~FOnlineVoiceImpl() + 14 (OnlineSubsystemUtils.cpp:31)
10 UE4Editor-OnlineSubsystemNull.dylib 0x00000001271a7561 FOnlineSubsystemNull::Shutdown() + 545 (SharedPointerInternals.h:192)
11 UE4Editor-OnlineSubsystem.dylib 0x0000000114c16d87 FOnlineSubsystemModule::ShutdownOnlineSubsystem() + 359 (BitArray.h:689)
12 UE4Editor-Core.dylib 0x000000010891314e FModuleManager::UnloadModule(FName, bool) + 222
13 UE4Editor-Core.dylib 0x0000000108913f09 FModuleManager::UnloadModulesAtShutdown() + 2505
14 com.epicgames.UE4Editor 0x00000001086989ee FEngineLoop::Exit() + 1086 (LaunchEngineLoop.cpp:2097)
15 com.epicgames.UE4Editor 0x0000000108699539 GuardedMain(wchar_t const*) + 2553 (Launch.cpp:60)
16 com.epicgames.UE4Editor 0x00000001086a778f -[UE4AppDelegate runGameThread:] + 223 (LaunchMac.cpp:192)
17 UE4Editor-Core.dylib 0x00000001087f8048 -[FCocoaGameThread main] + 88
18 0x00007fff8e29c90a NSThread__main + 1345
19 libsystem_pthread.dylib 0x00007fff92fa3268 _pthread_body + 131
20 libsystem_pthread.dylib 0x00007fff92fa31e5 _pthread_start + 176
21 libsystem_pthread.dylib 0x00007fff92fa141d thread_start + 13

Thanks devel.bmad - I’ll investigate the crash, I’m not sure what else to suggest if the voice module itself is working. BTW what changes were needed for iOS? I can then integrate them in as well - it may be better to add this as a Git pull request so that you get proper credit too.

I haven’t integrated it in iOS yet, I was just pointing out that packaging for iOS would cause this crash with the patch (packaging for mac works - the crash seems related to openAL anyway). When 2 clients are connected is there a way if a client is actually configured for sending/receiving sound (or to check if it is decoding an incoming stream?)

Maybe it is a problem of configuration… I’ve set this in DefaultEngine.ini:


And this in DefaultGame.ini

shall I use some console command to start the voice chat or can I somehow check the current connection status?

Is there a way to test that with both clients on a single PC?