Model card and the original license
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.12345678910111213141516171819Inworld SAVACopyright 2026 Inworld AI
The model weights were trained on Inworld first-party data, including datapurchased from vendors under private terms, and on these third-party datasets:
- pipecat smart-turn data v3.2, train split: CC BY 4.0, https://huggingface.co/datasets/pipecat-ai/smart-turn-data-v3.2-train- VoxConverse, dev split: CC BY 4.0, https://github.com/joonson/voxconverse- VocalSound: CC BY-SA 4.0, https://github.com/YuanGongND/vocalsound- Tatoeba (CC BY 2.0 FR, https://tatoeba.org), FineWeb-2 (ODC-BY 1.0, https://huggingface.co/datasets/HuggingFaceFW/fineweb-2) and C4 (ODC-BY 1.0, https://huggingface.co/datasets/allenai/c4), as text for synthetic speech
Changes by Moonbox (moonbox-dev): the model (sava.safetensors of inworld/sava, revision1beae7c1dd0df6b0f92030644fc905eb087dc6a0) was exported to one ONNX graph of the package's streaming step(SavaModel.step for one 40 ms frame, the stream state as inputs and outputs; the mel front end's windows written asstacked slices of the fixed-length step input) and stored with fp16 weights; pipeline.py reimplements the package'sstreaming Session in numpy. Nothing was retrained or fine-tuned.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256---base_model: inworld/savabase_model_relation: quantizedlicense: apache-2.0pipeline_tag: voice-activity-detectionlibrary_name: onnxtags:- onnx- moonbox- onnxruntime- inworld- sava- voice-activity-detection- vad- end-of-turn- turn-detection- streaming- realtime---
# SAVA (voice activity + end of turn) ONNX
ONNX builds of [SAVA (voice activity + end of turn)](https://huggingface.co/inworld/sava), made by Moonbox for on-device use with ONNX Runtime (CPU, CUDA, DirectML). Eachprecision is one folder holding the streaming step graph and `pipeline.py`, a numpy port of the original package'sstreaming session; what the graph takes and returns is under *How to run*.
## Files
The last column is the benchmark: every 40 ms frame of 20 synthetic conversations streamed through the build andthrough the original package (details under *How to run*), and how far the build's speech and end-of-turnprobabilities are from the original's.
| Precision | File | Size | sha256 | Benchmark ||---|---|---|---|---|| fp16 | [`fp16/LICENSE`](https://huggingface.co/moonbox-dev/sava-ONNX/blob/main/fp16/LICENSE) | 11.4 kB | `cfc7749b96f6` | fp16 weights / fp32 math: speech probability within 0.0016 and end of turn within 0.0015 of the original's, 1 of 45,334 decisions changed; 7 ms per 40 ms frame on one CPU thread (RTF 0.18; original 0.09) || fp16 | [`fp16/NOTICE`](https://huggingface.co/moonbox-dev/sava-ONNX/blob/main/fp16/NOTICE) | 0.7 kB | `f845c91d8624` | fp16 weights / fp32 math: speech probability within 0.0016 and end of turn within 0.0015 of the original's, 1 of 45,334 decisions changed; 7 ms per 40 ms frame on one CPU thread (RTF 0.18; original 0.09) || fp16 | [`fp16/config.json`](https://huggingface.co/moonbox-dev/sava-ONNX/blob/main/fp16/config.json) | 1.8 kB | `87345d68edc7` | fp16 weights / fp32 math: speech probability within 0.0016 and end of turn within 0.0015 of the original's, 1 of 45,334 decisions changed; 7 ms per 40 ms frame on one CPU thread (RTF 0.18; original 0.09) || fp16 | [`fp16/pipeline.py`](https://huggingface.co/moonbox-dev/sava-ONNX/blob/main/fp16/pipeline.py) | 6.3 kB | `c475d6911a2d` | fp16 weights / fp32 math: speech probability within 0.0016 and end of turn within 0.0015 of the original's, 1 of 45,334 decisions changed; 7 ms per 40 ms frame on one CPU thread (RTF 0.18; original 0.09) || fp16 | [`fp16/step.onnx`](https://huggingface.co/moonbox-dev/sava-ONNX/blob/main/fp16/step.onnx) | 51.5 MB | `e6df2e108c0a` | fp16 weights / fp32 math: speech probability within 0.0016 and end of turn within 0.0015 of the original's, 1 of 45,334 decisions changed; 7 ms per 40 ms frame on one CPU thread (RTF 0.18; original 0.09) |
## How to run
Inworld's SAVA (streaming voice activity and end-of-turn detection in one 25.5M model: 16 kHz mono in, a speech andan end-of-turn probability every 40 ms out) as one ONNX graph of a streaming step plus `pipeline.py`, a numpy port ofthe `inworld-sava` package's `Session` (push / flush) and `run` around it:
- `step.onnx`: `pcm` [1, 640] (one 40 ms frame, float32 in [-1, 1]) and the stream state (19 tensors named `state.*`: the mel front end's sample context, the frame mixer's previous frame, the three Mamba-2 blocks' conv tails and SSM states, the four attention blocks' 512-frame key / value windows and position counters, the previous speech probability, the frame counter; shapes and dtypes in `config.json`) -> `lookahead` [1, 1] (the speech logit of the frame three frames back), `speech` [1, 1] (on time), `turn` [1, 1, 4] (end-of-turn logits at horizons 0, 200, 400, 800 ms) and the next state (`next.*`, same order). Start from zeros; feed each step's `next.*` back.
`pipeline.py` keeps the state as ONNX Runtime values between steps and needs only numpy and onnxruntime (soundfileand soxr for files):
```bashpython fp16/pipeline.py recording.wav # per-frame speech and end-of-turn probabilities```
```pythonimport sys; sys.path.insert(0, "fp16")import pipelinemodel = pipeline.Sava("fp16") # CPU, one threadsession = pipeline.Session(model)for piece in pieces_of_16k_audio: # any length frames = session.push(piece) # frames.speech, frames.turn: one value per whole 40 ms frameframes = session.flush() # the last frames' speech verdicts```
As in the original, the speech probability emitted at frame t judges frame t - 3 (120 ms of lookahead): the firstthree values of a stream are the no-speech floor, and `flush()` steps three frames of silence so the last real framesget their verdicts. The end-of-turn probability is on time. The package's turn policy (`sava.segment`, which turnsthe curves into speech segments and turn ends) is not ported: use the original package's `segmenter.py` (purePython) on these curves, or your own policy.
**Precisions.** `fp16/`: the weights stored in fp16, computed in fp32 (50 MB). An int8 build (weight-only, MatMulsint8) moved probabilities by up to 0.11, flipped 46 of 45,334 decisions (11 speech, 35 end of turn) and ran 7 timesslower on the CPU; not published.
**Benchmark.** 20 synthetic conversations (904 s): 3-6 utterances of LibriSpeech test-clean each, separated by0.3-2.5 s pauses, with light white noise, pushed to the session in pieces of 0.1-0.5 s, then flushed. Each buildagainst the original package (`inworld-sava` 1.0.0 at github.com/inworld-ai/sava @b4221a5, its own streaming`Session`, fp32 on the CPU): every frame's speech (lookahead) and end-of-turn probability, and how many frames fallon the other side of 0.5. Real-time factor on one thread of the laptop CPU of an RTX 3080 Laptop machine, wholepipeline.
| | Frames | Speech: largest difference | Speech: decisions changed | End of turn: largest difference | End of turn: decisions changed | Real-time factor (CPU, 1 thread) ||---|---|---|---|---|---|---|| original (PyTorch fp32) | 22,667 | - | - | - | - | 0.090 || ONNX fp32 (not published) | 22,667 | 2.0e-6 | 0 | 3.0e-6 | 0 | 0.17 || `fp16/` | 22,667 | 0.0016 | 0 | 0.0015 | 1 | 0.18 |
The ONNX step takes about 7 ms per 40 ms frame on one CPU thread (the original 3.6 ms): many small ops per frame, sothe per-step overhead dominates; keeping the state in ONNX Runtime between steps made no difference.
**License.** Apache-2.0 (code and weights), as the original; `LICENSE` and `NOTICE` (third-party datasets used intraining) are in every folder.
## How these were made
From [SAVA (voice activity + end of turn)](https://huggingface.co/inworld/sava) at revision `1beae7c1dd`: the package's own `SavaModel.step` (one frame, the whole stream statein and out) exported with torch.onnx (opset 17) and checked against the module frame by frame. fp16: fp16 weightswith fp32 math. int8: weight-only, every MatMul / Conv weight int8 with a per-output-channel scale behindDequantizeLinear and activations in fp32, so it runs on the CPU provider without a calibration set. Every build wasbenchmarked before upload; the `sha256` column above is what the files must hash to.
## License
Apache-2.0. These files are a derivative of the original model and carry its license and notice (`LICENSE`,`NOTICE` in every folder): they govern your use of these files. The original model card follows unchanged.
---
# Original model card
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/inworld/sava/resolve/main/docs/assets/inworld-logo-white.svg"> <img src="https://huggingface.co/inworld/sava/resolve/main/docs/assets/inworld-logo-black.svg" alt="Inworld" width="220"> </picture></p>
<h1 align="center">SAVA</h1>
<p align="center"> Semantic acoustic voice activity: streaming speech and end-of-turn detection in one model with an open license.</p>
<p align="center"> <a href="https://github.com/inworld-ai/sava"><img src="https://img.shields.io/badge/GitHub-inworld--ai%2Fsava-181717?logo=github" alt="GitHub: inworld-ai/sava"></a></p>
---
## TL;DR
SAVA returns two probabilities for a live audio stream:* `speech` → whether a frame holds speech* `turn` → whether the speaker's turn has ended
The model's shared network uses acoustic and sentence context to distinguish speech from coughs, laughs, music and keyboard clatter.
| | SAVA ||---|---|| made for | voice activity and conversational turn taking || input | 16 kHz mono audio || output | two probabilities every 40 ms || timing | speech probability for a frame is emitted 120 ms later (lookahead); end-of-turn probability has no lookahead || parameters | 25.5M || execution | plain PyTorch, CPU or an explicitly selected device |
Use it to open a turn when speech starts and close it when the sentence is complete.The [reference turn policy](https://github.com/inworld-ai/sava/blob/main/docs/USAGE.md) turns the probabilities into segments; applications can supply their own policy.SAVA responds to any voice. It does not pick out a target speaker, and it leaves interruptions and backchannels to the application's dialogue policy.
## Quick start
Using a coding agent? Point it at the [setup section of AGENTS.md](https://github.com/inworld-ai/sava/blob/main/AGENTS.md#setting-up-sava-for-a-user): it installs the package, checks the machine with `sava-doctor` and runs SAVA on a first recording.
With Python 3.10 or later:
```bashpython -m pip install inworld-sava# Or from a clone: git clone https://github.com/inworld-ai/sava && cd sava && python -m pip install -e .sava run recording.wavsava run recording.wav --turns_dir turns/ --curves curves.json```
```pythonfrom inworld import sava
model = sava.load("inworld/sava")curves = sava.run(model, sava.load_audio("recording.wav"))turns = sava.segment(curves, sava.Policy(), model.lookahead_frames)
session = sava.Session(model)for piece in pieces_of_16k_audio: # One-dimensional floating-point mono samples. frames = session.push(piece)frames = session.flush()```
`sava.load("inworld/sava")` and the CLI's default model download the weights on first use and verify their checksum.The CLI defaults to CPU; `--device` selects another device.For microphone input, install `python -m pip install "inworld-sava[mic]"` and run `sava mic`.
The code, [the integration guide](https://github.com/inworld-ai/sava/blob/main/docs/USAGE.md) and the [benchmarks](https://github.com/inworld-ai/sava/blob/main/bench/README.md) are on GitHub: [inworld-ai/sava](https://github.com/inworld-ai/sava).
## Hardware
Tested on NVIDIA Ampere, Hopper and Blackwell GPUs and on CPU.On an Apple M3 Max CPU one stream takes 3.8 ms per 40 ms frame; [the integration guide](https://github.com/inworld-ai/sava/blob/main/docs/USAGE.md) lists the measured configurations.
## The benchmarks
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/inworld/sava/resolve/main/docs/assets/vad-dark.svg"> <img src="https://huggingface.co/inworld/sava/resolve/main/docs/assets/vad-light.svg" alt="Voice-activity frame AUC for SAVA and Silero VAD on nine public dataset readings" width="100%"> </picture></p>
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/inworld/sava/resolve/main/docs/assets/turn-dark.svg"> <img src="https://huggingface.co/inworld/sava/resolve/main/docs/assets/turn-light.svg" alt="End-of-turn clip AUC for SAVA and smart-turn on public datasets" width="100%"> </picture></p>
Voice activity is compared with Silero VAD; end of turn is compared with pipecat smart-turn v3.2.These are per-dataset measurements, with no combined ranking.Speech scores use each model's own output timing, so SAVA's 120 ms lookahead makes the comparison unequal in latency.Quiet speech-like noise can trigger SAVA; the ESC-50 results measure that failure mode.
[The complete tables, confidence intervals, noise tests, turn latency and reproduction steps](https://github.com/inworld-ai/sava/blob/main/bench/README.md) are on GitHub.
## Architecture
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/inworld/sava/resolve/main/docs/assets/architecture-dark.svg"> <img src="https://huggingface.co/inworld/sava/resolve/main/docs/assets/architecture-light.svg" alt="SAVA: causal log-mel features, frame mixer, Mamba and attention trunk, speech and turn heads" width="100%"> </picture></p>
| part | detail ||---|---|| front end | causal log-mel, 128 Slaney mel bins of a 25 ms Hann DFT every 10 ms, log10 with a 1e-10 floor, `(x + 4) / 4`; four hops per frame plus the frame's log RMS || mixer | the current and previous frame's features, one linear projection to 512, RMSNorm || trunk | three Mamba-2 blocks (expand 2, head dim 64, state 128, conv kernel 4) and one attention block (8 query heads, 2 key/value heads, head dim 64, 512-frame causal window, rotary positions, RMS-normed q and k, exclusive self attention), each with a SwiGLU FFN of 2048 || voice-activity head | RMSNorm, down-projection to 512, one attention block (window 512, FFN 1536), RMSNorm, two linear readouts: on time, and the released three-frame look-ahead || end-of-turn head | the trunk output with a 64-wide embedding of the previous frame's on-time speech probability, the same block shape, a linear readout with four horizon columns (0, 200, 400, 800 ms); column 0 is the released output |
## Training data
SAVA was trained on approximately 5,000 hours of unique audio.Inworld built training examples from real and synthetic conversational speechmixed with non-verbal vocal sounds, noise, music and room acoustics, with aspeech label and an end-of-turn label for every frame. The training recipe,code and data are not part of this release.
Third-party datasets used in training are credited in [NOTICE](NOTICE).
## License
Code and weights are Apache-2.0 ([LICENSE](LICENSE)).Third-party notices are in [NOTICE](NOTICE).
## How to contribute
Everyone is welcome to use the model however they like and to make it better in any way they see fit!Development happens on GitHub: see [CONTRIBUTING.md](https://github.com/inworld-ai/sava/blob/main/CONTRIBUTING.md) for setup, tests and bug reports.
---
<p align="center">Built for people with ❤️ by Inworld.</p>LICENSEAdded+202
NOTICEAdded+19
README.mdAdded+256