Search Unity

[Announce] Voice Chat / VOIP

Discussion in 'Assets and Asset Store' started by fholm, Jul 20, 2012.

  1. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052


    I'm introducing my next asset called "Voice Chat", which is bound for the asset store within the next few days.
    It allows you to integrate voice/voip communication right into your game, it can run on-top of any networking package and requires no external server/service other then your already existing game server as it's completely contained within Unity and piggy-backs on your existing networking solution.

    Asset Store Link
    http://u3d.as/content/fholm/voice-chat/3aB

    Features

    • Windows, OS X and Web Player support
    • 4Khz, 8Khz and 16Khz sample rates
    • Supports Speex and A-Law audio encoding
    • Optional Zlib stream compression
    • Push-to-talk and Toggle-to-talk keys
    • Auto-detect speech (if enabled, dont require key to be held down for speaking)
    • Can be plugged into any networking package as long as you can send int, short, byte and byte[]
    • Comes with pre-built support for the default Unity Networking

    Future Features
    • Background noise reduction filter

    Video Preview

     
    Last edited: Jul 26, 2012
  2. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    This looks great! Might be great for shooters where coop is necessary. Is there a demo available?
     
  3. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    There will be a demo available once it's fully done :)
     
  4. xandeck

    xandeck

    Joined:
    Apr 2, 2009
    Posts:
    563
    Nice, fholm... following this
     
  5. OneManArmy3D

    OneManArmy3D

    Joined:
    Jun 2, 2011
    Posts:
    191
    Great, but it will run only on unity PRO?
     
  6. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    No it runs on both Free and Pro (assuming you have access to the Microphone in Free also)
     
  7. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I believe you do, but don't quote me on that.
     
  8. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    This sounds great! I have my own library written for this stuff.

    Microphone works in free and pro... FYI... Some devices can't record at the lower rates so you need to downsample...

    I'd love to have auto voice detection! Keep us posted!
     
  9. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    This is the last piece I'm working on right now :) I know a lot of smaller devices like phones, etc. can only record at a few or one rate, but how common is this at desktop/laptop level? I've been trying to find a microphone (connected to a computer) which doesn't return 0, 0 for min, max frequency ... but honestly can't.
     
    Last edited: Jul 21, 2012
  10. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    My USB headset can only do 44.1 I learned this when I was writing my own lib :) it can play anything though...
     
  11. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Yeah, I'd just like one to actually test/verify with for myself :( Have gone through like 15+ head sets/mics/webcams and they all return "0, 0". Ah well, can just simulate it but still annoying.
     
  12. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    229
    Will this support 3d audio? I'm guessing it would if it sends the data over your current networking solution (ours is Photon), that you could send the data to any audio player you want?

    edit: btw awesome work. Many people have been waiting forever for this.
     
    Last edited: Jul 21, 2012
  13. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    As the audio that is recorded from the "Microphone" class in unity is 2d audio, this will not support 3d audio sadly, and nothing I can do about it :(
     
  14. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    229
    ah, should write Unity about that then. Would it be possible to fake the 3d audio by adjusting the volume level and pan settings depending on distance and location? Maybe not quite as realistic but believable and functional. I'd gladly work on this as an addition if it's possible with the system.
     
  15. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    It should most likely be possible to somehow fake 3d yes, the system uses the native unity Microphone, AudioSource and AudioClip classes so anything you can do with them you can do with this.
     
  16. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I would just like to report that the asset is done, currently working on the manual. I also recorded a sample of how the sound is using the Speex codec @ 16Khz: https://dl.dropbox.com/u/19877504/speex_16.mp3.

    It uses about 4kb/s up-stream from the sender, which is a 4:1 compression ratio!

     
  17. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    Oh, good! I was just going to start looking into a peer-to-peer voice chat solution.

    Any ETA and price estimate yet?
     
  18. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    229
    Awesome news, I'll set it up with Photon and the fake 3d sound as soon as we can get our hands on it. Any info on availability, asset store or otherwise?
     
  19. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I just finished up the manual, which was the last piece. Submitting to the asset store now, so it will be available as soon as the Unity team looks at it. Price will be 40$.

    You can read the manual a head of time here: https://dl.dropbox.com/u/19877504/VoiceChat_Manual.pdf if you wanna peek at the features/setup.
     
  20. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    there we go, submitted, just waiting for approval:

     
  21. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    229
    =) hopefully it won't arrive october 29th in the year 2101. Will be buying asap
     
  22. UnlimitedEdition

    UnlimitedEdition

    Joined:
    Feb 27, 2012
    Posts:
    287
    Great product, even better price :)
     
  23. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Will this work if I am using a smartfox server or photon?
     
  24. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Read the manual linked a few posts back, it explains how integration with smartfox/photon/etc. works
     
  25. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    thank you will do.
     
  26. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Also about a live demo, I've tried putting something up - but realized quickly it would require me to be running a server 24/7, which isn't feasible.
     
  27. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    Can't it work peer-to-peer?
     
  28. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Yes, assuming you have a way to send specific messages to each player, there should be no problem.
     
  29. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    I was really hoping to throw some money at this tonight and try it out. Come on, UT! Approve it already! :)
     
  30. surfy1h

    surfy1h

    Joined:
    Nov 23, 2010
    Posts:
    16
    Great stuff. I'm not sure I understand the manual for setting it up in Photon.
    Could you do a video on basic setup? I have buyed a few of your scripts and they are awesome!
     
  31. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Setting it up with photon/ulink/any other third party networking is a bit more work then doing it with the default unity networking. Basically it requires you to write the integration yourself, as I can't write integration for every possible networking layer there is (simply too much work).
     
  32. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Still waiting on approval :(
     
  33. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    229
    as are we
     
  34. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
  35. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    I didn't get to play with it much last night, but playing with the demo was successful. I'm looking forward to using this in a game idea I had just a few days ago. This is a very, very timely asset. :)
     
  36. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I'm glad you like it!

    When you've had time to play with it more, I would very much appreciate a review on the store, no matter if it's a good or bad one :)
     
  37. Qmaks2

    Qmaks2

    Joined:
    Jun 2, 2012
    Posts:
    25
    Can you integrate this chat with Photon?
     
  38. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Yes it is possible, but I'm not sure this is something I would like to do. Are you talking about PUN or the "normal" photon?
     
  39. Qmaks2

    Qmaks2

    Joined:
    Jun 2, 2012
    Posts:
    25
    With PUN. I need voice chat for my project on PUN
     
  40. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Ok, since PUN is very similar to the default unity networking it should be really easy to convert the demo code for yourself, as it's built for the default networking.
     
  41. XY01

    XY01

    Joined:
    Jul 15, 2011
    Posts:
    24
    Any plan for android support?
     
  42. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    It should work on android without any problems (it's not using any weird APIs or non-standard behavior), it's just that I have not tested it so I can't guarantee it, if you want I can try to get a hold of an android phone and test it out.

    You might have to disable the auto-detect speech though as I'm guessing managed Fourier transforms will be to slow for mobile devices.
     
  43. kilt

    kilt

    Joined:
    Oct 12, 2011
    Posts:
    136
    nvm
     
    Last edited: Jul 30, 2012
  44. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I've been selling a lot of these kits, but have not heard back from any users or gotten any reviews, anyone willing to comment? :)
     
  45. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    Can you post the link to the asset store?
     
  46. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
  47. Joyrider

    Joyrider

    Joined:
    Aug 31, 2012
    Posts:
    27
    Hi, Great package you have there.

    We're trying to integrate it in an application... so far so good.
    Until we tried to have the host be a player too.

    So basically, contrary to your example, in our application, a user can also host a game while playing at the same time (and thus host a non-dedicated server). And so far we've had no luck in implementing the voice on the one hosting the game.

    Hence my question : Is there a way for a player hosting a game to also be able to use the voice chat? And thus use voice chat without a dedicated server?
     
  48. cel

    cel

    Joined:
    Feb 15, 2011
    Posts:
    46
    @fholm

    very good... any chance in the near future to add video?
     
  49. Joyrider

    Joyrider

    Joined:
    Aug 31, 2012
    Posts:
    27
    @fholm
    Any chance to get some feedback on the possibility of using voice chat with a non-dedicated server?

    thx
     
  50. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Hey, sorry for the late response - there should not be any technical problem standing in your way of using it with a non-dedicated server, but you would have to modify the current logic a bit and allow a local recorder to transmit to the server, and also have the server listen to the audio it forwards.