1.package(
2 url: "https://github.com/TheStageAI/AppleSDK.git",
3 exact: Version(1, 1, 0)
4)
1# pubspec.yaml
2dependencies:
3 thestage_apple_sdk:
4 git:
5 url: https://github.com/TheStageAI/AppleSDK.git
6 path: plugin/thestage_apple_sdk
7 ref: 1.1.0
1import TheStageSDK
2
3try await TheStageAI.shared.initialize(apiToken: "th_…")
4
5try await TheStageAI.shared.start_model(
6 model_name: "vad",
7 engines_path: "TheStageAI/silero-vad"
8)
9
10// Exactly 512 samples @ 16 kHz mono per call
11let result = try TheStageAI.shared.infer(
12 model_name: "vad",
13 input_json: ["audio": audio_chunk]
14)
15let probability = result[0]["probability"] as! Double
16if probability > 0.5 {
17 print("Speech detected")
18}
1await TheStageFlutterSDK.start_model(
2 model_name: 'vad',
3 engines_path: 'TheStageAI/silero-vad',
4);
5
6final result = await TheStageFlutterSDK.infer(
7 model_name: 'vad',
8 input_json: {'audio': audio_chunk}, // Float32List, length 512
9);
10final probability = result[0]['probability'] as double;
This Apple Silicon package is produced by TheStage AI; it is not an official Silero release.