Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Opus for Unity

Discussion in 'Assets and Asset Store' started by ludos, Aug 30, 2016.

  1. ludos

    ludos

    Joined:
    Nov 14, 2011
    Posts:
    55
    Hi,

    i've written a small codepiece that shows how to use the opus codec ( https://www.opus-codec.org/downloads/ ) within unity. it does work, but will need a lot of further work. it's the first free working implementation that is available. i dont know if i will have time to continue working on it. i just used it to learn the first things about networking (thus the ugly git history).

    get it on:
    https://github.com/ludos1978/OpusDotNet

    things you could work on:
    - realtime bitrate conversion: we need 48000 (windows) and 44100 (osx) to 8000, 12000, 16000, 24000, 48000 sampling rate conversion. Also it needs to convert back!
    - background noise removal / reduction
    - make the compression rate modifieable during runtime (add a networked configuration)

    improve it and share your work!
     
  2. DiamondRaids901

    DiamondRaids901

    Joined:
    Oct 11, 2015
    Posts:
    1
    i used this in a basic multiplayer chatting system, dude thank u so much for this! its not the best at the moment like u said, but this has a hell lot of potential. right now it is really good for what it can do! keep it up please!!!
     
  3. booferei

    booferei

    Joined:
    Sep 29, 2016
    Posts:
    21
    Hey, mate. Thanks for sharing.
    I just started integrating it and I couldn't get it to work on my Mac. I got DllNotFoundException.
    Unity doesn't know what to do with "opus.dylib". I renamed it to "opus.bundle" and it worked.
     
  4. nevaran

    nevaran

    Joined:
    May 21, 2010
    Posts:
    247
    Im having trouble decoding the bytes, it seems to stay the same size afterwards

    PS: after further testing it seems that it's the encoder's fault, not the decoder that breaks- it seems to fetch just a very small part of the audio sample for some reason

    Any help will be greatly appreciated!
     
    Last edited: Aug 31, 2017
  5. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    302
    @ludods @Diamondraids I have download your package. i have run on two ipad. But i dont know how to chat with both systems.

    But Opus Supports voice chatting between two ipads. for that what i have to do? i am doing Multiple voice chatting... Where the user can speak with their teams..

    With the help of OpusDotnet... Shall we do voice chatting... If yes means what i have to do...

    Where i can set the server... What i have to configure....

    Could @ludods @Diamondraids help me...