Recorder Initialization Problem with Oculus Avatar

d0raem0n231
edited June 2019 in Photon Voice
Recorder Initialization Problem with Oculus Avatar

https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/oculusavatarsdk
https://you-rang.tistory.com/268?category=758175

I follow these tutorials

Warning sign after playing editor in unity3d

"Recorder requires initialization. Call Recorder.Init(VoiceClient, Object)"

I don't know how to initialize recorder
and where to find VoiceClient and Object.

Isn't there a conflict between Photon and Oculus Avatar regarding about recording?

Comments

  • d0raem0n231
    edited September 2019
    public class PhotonVoiceRecorderInit : MonoBehaviour
    {
        private Photon.Voice.PUN.PhotonVoiceView photonVoiceView;
        private Photon.Voice.Unity.Recorder recorder;
    
        // Start is called before the first frame update
        void Start()
        {
            photonVoiceView = this.GetComponent<Photon.Voice.PUN.PhotonVoiceView>();
            recorder = FindObjectOfType<Photon.Voice.Unity.Recorder>();
            Invoke("RecorderInitialize", 3);
        }
    
        public void RecorderInitialize()
        {
            photonVoiceView.enabled = true;
            recorder.RestartRecording();
        }
    }
    // I think that I solved the problem..
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @d0raem0n231,

    I want to know how this happened as I'm not sure the workaround script is needed.
    photonVoiceView.enabled = true;This will do the actual initialization (which happens inside MonoBehaviour.OnEnable) and probably starts recording.
    However, recorder.RestartRecording(); is not needed.

    In fact, the primary recorder (PhotonVoiceNetwork.Instance.PrimaryRecorder) or PhotonVoiceView.RecorderInUse should be automatically initialized on your behalf.

    So it may be a timing issue.
    Are you using manual instantiation?
    Are you using a scene object?

    Could you share the full stack trace of this warning:
    "Recorder requires initialization. Call Recorder.Init(VoiceClient, Object)"
  • d0raem0n231
    edited June 2019
    I don't know exactly what happened.

    "Recorder requires initialization. Call Recorder.Init(VoiceClient, Object)"
    That's a whole messege of warning from Recorder.

    I have to get Oculus user ID for customized Avatar,
    so the point of instantiating LocalAvatar and RemoteAvatar became to be important..
    But I think I should think more, because RemoteAvatars are staying standard shape.

    After photonVoiceView.enabled = true;
    Recorder said that restart is needed. It is a mess, but it works. That is also a problem.

  • Hi @d0raem0n231

    I had follow all the steps u have mentioned, Voice connection is perfectly working,

    But Avatar lip sync is not working is there any setup for lip sync working in multipayer with voice chat please calrify this .

    Thanks in advance.
  • @SaravanaPerumal
    I guess that it depends on Oculus setup..
    simplely check box on off

    You know
    caution to distingush between localAvatar and remoteAvatar
  • Hi @d0raem0n231

    I did canownMicrophone check box on/off in both local and remote avatar but it did not work.

    if You had try this please share the setting.

    Thanks in advance.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @d0raem0n231, @SaravanaPerumal,

    Could you try (copy-paste and overwrite it) this PhotonVoiceView version without the workaround script from above? also increase logging level to WARNING at least of the PhotonVoiceView.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hey @d0raem0n231, @SaravanaPerumal,

    Photon Voice 2.10 got released and it addresses this particular issue.
    Could you update and try it out w/o the workaround script from above?