2

I am creating multiplayer game using photon. The game also supports photon voice.

I do want to support some bot mechanism where user can ask some questions to bot. With predefined command to bot (hey dummybot), it can understand the question and convert it to text.

I am using below plugins

  1. Photon voice https://assetstore.unity.com/packages/tools/audio/photon-voice-45848

  2. Speech to text https://assetstore.unity.com/packages/add-ons/machinelearning/google-cloud-speech-recognition-vr-ar-desktop-desktop-72625

Both these plugins need access to microphone.

The problem I am facing is, If I am connected to photon voice (which understand the speech and transmit it to other network players) and same time trying to convert the same speech to text using speech to text plugin, it's not allowing me to do so. Speech to text failed to connect to microphone as photon voice is already using it

Is it possible to get microphone access to both plugins? How can I achieve that?

chetan rane
  • 533
  • 2
  • 10
  • 25

1 Answers1

0

So to someone who's interested to know, I found one workaround to this.

  1. Create audio clip using microphone data
  2. Save audio clip
  3. Pass audioclip time photon voice for network transmission
  4. Using Google cloud speech to text api, convert audioclip to text
chetan rane
  • 533
  • 2
  • 10
  • 25