Search Unity

Implementing PicoVoice/Porcupine in Unity

Discussion in 'General Discussion' started by tsdk, Sep 30, 2019.

  1. tsdk

    tsdk

    Joined:
    Jun 26, 2019
    Posts:
    1
    Hi,

    I'm currently looking into the possibility of using Picovoice/porcupine (https://github.com/Picovoice/porcupine) for a handsfree experience that I am building with Unity.

    There is already a c# binding
    https://github.com/Picovoice/porcupine/blob/master/binding/dotnet/PorcupineCS/Porcupine.cs

    I was wondering if anyone has any guidance as to the feasibility of implementing this so that it could run in the background of scenes. Opening up a Microphone session? Would this just ramp up to a ridiculous degree the battery usage of the application?

    Or is it better to implement this natively and develop some bridging software so that Unity and the native implementation can talk to each other?

    Any help is very appreciated.

    tsdk
     
  2. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    585
    It depends on the application. I created an application and ultimately decided that the user would need to push a button to activate the microphone for voice recognition. I was using a cloud-based service for voice recognition, I looked at PocketSphinx and it just not up to the quality people expect from Siri or Alexa. Most on-computer voice recognition requires that you train it for that specific person's voice and likely needs to have a consistent level of background noise.

    I assume that Siri and Alexa are constantly listening and sending your voice to the cloud for processing, waiting for the 'wake word'. For my application, it was not practical (or cost-effective) to leave the microphone on all the time, sending the recording to the cloud as you are charged per translation.

    Porcupine looks like it's using on-computer AI to behave more like Siri and Alexa. It still needs training, but presumably can handle more voices and accents. I would imagine the drain would be less than an always hooked up to the cloud system. It's also much better at privacy concerns, so I like the idea. That said, if it's only 4X better than PocketSphinx, that's not a huge improvement.

    You should probably just download and test it yourself. I'd really like to hear your results and if Porcupine is a viable system to produce a Siri or Alexa quality experience.