ReDimNet2 Speaker Embedding (Apple Silicon)

On-Device Apple SDK

TheStage Apple SDK

Original model: ReDimNet2 (Palabra AI) · paper

On-device speaker embedding for enrollment and cosine verification, packaged by TheStage AI for Apple Silicon. Produces a 192-d L2-normalized vector from 16 kHz mono audio.

Runtime TheStage Apple SDK (SpeakerEmbedding)
Embedding dim 192 (L2-normalized)
Window 2.0 s (32 000 samples @ 16 kHz)
Default device CPU
HF engines TheStageAI/redimnet2

Overview


Used by TheStageVoiceAgent for speaker ID (config.speaker_id = "TheStageAI/redimnet2").

System Requirements


Property Value
Hardware Apple Silicon Mac, or physical iPhone / iPad
macOS 15.0+
iOS 18.0+
Xcode 16.0+
Swift 6.0+
Flutter (optional) 3.24+

Simulator is not supported — run on real Apple Silicon hardware.

TheStage AI Access Token


Create a token at app.thestage.ai and pass it to the SDK:

try await TheStageAI.shared.initialize(apiToken: "th_…")
await TheStageFlutterSDK.initialize(api_token: 'th_…');

Token is checked online in initialize (once per app process when reachable). Inference runs fully on-device. Offline initialize fails — reconnect and call initialize again.

TheStage Apple SDK


Docs: TheStage Apple SDK · Speaker embedding

Installation (SwiftPM)

In Xcode: File → Add Package Dependencies…, paste https://github.com/TheStageAI/AppleSDK.git, and add the TheStageSDK product. Or in Package.swift:

.package(
    url: "https://github.com/TheStageAI/AppleSDK.git",
    exact: Version(1, 1, 0)
)

Installation (Flutter / iOS)

# pubspec.yaml
dependencies:
  thestage_apple_sdk:
    git:
      url: https://github.com/TheStageAI/AppleSDK.git
      path: plugin/thestage_apple_sdk
      ref: 1.1.0

Swift

import TheStageSDK

try await TheStageAI.shared.initialize(apiToken: "th_…")

let sid = try await SpeakerEmbedding(
    engines_path: "TheStageAI/redimnet2"
)

// Enroll
let enroll = try sid.infer(audio: pcm_16k_mono)
// enroll.embedding: [Float] length 192

// Or via singleton JSON (same shape as Flutter):
try await TheStageAI.shared.start_model(
    model_name: "speaker_id",
    engines_path: "TheStageAI/redimnet2",
    model_type: "thestage_speaker_embedding"
)
let out = try TheStageAI.shared.infer(
    model_name: "speaker_id",
    input_json: ["audio": pcm_16k_mono]
)

Flutter (iOS)

await TheStageFlutterSDK.start_model(
  model_name: 'speaker_id',
  engines_path: 'TheStageAI/redimnet2',
);

final enrolled = await TheStageFlutterSDK.infer(
  model_name: 'speaker_id',
  input_json: {'audio': pcm16k},
);
final embedding = (enrolled[0]['embedding'] as List).cast<double>();

final check = await TheStageFlutterSDK.infer(
  model_name: 'speaker_id',
  input_json: {
    'audio': pcm16k,
    'embedding': embedding,
  },
);
final similarity = check[0]['similarity'] as double;

Audio contract

Sample rate 16 kHz mono Float
Window 2.0 s — pad/trim trailing
Output 192-d L2-normalized embedding; optional cosine similarity when a reference embedding is passed

Acknowledgments


This work builds on ReDimNet2 by Palabra AI: https://github.com/PalabraAI/redimnet2.

Paper: https://arxiv.org/abs/2603.11841.

Based on ReDimNet2 (Palabra AI). This Apple Silicon package is produced by TheStage AI; it is not an official Palabra AI release.

Links


Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including TheStageAI/redimnet2

Paper for TheStageAI/redimnet2