• Stars
    star
    227
  • Rank 172,533 (Top 4 %)
  • Language
    C
  • Created over 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Agora Solo is an open source speech codec, it was developed based on Silk with BWE(Bandwidth Extension) and MDC(Multi Description Coding). With these technologies, Solo is enable to resist weak networks at low bitrates.

English|中文

Introduction

Agora SOLO is an open source speech codec, it was developed based on Silk with BWE(Bandwidth Extension) and MDC(Multi Description Coding). With these technologies, SOLO is able to resist weak networks at low bitrates. Solo can support Android/iOS/MacOS/Windows now.

Figure 1. Architecture of SOLO encoder: solo_encoder

Figure 2. Architecture of SOLO decoder: solo_decoder

Overview of key technologies

Bandwidth expansion

The main reason for SOLO to use bandwidth expansion is to reduce the computational complexity. In the WB mode of Silk, all 16KHz signals will enter the subsequent processing module, while for the voice, the information above 8kHz is very small. This part of information will enter the subsequent processing module, which will bring a certain waste of computing resources. Considering MDC needs to introduce additional analysis module to process multiple bitstreams, it will introduce additional complexity, which is one of the important reasons why MDC does not land smoothly in recent years. In order to reduce the complexity, SOLO divide the wideband signal into 0-8k narrowband information and 8-16k high frequency information before coding. Only the narrow-band information will enter the subsequent normal analysis and coding process, so that the subsequent calculation amount will be reduced by half, and the overall quality will not be significantly reduced thanks to the bandwidth expansion algorithm. In the high-frequency information part, SOLO uses an independent analysis and coding module to compress the high-frequency information into a 1.6kbps bitstream by default. This part of high frequency information can be combined with low frequency signal in decoder to recover high frequency signal.

MDC with delay decision

In Silk, delay decision module is a module for computing coding error. It can select the bitstream with the smallest error from multiple candidate bitstreams as the coding output. To some extent, it makes scalar quantization have the performance of vector quantization SOLO uses the delay decision module to realize the analysis and construction of multi description bitstream. The MDC of SOLO mainly acts on the residual signal output by the filter. SOLO will perform multi gain control on the residual signal according to the current signal state: after the MD gain a (0 < a < 1) is calculated, it will be acted on the odd subframe. Meanwhile, the even subframe is multiplied by (1-a) . Here, it is recorded as residual 1 and residual 2.

Figure 3. Multiple description residual signal: solo_residual

Then, the two residual signals will enter into the new delay decision module. Each residual signal uses different seed and quantization methods, which can generate 8 different alternative states. When the two signals are combined, there are 64 alternative composite states. The new delay decision module will weighted sum the independent error of each residual signal and the composite error of the two residual signals then determine the best two residual signals into post coding module.

Stream packing

Figure 4. Encoder stream integration and packing: solo_packing

The default configuration of SOLO is to input 40ms (2 frames) each time and output two complementary multi description bitstreams. When the decoder receives any bitstream, it can decode 40ms signal. In order to facilitate the receiver to distinguish the sequence of the bitstream, the fourth bit on the right of the first byte of the bitstream is the sequence flag bit, the flag value of the first bitstream bit is 0, and the flag value of the second bitstream flag bit is 1. When the receiver processes the bitstream, it can judge the sequence of the stream according to this flag.

Overview of integration methods

Generally speaking, the following changes are needed to migrate SOLO to the media engine:

Integrate SOLO to engine

Developers can either integrate source code or static library to the engine. What need to do is using the AGR_JC1_SDK_API.h,which can be found in the source code. Firstly, call AGR_Sate_Encoder_Init ( ) to configure the encoding state, then use AGR_Sate_Encoder_Encode ( ) to encode audio signal. Finally, call AGR_Sate_Encoder_Uninit ( ) pair after the encoding processing is completed. Using method of decoder is familiar withencoder, just call the relevant function of decoder.

Figure 5. Functions required by encoding: solo_API_en

Figure 6. Functions required by decoding: solo_API_de

Bitstream sending

The encoder inputs 40 ms signal each time, and outputs a whole bit stream including two complementary bit streams. As shown in the figure below, the blue box and orange box respectively represent two independent bitstreams in the output bitstream, each bitstream contains the information of frame 1 and frame 2. When the encoder outputs the bitstream, it will also output the length of each complementary bitstream through an array named nbytesout, nBytesout [0] represents the total length of the bitstream, nBytesout [1] represents the length of the first complementary bitstream, and the engine needs to adjust the length according to this length then divide it into two segments of bitstream and send in different packets.

Figure 7. Bitstream segmentation and contracting: solo_sending

Bitstream screening and synthesis at receiver

At the receiving end, every time a packet needs to be inserted into the buffer, it needs to be determined whether the corresponding complementary packet already exists and which complementary bitstream the current packet contains. The engine can determine which complementary bitstream the current bitstream is based on the bitstream flag bit. If the current cache queue does not have its corresponding packet, it can directly insert the packet payload into the cache queue, and update the array named nbytes according to the bitstream contained in the packet (the decoder depends on the array to determine the current packet receiving status). nBytes [0] represents the total length of the bitstream, and nBytes [1] represents the length of the first complementary bitstream. If there are corresponding complementary packets in the current cache queue, it is necessary to synthesize them: insert the first complementary stream before the second one, and then update the nbytes array state.

