OpenVoiceSharp 1.0.3

dotnet add package OpenVoiceSharp --version 1.0.3                
NuGet\Install-Package OpenVoiceSharp -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenVoiceSharp" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OpenVoiceSharp --version 1.0.3                
#r "nuget: OpenVoiceSharp, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OpenVoiceSharp as a Cake Addin
#addin nuget:?package=OpenVoiceSharp&version=1.0.3

// Install OpenVoiceSharp as a Cake Tool
#tool nuget:?package=OpenVoiceSharp&version=1.0.3                

<img src="https://raw.githubusercontent.com/realcoloride/OpenVoiceSharp/master/openvoicesharp.png" alt="OpenVoiceSharp" width="28" height="28"> OpenVoiceSharp

Agnostic VoIP Voice Chat and Audio Streaming C# library.

Introduction

[!WARNING] This package is not ready to use and is in work in progress. Please come back later!

OpenVoiceSharp is an extremely simple, basic compact library that allows for real time VoIP (Voice over IP) voice chat and audio streaming. It allows for any app or game to embed voice chatting functionality.

OpenVoiceSharp utilizes Opus as codec under the hood and RNNoise for basic (toggleable) noise suppression and WebRTC VAD (voice activity detection).

OpenVoiceSharp also has a dedicated class (VoiceUtilities) for converting PCM to float formats depending on use cases for engines.

Why did I make this?

I believe that voice chat, proximity or not is an essential functionality for game immersion or multiplayer, or discussion. Though, when searching for a friendly open source/free alternative other than Steam's Voice API or Epic Online Services's Voice API, I could not find any, and to make matters worse, it was extremely difficult to get information around how voice chat/audio streaming essentially worked under the hood, which can make difficult for people to make their own voice chat implementation.

Most alternatives are paid (Vivox, Photon Voice, Dissonance etc...) & are mostly compatible for Unity, which can cause an issue for developers using their own game engine, app stack, or game engines like the Godot Engine.

So upon learning how to make VoIP myself, I decided to share the knowledge into this library to make sure no one has to ever struggle with VoIP again, because I also believe that implementation for such things should be easy to use and implement.

Features

  • ๐Ÿ•“ Agnostic: no specific engine/environment required!
  • โšก Easy and friendly to use: all you need is a way to record and playback the audio!
  • ๐ŸŽ™๏ธ Basic microphone recorder class: no way to record the audio correctly or easily? BasicMicrophoneRecorder does that!
  • ๐Ÿ’ฅ Low memory footprint: using Opus, the packets are tiny! And OpenVoiceSharp aims to be as memory efficient and performant as possible.
  • ๐ŸŽต Audio streaming favoring: option to encode less for better quality packets for audio streaming and more!
  • ๐Ÿ˜ฏ Low latency: OpenVoiceSharp aims to be as low latency as possible. One opus frame is only 20ms!
  • ๐Ÿ”Š Customizable bitrate: make audio crystal crisp or not, it depends on you! (Supports from 8kbps up to 512kbps)
  • ๐Ÿƒ Basic noise suppression using RNNoise (can be toggled)
  • ๐Ÿงช Basic voice conversion utilies: convert 16 bit PCM to float 32 PCM and so on.
  • ๐Ÿ—ฃ๏ธ Voice activity detection (VAD): out of the box basic voice activity detection using WebRTC's VAD.

[!NOTE]
OpenVoiceSharp is meant to be extremely basic and straightforward. Audio playback, modification (effects or more) and features such as groups, teams, muting should be left to implement by yourself. OpenVoiceSharp just provides a basic way to encode and decode voice packets along with a basic microphone recorder.

Requirements

  • Windows (64 bit)
  • .NET 6.0 and higher or support for .NET Standard 2.1
  • Visual Studio

[!WARNING] OpenVoiceSharp currently only supports Windows 64 bit, atleast the dependencies do. I currently do not plan on integrating native support for MacOS, Linux, Android or others but you can compile the libraries yourself and link them.

Installation & Usage

Everything you need to know or do can be found in the wiki.

Contribute

If you wish to contribute, you have a few ways:

By supporting the project:

  • ๐Ÿ—ฃ๏ธ Feedback, ideas, or bug reports can be opened talked through the Discord server or through Issues.
  • ๐ŸŒŸ Leave a star or share this project.

Or sending me a coffee:

๐Ÿ’– I do those projects out of pure passion and love for the craft. All my open source projects will remain free to use forever.

โ˜• If you wish to support me, send me a coffee on ko.fi: https://ko-fi.com/coloride

Licenses & Disclaimer

OpenVoiceSharp uses the following libraries, so by using OpenVoiceSharp, you accept their license's conditions.

[!TIP]
Most of the libraries used by OpenVoiceSharp are MIT licensed, except for WebRTC's VAD, which contains the license from WebRTC.

As of this library, just good old MIT.

ยฉ (real)coloride - 2024 | Licensed MIT
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 143 6/16/2024
1.0.2 168 4/16/2024
1.0.1 121 4/11/2024
1.0.0 114 4/11/2024

Changed copying via array in circular buffer for optimization