Skip to content

Commit 1337ed9

Browse files
authored
ONNX open source and update license terms (#32)
ONNX open source and update license terms
1 parent 0010cd1 commit 1337ed9

39 files changed

+9103
-27
lines changed

LICENSE

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Open Source License
2+
3+
The ten-vad is licensed pursuant to the Apache License v2.0, with the
4+
following additional conditions. You may reproduce, prepare Derivative Works
5+
of, publicly display, publicly perform, sublicense, distribute, or otherwise
6+
make available (together, "Deploy") the ten-vad, for commercial or
7+
non-commercial purposes, provided that you agree to abide by the terms below:
8+
9+
1. You may not Deploy the ten-vad in a way that competes with Agora's
10+
offerings and/or that allows others to compete with Agora's offerings,
11+
including without limitation enabling any third party to develop or
12+
deploy Applications.
13+
14+
2. You may Deploy the ten-vad solely to create and enable deployment
15+
of your Application(s) solely for your benefit and the benefit of your
16+
direct End Users. If you prefer, you may include the following notice in
17+
the documentation of your Application(s): "Powered by ten-vad".
18+
19+
3. Derivative Works of the ten-vad remain subject to this Open Source
20+
License.
21+
22+
4. "End Users" shall mean the end-users of your Application(s) who access
23+
the ten-vad solely to the extent necessary to access and use the
24+
Application(s) you create or deploy using ten-vad.
25+
26+
5. "Application(s)" shall mean your software programs designed or developed
27+
by using the ten-vad or where deployment is enabled by the ten-vad.
28+
29+
Copyright © 2025 Agora
30+
31+
Licensed under the Apache License, Version 2.0 (the "License");
32+
you may not use this file except in compliance with the License.
33+
You may obtain a copy of the License at
34+
35+
http://www.apache.org/licenses/LICENSE-2.0
36+
37+
Unless required by applicable law or agreed to in writing, software
38+
distributed under the License is distributed on an "AS IS" BASIS,
39+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40+
See the License for the specific language governing permissions and
41+
limitations under the License.
42+
43+
=======================================================================================
44+
45+
Note that the project contains derived code from other open source project
46+
with BSD-3-Clause and BSD-2-Clause license, refer to the "NOTICES"
47+
file in the root directory for detailed information.

NOTICES

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
This project includes modified code from the following third-party component:
2+
3+
1. File: lpcnet_enc.c
4+
- Source: LPCNet (https:github.com/xiph/LPCNet)
5+
- License: BSD-2-Clause
6+
- Copyright: 2017-2019, Mozilla
7+
- Original License Text:
8+
Copyright (c) 2017-2019 Mozilla
9+
10+
Redistribution and use in source and binary forms, with or without modification,
11+
are permitted provided that the following conditions are met:
12+
13+
- Redistributions of source code must retain the above copyright notice,
14+
this list of conditions and the following disclaimer.
15+
16+
- Redistributions in binary form must reproduce the above copyright notice,
17+
this list of conditions and the following disclaimer in the documentation
18+
and/or other materials provided with the distribution.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31+
32+
2. Project: LPCNet
33+
- Source: LPCNet (https:github.com/xiph/LPCNet)
34+
- License: BSD-3-Clause
35+
- Copyright: 2017-2018, Mozilla, 2007-2017, Jean-Marc Valin, 2005-2017, Xiph.Org Foundation, 2003-2004, Mark Borgerding
36+
- Original License Text of LPCNet open source project:
37+
Copyright (c) 2017-2018, Mozilla
38+
Copyright (c) 2007-2017, Jean-Marc Valin
39+
Copyright (c) 2005-2017, Xiph.Org Foundation
40+
Copyright (c) 2003-2004, Mark Borgerding
41+
42+
Redistribution and use in source and binary forms, with or without
43+
modification, are permitted provided that the following conditions
44+
are met:
45+
46+
- Redistributions of source code must retain the above copyright
47+
notice, this list of conditions and the following disclaimer.
48+
49+
- Redistributions in binary form must reproduce the above copyright
50+
notice, this list of conditions and the following disclaimer in the
51+
documentation and/or other materials provided with the distribution.
52+
53+
- Neither the name of the Xiph.Org Foundation nor the names of its
54+
contributors may be used to endorse or promote products derived from
55+
this software without specific prior written permission.
56+
57+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
58+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
59+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
60+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
61+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
62+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
63+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
64+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
65+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
66+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
67+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68+

README.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<br>
1515

1616
*Latest News* 🔥
17+
- [2025/06] We **finally** released and **open-sourced** the **ONNX** model and the corresponding **preprocessing code**! Now you can deploy **TEN VAD** on **any platform** and **any hardware architecture**!
1718
- [2025/06] We are excited to announce the release of **WASM+JS** for Web WASM Support.
1819
<br>
1920

@@ -43,14 +44,13 @@
4344
- [TEN Ecosystem](#ten-ecosystem)
4445
- [Ask Questions](#ask-questions)
4546
- [Citations](#citations)
46-
- [Usage Guidance](#usage-guidance)
47-
- [Future Open Source Plan](#future-open-source-plan)
47+
- [License](#license)
4848

4949
<br>
5050

5151
## Welcome to TEN
5252

53-
TEN is a collection of open-source projects for building real-time, multimodal conversational voice agents. It includes [ TEN Framework ](https://github.com/ten-framework/ten-framework), [ TEN Turn Detection ](https://github.com/ten-framework/ten-turn-detection), TEN Agent, TMAN Designer, and [ TEN Portal ](https://github.com/ten-framework/portal), all fully open-source. [ TEN VAD ](https://github.com/ten-framework/ten-vad) is not fully open-source yet, but it is open for public use.
53+
TEN is a collection of open-source projects for building real-time, multimodal conversational voice agents. It includes [ TEN Framework ](https://github.com/ten-framework/ten-framework), [ TEN VAD ](https://github.com/ten-framework/ten-vad), [ TEN Turn Detection ](https://github.com/ten-framework/ten-turn-detection), TEN Agent, TMAN Designer, and [ TEN Portal ](https://github.com/ten-framework/portal), all fully open-source.
5454

5555
<br>
5656

@@ -354,7 +354,7 @@ from ten_vad import TenVad
354354

355355
### **C Usage**
356356
#### **Build Scripts**
357-
Located in examples/ directory:
357+
Located in examples/ directory and examples_onnx (for **ONNX** usage on Linux):
358358

359359
- Linux: build-and-deploy-linux.sh
360360
- Windows: build-and-deploy-windows.bat
@@ -374,7 +374,7 @@ Runtime library path configuration:
374374
- Configure toolchain and architecture settings
375375

376376
#### **Overview of Usage**
377-
- Navigate to examples/
377+
- Navigate to examples/ or examples_onx/ (for **ONNX** usage on Linux)
378378
- Execute platform-specific build script
379379
- Configure dynamic library path
380380
- Run demo with sample audio s0724-s0730.wav
@@ -396,11 +396,20 @@ sudo apt update
396396
sudo apt install libc++1
397397
```
398398

399-
##### **Usage**
399+
##### **Usage (prebuilt-lib)**
400400
```
401401
1) cd ./examples
402402
2) ./build-and-deploy-linux.sh
403403
```
404+
405+
##### **Usage (ONNX)**
406+
You have to download the **onnxruntime** packages from the [official website](https://github.com/microsoft/onnxruntime). Note that the version of onnxruntime must be higher than or equal to 1.17.1 (e.g. onnxruntime-linux-x64-1.17.1.tgz).
407+
```
408+
1) cd examples_onnx/
409+
2) ./build-and-deploy-linux.sh --ort-root /absolute/path/to/your/onnxruntime/root/dir
410+
```
411+
Note: If executing the onnx demo from a different directory than the one used when running build-and-deploy-linux.sh, ensure to create a symbolic link to src/onnx_model/ to prevent ONNX model file loading failures.
412+
404413
<br>
405414

406415
#### **2. Windows**
@@ -538,32 +547,13 @@ Most questions can be answered by using DeepWiki, it is fast, intutive to use an
538547
```
539548
<br>
540549

541-
## Usage Guidance
550+
## License
542551

543-
1. You may not Deploy the TEN VAD in a way that competes with Agora's
544-
offerings and/or that allows others to compete with Agora's offerings,
545-
including without limitation enabling any third party to develop or
546-
deploy Applications.
547-
548-
2. You may Deploy the TEN VAD solely to create and enable deployment
549-
of your Application(s) solely for your benefit and the benefit of your
550-
direct End Users. If you prefer, you may include the following notice in
551-
the documentation of your Application(s): "Powered by TEN VAD".
552-
553-
3. "End Users" shall mean the end-users of your Application(s) who access
554-
the TEN VAD solely to the extent necessary to access and use the
555-
Application(s) you create or deploy using TEN VAD.
556-
557-
4. "Application(s)" shall mean your software programs designed or developed
558-
by using the TEN VAD or where deployment is enabled by the TEN
559-
VAD.
552+
This project is Apache 2.0 with additional conditions licensed. Refer to the "LICENSE" file in the root directory for detailed information. Note that `pitch_est.cc` contains modified code derived from [LPCNet](https://github.com/xiph/LPCNet), which is [BSD-2-Clause](https://spdx.org/licenses/BSD-2-Clause.html) and [BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html) licensed, refer to the NOTICES file in the root directory for detailed information.
560553

561554

562555
<br>
563556

564-
## Future Open Source Plan
565-
566-
TEN-VAD is currently released as a binary. Based on community feedback and interest, we plan to progressively open source the internal components of the binary.
567557

568558
[back-to-top]: https://img.shields.io/badge/-Back_to_top-gray?style=flat-square
569559

examples/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#
2+
# Copyright © 2025 Agora
3+
# This file is part of TEN Framework, an open source project.
4+
# Licensed under the Apache License, Version 2.0, with certain conditions.
5+
# Refer to the "LICENSE" file in the root directory for more information.
6+
#
17
cmake_minimum_required(VERSION 3.10)
28
get_filename_component(ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../ ABSOLUTE)
39

examples/build-and-deploy-android.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
2+
#
3+
# Copyright © 2025 Agora
4+
# This file is part of TEN Framework, an open source project.
5+
# Licensed under the Apache License, Version 2.0, with certain conditions.
6+
# Refer to the "LICENSE" file in the root directory for more information.
7+
#
28
set -eo pipefail
39

410
# Customize the arch and toolchain

examples/build-and-deploy-ios.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/usr/bin/env bash
2+
#
3+
# Copyright © 2025 Agora
4+
# This file is part of TEN Framework, an open source project.
5+
# Licensed under the Apache License, Version 2.0, with certain conditions.
6+
# Refer to the "LICENSE" file in the root directory for more information.
7+
#
28
set -euo pipefail
39

410
work_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

examples/build-and-deploy-linux.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
2+
#
3+
# Copyright © 2025 Agora
4+
# This file is part of TEN Framework, an open source project.
5+
# Licensed under the Apache License, Version 2.0, with certain conditions.
6+
# Refer to the "LICENSE" file in the root directory for more information.
7+
#
28
set -euo pipefail
39

410
arch=x64

examples/build-and-deploy-mac.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
2+
#
3+
# Copyright © 2025 Agora
4+
# This file is part of TEN Framework, an open source project.
5+
# Licensed under the Apache License, Version 2.0, with certain conditions.
6+
# Refer to the "LICENSE" file in the root directory for more information.
7+
#
28
set -euo pipefail
39

410
# Customize the arch

examples/build-and-deploy-windows.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
@echo off
22
setlocal
33

4+
@REM
5+
@REM Copyright © 2025 Agora
6+
@REM This file is part of TEN Framework, an open source project.
7+
@REM Licensed under the Apache License, Version 2.0, with certain conditions.
8+
@REM Refer to the "LICENSE" file in the root directory for more information.
9+
@REM
10+
411
@REM Customize the arch
512
set arch=x64
613
@REM set arch=x86

examples/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
//
2+
// Copyright © 2025 Agora
3+
// This file is part of TEN Framework, an open source project.
4+
// Licensed under the Apache License, Version 2.0, with certain conditions.
5+
// Refer to the "LICENSE" file in the root directory for more information.
6+
//
17
#include <stdio.h>
28
#include <stdint.h>
39
#include <stdlib.h>

0 commit comments

Comments
 (0)