Figure 8. BItstream synthesis method at the receiver: solo_neteq

Copyright declaration of Silk

Copyright (c) 2006-2012, Skype. All rights reserved. Redistribution and use in source and binary forms, with or without modification, (subject to the limitations in the disclaimer below) are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Skype, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

License

This software is under the MIT License (MIT).

Another words

We have set up a SOLO exchange post in RTC forum to facilitate everyone's exchange and discussion. The forum link is here. Please feel free to commit your code or give us your idea if you find some problems. Let's make SOLO as a long-term evolution codec.

More Repositories

1

Agora-Flutter-Quickstart

Quickstart guide for the Agora Flutter SDK(Android/iOS)
Dart
500
star
2

MoonLight

MoonLight is a performance test kit on iOS and macOS. It can capture App Memory, App CPU, System CPU, GPU, ANR and iOS FPS and accurately and easily.
Objective-C
268
star
3

AgoraWebSDK-NG

The Next Generation of Agora Web SDK
TypeScript
161
star
4

RTC-Hackathon

CSS
147
star
5

VideoUIKit-Flutter

Flutter plugin to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.
Dart
136
star
6

Agora-RN-Quickstart

Java
111
star
7

Agora_Unity_WebGL

WebGL plugin for Unity, beta release
C#
109
star
8

OpenAgoraWeb-React

Video Call App built with ❤️Agora SDK❤️ and React
JavaScript
99
star
9

VideoUIKit-ReactNative

A React Native package to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.
TypeScript
93
star
10

Agora-RTC-React

A react wrapper for Agora RTC NG SDK
TypeScript
92
star
11

Agora-Electron-Quickstart

Quickstart for Agora Electron SDK(Windows/macOS) https://github.com/AgoraIO/Electron-SDK
JavaScript
70
star
12

Agora-Python-SDK

Use Agora RTC SDK with Python!
C++
63
star
13

VideoUIKit-iOS

Swift package and CocoaPod to simply integrate Agora Video Calling or Live Video Streaming to your iOS or macOS app with just a few lines of code.
Swift
57
star
14

VideoUIKit-Web-React

A Web library to simply integrate Agora Video Calling or Live Video Streaming to your website with just a few lines of code.
TypeScript
49
star
15

CloudClass-Desktop

TypeScript
49
star
16

Agora-Python-QuickStart

Python
40
star
17

OpenAgoraWeb-Vue

Video Call App built with ❤️Agora SDK❤️ and Vue
Vue
36
star
18

agora-token-service

an Agora Token Server using Golang & Gin to run as a webservice
Go
34
star
19

Idea-Box

HTML
34
star
20

RTE-2021-Innovation-Challenge

C++
33
star
21

Agora-RTC-SDK-for-Xamarin

C#
32
star
22

Agora-Node-TokenServer

A simple token server for Agora applications using NodeJS with Express, and Agora Access Token modules.
JavaScript
30
star
23

2019-Hackathon-Works-CoderLane

Coderlane is an online real-time programming environment, a high-fidelity REPL environment. It also supports multi-person programming.
JavaScript
30
star
24

typing

Swift
28
star
25

Agora-Unreal-SDK-Blueprint

Agora Unreal SDK - Blueprint (Beta)
C++
27
star
26

ag-iot-device-demo-esp32

C
27
star
27

Agora-Uniapp-SDK

TypeScript
26
star
28

RTE-Innovation-Challenge-2020

Objective-C
26
star
29

Agora-Rust-SDK

Rust
23
star
30

Agora-Unity-RTM-SDK

A Unity3D sample app to show Login /Logout, Log in to/out of channel, Get Channel Member Count, Send/Receive Channel Message, Send Peer Message, Query Member, and token Authentication
C#
23
star
31

VideoUIKit-Android

An Android package to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.
Kotlin
22
star
32

Agora-Unreal-SDK-CPP

Agora Unreal SDK - C++ (Beta)
C++
21
star
33

agora-unity-partychat-demo

Unity video party chat using Agora SDK and Photon. Refer to the Medium post for project setup from scratch!
C#
20
star
34

AR-Remote-Support

This is a POC of how to build a Remote support app (similar to Vuforia Chalk) using ARKit and Agora.io's Video SDK.
Swift
20
star
35

Agora-Unreal-SDK

C++
17
star
36

CloudClass-Android

Kotlin
16
star
37

ARCoreAgora

Java
16
star
38

Unity-Virtual-Camera-Prefab

An open source prefab that makes it easy to live video streaming from a Unity virtual camera into an Agora live video chat or live video streaming channel.
C#
16
star
39

python-token-builder

Python
15
star
40

agora-remote-desktop-control-samples

TypeScript
15
star
41

