How can i use Photon voice with other microphone listener

I need to use method Microphone.Start() to get loudness of input voice.

After using that, photon voice not work!


How can i use photon voice with using Microphone.Start() in other point?

Answers

  • Dibbie
    Dibbie ✭✭

    I may be misunderstanding what you are trying to do, if you are using Photon Voice, they already handle recording the mic and measuring the "loudness", if you are trying to only send a players voice stream when they are speaking above a certain threshold, you can do that with the Voice Detection section of the recorder: https://doc.photonengine.com/en-us/voice/v2/getting-started/recorder#voice_detection


    If you just want to know how loud they are currently speaking, you can check the recorders "LevelMeter.CurrentPeakAmp", assuming that "isRecording" and "enableTransmit" are both enabled in your voice view

  • @hwookim Do you call Microphone.End after you get, what you need? Calling Microphone.Start starts using the microphone, so it cannot be used by Photon Voice then...

  • @Dibbie

    I wanna know how loud player speaks to control object.

    If the volume is greater than the pivot, the object size is larger.


    I'll try to useLevelMeter.CurrentPeakAmp.

    Thank you for the hint.