Photon Voice's problem with warning:No PhotonView with ID {0} found. Remote voice {1}/{2} not linked

harlan
harlan
edited December 2018 in Photon Voice
We got a strange problem. We have two persons in a photon room and we load a specified scene, the first joined person can hear the second joined person but the second cannot hear the first person.On the second person's player prefab instance, the audio source from the first person's clone don't have a AudioClip(AudioStreamPlayer) attached, the reason is that when it tries to create the audio clip, the first person's clone is not created yet.So it cannot find the viewID, and the next process are all passed...see next

the call to SpeakerFactory returns null...
private void OnRemoteVoiceInfo(int channelId, int playerId, byte voiceId, VoiceInfo voiceInfo, ref RemoteVoiceOptions options)
        {
            if (this.Logger.IsInfoEnabled)
            {
                this.Logger.LogInfo("OnRemoteVoiceInfo channel {0} player {1} voice #{2} userData {3}", channelId, playerId, voiceId, voiceInfo.UserData);
            }

            if (fpeakerFactory != null)
            {
                Speaker speaker = SpeakerFactory(playerId, voiceId, voiceInfo.UserData);
                if (speaker != null)
                {
                    speaker.OnRemoteVoiceInfo(voiceInfo, ref options);
                    if (speaker.Actor == null && this.Client.CurrentRoom != null)
                    {
                        speaker.Actor = this.Client.CurrentRoom.GetPlayer(playerId);
                    }
                    if (SpeakerLinked != null)
                    {
                        SpeakerLinked.Invoke(speaker);
                    }
                }
            }
        }
It is strange because that when load other scenes the voice is OK.The difference is that we do some bake work on the problematic scene .
I think the command sequence sent from server is not correct.So Which cases cause this??

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @harlan,

    Could you try importing this patched version and try again?
  • hi @JohnTube

    we test the patch,Now there are AudioStreamPlayers on the two clone prefabs' AudioClip, but the problem is the first person can hear himself(the voice is played through his speaker), but cannot hear the first person, the second person can hear the first person..
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2018
    hi @harlan,

    Now there are AudioStreamPlayers on the two clone prefabs' AudioClip
    What do you mean? what "AudioStreamPlayer" and "AudioClip" are you talking about? what about PhotonVoiceView, Speaker and Recorder?
    but the problem is the first person can hear himself(the voice is played through his speaker), but cannot hear the first person
    This is confusing. If you hear yourself make sure Recorder.DebugEchoMode is not enabled.

    Make sure to increase log level for the all Photon Voice components and save logs for the two players into two files and send them.
  • harlan
    harlan
    edited December 2018
    Hi @JohnTube

    What do you mean? what "AudioStreamPlayer" and "AudioClip" are you talking about? what about PhotonVoiceView, Speaker and Recorder?

    The "AudioStreamPlayer" is from remote person's Audio Source:

    Using PhotonVoice 2.3.1, on one side(the second joined person), its remote person's "AudioStreamPlayer" is empty which causes that I cannot hear him.
    Using 2.4.1RC, both sides' remote person have "AudioStreamPlayer" in Audio Source, but other error happens as I described.

    This is confusing. If you hear yourself make sure Recorder.DebugEchoMode is not enabled.

    Yes,it is not enabled.

    Make sure to increase log level for the all Photon Voice components and save logs for the two players into two files and send them.

    PhotonVoiceLog.zip



  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @harlan,

    The log files do not look full/complete and I don't understand why you separated each player/client logs into info and warning...
    Anyways, there is this entry in player1:
    There are no audio listeners in the scene. Please ensure there is always one audio listener in the scene
    Make sure you have one AudioListener component it's usually attached to the same GameObject as the main camera.

    Here is an updated 2.1.4RC, import it and try again.
    FYI: it's not final some class RemoteVoiceStream may be renamed when officially released.
  • Hi @JohnTube

    The new patch seems OK, it is great!!!.we will upgrade the package after 2.1.4 is released, Thank you.
  • harlan
    harlan
    edited December 2018
    Hi @JohnTube

    What is the 2.1.4 release date??
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @harlan,

    The next version will be 2.2 because we have enough changes now to skip 2.1.x.
    It's planned for this week, we want to release it after PUN 2.6 release.
    Thank you for your patience and understanding.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Photon Voice 2.2 was just submitted to the Unity Asset Store.
    It may take few hours to be available.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @harlan,

    I think we will have to wait until after holidays, next year for the Unity team to review the asset.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @harlan,

    I have resubmitted 2.2 today and it was released within hours.
  • Thanks, we will upgrade the library soon.
  • @JohnTube need your help,We want to do performance test using the S2S feature, but the documents are so simple,I can not establish the connection between the two servers.Maybe some errors exist during my process or some steps are missed. I already post a discussion, so appreciated if you can give some advice.

    https://forum.photonengine.com/discussion/13530/how-to-use-photon-s2s-feature-to-do-performance-test-on-self-hosted-server#latest