Terutalk-models - ONNX models for voice isolation from noise on-device
2 min read
A collection of ready-to-use ONNX files converted from the open REAL-TSE and MossFormer2_SS_16K models for running directly on smartphones (iOS and Android) via ONNX Runtime (a cross-platform engine for running AI models). The models solve the task of extracting a target speaker's voice from overlapping speech using a short three-second sample. Weights are quantized to the int8 format (weight compression to speed up CPU execution), making them suitable for local audio processing in real time or in short fragments without sending data to the cloud.
Key features
- Two architectures in one repository: causal REAL-TSE for streaming processing (latency around 16 ms) and MossFormer2_SS_16K for separating two voices at a 16 kHz sample rate.
- Int8 quantization: MatMul weight matrices are dynamically quantized to int8, resulting in core weight files of only 66.6 MB (
chunk_int8.onnx) and 95.6 MB (mossformer2_int8.onnx). - Voice authentication: REAL-TSE uses the ECAPA-TDNN speaker encoder from the WeSpeaker project, which requires about 3 seconds of a target voice recording to create an embedding.
- Open licenses: the models themselves are distributed under Apache-2.0, while the built-in ECAPA-TDNN encoder is under CC BY 4.0.
What you can do
- Build local noise suppression and specific speaker isolation into mobile calling apps, voice recorders, or voice assistants on iOS and Android.
- Separate audio tracks with two speakers into two independent channels (
s1ands2) usingmossformer2_int8.onnxfor subsequent speech transcription. - Use the
realtse_causalcausal graph for streaming voice filtering in real time where minimum latency matters.
Example
Workflow scenario from the card: for streaming mode, a 3-second voice sample is first passed once through realtse_causal/enroll.onnx, after which the incoming audio stream is fed in chunks into realtse_causal/chunk_int8.onnx (the output signal returns with an output_gain = -1.0 gain coefficient). For mossformer2_int8.onnx, a mix tensor of shape (1, T) in float32 is fed to the input, yielding two separated s1 and s2 signals of the same shape.
Read more
DetailsResources: when running
mossformer2_int8.onnx on ONNX Runtime CPU, memory consumption grows with clip length and reaches about 1.4 GB for a 10-second fragment.Limitations: due to memory growth, MossFormer2 is recommended to run on segments no longer than 10 seconds.
Export details: conversion was performed from PyTorch to ONNX (opset 17); for REAL-TSE, an export script from VoxLock v1.1.1 was used, and for MossFormer2, ClearerVoice-Studio code was used with testing on clips from 3.2 to 60 s.










Comments