The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Voice.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Detect when user is talking with VoiceDetection

BFX
2020-04-10 12:51:35

I've activated VoiceDetection and regulated the threshold accordingly. It works well, I can clearly hear my voice being transmitted when talking and transmission being put on hold during silence. However, I need to fire some events connected to when the user is talking and I'm not able to do so.

These are my current Recorder settings --> https://ibb.co/K6wHLmg

And this is the code I'm using to detect when the user is talking:

My log is showing "Talking" all the time even during silence.

My Stack:

Comments

JohnTube
2020-04-12 09:16:00

Hi @BFX,

Make sure Photon Voice version is correct!
It should be 2.15 and not 1.23.

You could use Recorder.VoiceDetector.Detected or Recorder.VoiceDetector.OnDetected.
Or Recorder.IsCurrentlyTransmitting.

By the way, you could get the Recorder in use from PhotonVoiceView.RecorderInUse.

BFX
2020-04-15 19:27:04

Thanks a lot. We updated it and using Recorder.IsCurrentlyTransmitting. Now it's working well.

Back to top