Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Released] DFVoice - VoIP Plugin

Discussion in 'Assets and Asset Store' started by PhobicGunner, Jul 9, 2014.

  1. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    So I'm thinking, for now I've only got the means to compile Windows DLLs for Opus. So for now I'll likely just use those to get it working, then release the update with just those DLLs at first, and then:

    1.) If you want to get it working on any platform of your choice, you can download Opus (it's free and open source), compile the source code for that platform, and drop in the library file and it should theoretically just work.
    2.) Later I may drop in library files for other platforms as I go (if you figure out how to compile Opus for other platforms, you could also pester me over PM and send me the library files - just a suggestion :p)
     
    hopeful likes this.
  2. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    So here's a test of the Opus codec. I used the song "The Corrupted", from Kingdom Hearts 2.5 HD Remix. The codec's bitrate is set to 64kbps.



    The first second or so is silent, I think Opus throws away some amount of the first audio it receives or something. This first bit of silence seems to be a lot smaller with the MicrophoneInputDevice, for instance.

    One change that had to be made to support this is that what frequency a given FrequencyMode maps to now depends on the codec - there's now an IFrequencyProvider interface for this. The Speex codec, for instance, maps frequency as follows:

    Narrow - 8khz
    Wide - 16khz
    UltraWide - 32khz

    Whereas the new Opus codec does not support 32khz, so it maps frequency as follows:

    Narrow - 8khz
    Wide - 16khz
    UltraWide - 48khz
     
  3. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    (So happy to see this moving along! Yay!) :)
     
  4. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Yep, pretty much finishing things up now. What I'll do is include the Opus stuff in a nested package. So if you want to use the experimental Opus codec, you'd import that package and then reboot Unity (the Opus wrapper, by necessity, uses unsafe methods, so the package will include smcs.rsp and gmcs.rsp files to enable unsafe code).
    Also updating the included readme for two reasons:
    1.) Clarify that the splash screen or other attribution isn't a requirement anymore.
    2.) Explain how to import and use the experimental Opus codec.

    Should be able to submit an update today :)

    EDIT: Update submitted
     
    Last edited: May 17, 2015
    hopeful likes this.
  5. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    Question about "threshhold" (when not using push-to-talk) is this value 0 to 1, or is it 0 to max float?
    Also, is OPUS still Windows only? This project here:
    https://github.com/martindevans/MumbleSharp

    Looks like it is using an opus.dll (maybe it's multiplatform?)

    -Carmine
     
  6. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Threshold is 0 to 1.

    And as far as Windows only:

     
  7. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    I'm having a problem with NSpeex.dll. When I try to build for iOS it gives me an AOT cross compile error. I tried .Net 2.0 and .net 2.0 subset (same issue with both).

    (it worked fine for android and all other versions).
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Has anybody been able to play with the Opus stuff yet? I see it was included in the latest update.
     
  9. vitosflash

    vitosflash

    Joined:
    Apr 2, 2015
    Posts:
    1
    Is it possible to get Unity 4.6 compatible version of DFVoice if I purchase current version from Asset Store?
     
  10. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    637
    How is this on android?
     
  11. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    I am having an issue setting this up with my project. When I import the asset I get this error.
    Assets/DFVoice/Scripts/Codec/SpeexCodec.cs(29,39): error CS0433: The imported type `NSpeex.SpeexEncoder' is defined multiple times

    Someone please help. I really need this ready to go before the launch of my beta.
     
  12. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Does this error happen if you import into an empty project?
    If not, maybe you already had the NSpeex DLL in your project beforehand, so ensure your project only has one NSpeex DLL.
     
    RealAspireGames likes this.
  13. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    That fixed the issue. Thank you for the awesome support. :)
     
  14. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    I am having trouble setting this up with UFPS multiplayer asset. I made the script that sends voice data over the network. But only 1 player is able to talk while others cannot.
     
  15. Stone-Legion

    Stone-Legion

    Joined:
    Aug 16, 2013
    Posts:
    112
    If this is not abandon we love to give your product a try and reevaluate it since your last update.

    Feel free to PM us.