LrcView-iOS

Swift
15
star
42

AgoraUWP

Agora WinRT and UWP SDK
C++
15
star
43

MediaIO-Camera

Java
15
star
44

TokenServer-nodejs

One-Click deploy Agora sample token server
JavaScript
15
star
45

CloudClass-iOS

Swift
14
star
46

Agora-iOS-Swift-Example

Example of creating a multi-broadcasting channel with Agora.io
Swift
11
star
47

flexible-classroom-desktop

TypeScript
11
star
48

Collaborative-AR-RTM

A collaborative Augmented Reality iOS experience using Real-time Messaging with RealityKit
Swift
11
star
49

Angular-Agora-RTC

TypeScript
11
star
50

AgoraMultiCall-vue

Vue
10
star
51

Agora-Rust-QuickStart

Rust
10
star
52

AI-in-RTC_ProgrammingChallenge

JavaScript
10
star
53

visionOS-Quickstart

Basic video call with visionOS for Apple Vision Pro. Using Agora RTC SDK.
Swift
10
star
54

agora-rest-client-go

Go
10
star
55

RTE-2022-Innovation-Challenge

RTE 2022 编程挑战赛
C++
10
star
56

Agora-ReactNative-Dynamic-Rooms

Dynamic Video Chat Rooms in React Native using Agora RTC and RTM SDKs. The RTC SDK is used to share live audio/video, RTM is used to signal the room details to all connected users.
TypeScript
9
star
57

Agora-Electron-FaceUnity-Plugin

C++
9
star
58

AvatAR

The project aims to build a playground/plugin which developers can use to define gestures within video calls. For ex. Ability to add VFX like Doctor Strange making those golden circles, Thor lightning up with electricity flowing through him, even do sign language(not finger level fidelity)/human pose detection for a variety of tasks, all within the browser be it on PC or mobile using TensorFlow for ML+AR & Agora to do the video-chat heavy lifting.
JavaScript
9
star
59

awesome-agora

Useful collection of Agora resources.
8
star
60

SwiftUIRtc

SwiftUI and Real-time Video Calling with Agora's RTC SDK
Swift
8
star
61

BeautyAPI

Kotlin
8
star
62

Agora-Web-Conferencing

Web Conferencing Sample using the Agora Platform
TypeScript
8
star
63

Agora-ARKit

Swift
7
star
64

AgoraAdvancedDemo

Advanced guides for Agora Unity SDK for voice and video. http://agora.io
C#
7
star
65

app-builder-core

TypeScript
7
star
66

AUIKaraoke

UIKit
Swift
7
star
67

agora-advanced-web-broadcast-demo

A demo project using the Agora Web RTC and RTM SDKs, leveraging advance RTC features like dual stream with stream fallback, multi-host broadcasting. Web users can mute each other's audio or remove others from the call. Signalling layer is using Agora's RTM SDK.
JavaScript
7
star
68

Agora-RTM-React

A wrapper for Agora RTM Web SDK to use with react/reactjs
TypeScript
6
star
69

ContentContributorGuides

This repository will contain all documents related to the process for publishing content for the Agora Content Contributor Program.
6
star
70

ag-iot-android-app

Java
6
star
71

Agora-demo-web

Agora Web Demo
JavaScript
6
star
72

AgoraARKit

Enabling apps to live stream AR video streams.
Swift
6
star
73

Agora-RTM-Nodejs

Agora RTM SDK on Nodejs
C++
6
star
74

Live-Shop

C++
5
star
75

ag-iot-device-demo

C
5
star
76

2019-Hackathon-Works-Online-Debate

JavaScript
5
star
77

ag-iot-callkit-android-app

Java
5
star
78

EaseIMKit

5
star
79

AgoraWinRT

Agora WinRT and UWP SDK
C++
5
star
80

AUIKit

UIKit
Swift
5
star
81

AgoraFireTV

JavaScript
5
star
82

HousepartyAgora

Java
5
star
83

Agora-Cocos-Quickstart

JavaScript
5
star
84

go-tokenbuilder

a package for the Agora Token classes in Golang
Go
4
star
85

.github

4
star
86

Agora-Unity-MetaKTV

C#
4
star
87

Agora-C_Sharp_QuickStart

C#
4
star
88

UnityCloudRecording

Sample Code for running Cloud Recording in Unity
C#
4
star
89

Agora-Dynamic-Loading-Sample-App-Android

Java
4
star
90

Cloud-Recording-Golang

Golang backend service to help with cloud recording
Go
4
star
91

ag-iot-callkit-esp32-demo

C
4
star
92

Lip-sync

C#
4
star
93

WhatsappAgora

Java
4
star
94

Extension-Voicemod-iOS

Swift
4
star
95

app-builder-docs

JavaScript
4
star
96

cordova-video-chat

Objective-C
3
star
97

Talkboard

Objective-C
3
star
98

Agora-Audio-Example-iOS

Swift
3
star
99

NG-APIExamples

C++
3
star
100

ag-iot-callkit-device-demo

C
3
star