Speaker Device Bug (Windows)

M4lumm
M4lumm
edited October 2019 in Photon Voice
We are working on a game for the HTC Vive. Each user in my application is transmitting voice properly. However, some users do no hear voices because their speaker is not sending it to the correct device (HTC Vive).

Is there a way to set the Speaker device like you can the microphone device on the Recorder?

Comments

  • M4lumm
    M4lumm
    edited October 2019
    Can anyone at Photon give a response here? We are wondering if your software is the right solution for our project.

    Here is the issue: The first and second players in our app can talk to each other. The third player cannot hear them, but they can hear the third player. Each player prefab has the same Photon Voice components.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited October 2019
    Hey @M4lumm,

    Thank you for choosing Photon and for your patience!

    I had this discussion bookmarked (I use the bookmarking as a note to self to post something) and somehow I missed it and forgot. Sorry about that.
    Anyway, if you do not get an answer on the forum within 2 business days you could always send an email.

    Your second post actually is maybe more helpful in describing and hinting the cause of the issue.
    So in case, you did not update to the latest Photon Voice 2.15 please do.
    I think the issue is probably due to the Recorder used by the PhotonVoiceView not being initialized properly because of methods calls timing. I believe 2.15 version fixes this.
    If not, what you could do is to increase the logging level of the Recorder and the PhotonVoiceView to at least warning level. You could also explicitly and manually call PhotonVoiceView.Init().

    For the audio output device (speaker), we rely on Unity which usually chooses the default one used by the system. For the audio input device (microphone) we were relying on Unity first then we made our own native plugins for Android, iOS, Windows and macOS for various reasons described here.
    We only made a native plugin related to audio output but it's for a console and it's specific for it and its requirements.

    Let me know if this helps.
    Maybe the fix I had in mind is not related.
    If the issue persists we will investigate further.
  • Thank you the detailed response. I have already tried updating to the latest version. I will try to manually call PhotonVoiceView.Init() first thing tomorrow.
  • Unfortunately the issue remains. After testing further, it doesn't seem to have anything to do with the player number. It may be related to hardware. We have two laptops that it never works on, no matter what player # they are.

    All of our PCs are set to: HTC-VIVE (NVIDIA) High Definition Audio.

    We can hear the rest of our sounds in app on these devices, but cannot hear the voices from Photon Voice.

    Any other suggestions?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @M4lumm,

    Did you try with Photon MicrophoneType or only Unity MicrophoneType?
    Does this happen with the demo scenes?

    Could you increase logging level of Photon Voice components (level = ALL, Recorder, Speaker, PhotonVoiceView, PhotonVoiceNetwork, in Editor or via code) and send us the logs from the devices that have the issue to developer@photonengine.com?
  • I have tried both MicrophoneTypes. This is happening in the demo scene. Only the first play can hear the other players. The other players cannot hear anything unless they set DebugVoice to true, then they hear themselves.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited October 2019
    Hi @M4lumm,

    From PhotonVoiceNetwork, in the Unity Editor you can check debug info at the bottom, unfold "Cached Remote Voices' Info" and take a screenshot from each player.
    You should see at least two "voice streams" from each player in case of 3 players room.
    My assumption is that those remote voices are "Not Linked" for some reason.
  • M4lumm
    M4lumm
    edited October 2019
    Everything seems to be linked properly. I can hear voices if I switch the audio to the laptop's speakers. I only cannot hear the voices when i switch to HTC VIve (NVIDIA) High Definition Audio.

    This seems to be a bug with Photon Voice. It is not sending the audio to the proper speaker even though Unity is.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @M4lumm,

    This could be a bug in Unity itself which prevents from playing the audio on the right device or not playing it at all.
    What unity version are you using?
    Did you try a different Unity version?

    Also, the issue is not clear as the description changes here from one post to another and also on the email thread.
    Does this issue happen on all laptops or on some of them only?
    How many HTC Vive headsets did you try this on?

    See this for example.
  • We are using Unity 2018.4.2f1. I have not tried a different version of Unity yet.

    We have tested on two laptops, two tower PCs, three HTC Vive, and a Valve Index. The issue happens on all devices.
  • M4lumm
    M4lumm
    edited October 2019
    Keep in mind, this issue only happens when using a VR headset as the audio speaker source in Windows (HTC Vive NVIDIA High Definition Audio).

    The voice system works when playing through the default speaker source in Windows, but then i cannot hear the sound through the headset which is no good.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @M4lumm,

    This may be indeed an OS/config or Hardware problem which could be out of Photon's reach.

    Photon Voice uses Unity to play audio so if something any audio can be played by Unity it can be played by Photon Voice.
    Photon Voice uses AudioSource component for audio playback.
    The difference may be in the input, if you choose Photon microphone type then the audio input is no longer handled by Unity.

    Could you check out the troubleshooting steps in this link?

    "HTC Vive NVIDIA High Definition Audio)" is HTC Vive's audio output device name.
    What's the equivalent for the Valve Index?

    Could you test using DemoVoiceMinimal-Scene only + make sure VAD is disabled on the Recorder (from Editor or via code: recorder.VoiceDetection = false).

    The values that are useful for debugging are (all are expected to be true):
    recorder.IsInitialized
    recorder.IsRecording
    recorder.TransmitEnabled
    recorder.IsCurrentlyTransmistting
    
    speaker.IsLinked
    speaker.IsPlaying
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hey @M4lumm,

    any updates?