Skip to content

Commit 16356e8

Browse files
addressing comments + renaming
1 parent 1b7cd2d commit 16356e8

17 files changed

Lines changed: 81 additions & 61 deletions

File tree

Playground/YapRun/YapRun.xcodeproj/project.pbxproj

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
mainGroup = 54398FB12F4979D2009D6B51;
374374
minimizedProjectReferenceProxies = 1;
375375
packageReferences = (
376-
543991CB2F498152009D6B51 /* XCLocalSwiftPackageReference "runanywhere-sdks" */,
376+
543991CB2F498152009D6B51 /* XCRemoteSwiftPackageReference "runanywhere-sdks" */,
377377
);
378378
preferredProjectObjectVersion = 77;
379379
productRefGroup = 54398FBB2F4979D2009D6B51 /* Products */;
@@ -992,24 +992,31 @@
992992
};
993993
/* End XCConfigurationList section */
994994

995-
/* Begin XCLocalSwiftPackageReference section */
996-
543991CB2F498152009D6B51 /* XCLocalSwiftPackageReference "runanywhere-sdks" */ = {
997-
isa = XCLocalSwiftPackageReference;
998-
relativePath = "../..";
995+
/* Begin XCRemoteSwiftPackageReference section */
996+
543991CB2F498152009D6B51 /* XCRemoteSwiftPackageReference "runanywhere-sdks" */ = {
997+
isa = XCRemoteSwiftPackageReference;
998+
repositoryURL = "https://github.com/RunanywhereAI/runanywhere-sdks";
999+
requirement = {
1000+
kind = upToNextMajorVersion;
1001+
minimumVersion = 0.19.2;
1002+
};
9991003
};
1000-
/* End XCLocalSwiftPackageReference section */
1004+
/* End XCRemoteSwiftPackageReference section */
10011005

10021006
/* Begin XCSwiftPackageProductDependency section */
10031007
543991CC2F498152009D6B51 /* RunAnywhere */ = {
10041008
isa = XCSwiftPackageProductDependency;
1009+
package = 543991CB2F498152009D6B51 /* XCRemoteSwiftPackageReference "runanywhere-sdks" */;
10051010
productName = RunAnywhere;
10061011
};
10071012
543991CE2F498152009D6B51 /* RunAnywhereONNX */ = {
10081013
isa = XCSwiftPackageProductDependency;
1014+
package = 543991CB2F498152009D6B51 /* XCRemoteSwiftPackageReference "runanywhere-sdks" */;
10091015
productName = RunAnywhereONNX;
10101016
};
10111017
543991D02F498152009D6B51 /* RunAnywhereWhisperKit */ = {
10121018
isa = XCSwiftPackageProductDependency;
1019+
package = 543991CB2F498152009D6B51 /* XCRemoteSwiftPackageReference "runanywhere-sdks" */;
10131020
productName = RunAnywhereWhisperKit;
10141021
};
10151022
/* End XCSwiftPackageProductDependency section */

Playground/YapRun/YapRun.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Playground/YapRun/YapRun/Core/ModelRegistry.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ enum ModelRegistry {
6464
name: "Whisper Tiny EN (WhisperKit)",
6565
url: URL(string: "https://github.com/RunanywhereAI/sherpa-onnx/releases/download/runanywhere-models-v2/whisperkit-tiny.en.tar.gz")!,
6666
archiveType: .tarGz,
67-
framework: .whisperKit,
67+
framework: .whisperKitCoreML,
6868
sizeBytes: 70_000_000
6969
),
7070
ASRModel(
7171
id: "whisperkit-base.en",
7272
name: "Whisper Base EN (WhisperKit)",
7373
url: URL(string: "https://github.com/RunanywhereAI/sherpa-onnx/releases/download/runanywhere-models-v2/whisperkit-base.en.tar.gz")!,
7474
archiveType: .tarGz,
75-
framework: .whisperKit,
75+
framework: .whisperKitCoreML,
7676
sizeBytes: 134_000_000
7777
),
7878
]

Playground/YapRun/YapRun/Features/Home/HomeViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ extension ModelInfo {
247247
case .llamaCpp: return .purple
248248
case .foundationModels: return .blue
249249
case .coreml: return .cyan
250-
case .whisperKit: return .green
250+
case .whisperKitCoreML: return .green
251251
default: return .gray
252252
}
253253
}

examples/ios/RunAnywhereAI/RunAnywhereAI/App/RunAnywhereAIApp.swift

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,8 @@ struct RunAnywhereAIApp: App {
175175
private func registerModulesAndModels() async { // swiftlint:disable:this function_body_length
176176
logger.info("📦 Registering modules with their models...")
177177

178-
// Register LlamaCPP backend with C++ commons
179-
LlamaCPP.register(priority: 100)
180-
logger.info("✅ LlamaCPP backend registered")
181-
182-
// Register ONNX backend service providers
183-
ONNX.register(priority: 100)
184-
logger.info("✅ ONNX backend registered")
185-
186-
// Register WhisperKit (Apple Neural Engine STT)
187-
WhisperKitSTT.register(priority: 200)
188-
logger.info("✅ WhisperKit STT backend registered")
178+
// NOTE: LlamaCPP, ONNX, and WhisperKitSTT backends are registered once
179+
// in initializeSDK() before any await. No duplicate registration needed here.
189180

190181
// Register LLM models using the new RunAnywhere.registerModel API
191182
// Using explicit IDs ensures models are recognized after download across app restarts
@@ -362,7 +353,7 @@ struct RunAnywhereAIApp: App {
362353
id: "whisperkit-tiny.en",
363354
name: "Whisper Tiny EN (WhisperKit)",
364355
url: whisperKitTinyURL,
365-
framework: .whisperKit,
356+
framework: .whisperKitCoreML,
366357
modality: .speechRecognition,
367358
artifactType: .archive(.tarGz, structure: .nestedDirectory),
368359
memoryRequirement: 70_000_000
@@ -373,7 +364,7 @@ struct RunAnywhereAIApp: App {
373364
id: "whisperkit-base.en",
374365
name: "Whisper Base EN (WhisperKit)",
375366
url: whisperKitBaseURL,
376-
framework: .whisperKit,
367+
framework: .whisperKitCoreML,
377368
modality: .speechRecognition,
378369
artifactType: .archive(.tarGz, structure: .nestedDirectory),
379370
memoryRequirement: 134_000_000

sdk/runanywhere-commons/include/rac/infrastructure/model_management/rac_model_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ typedef enum rac_inference_framework {
185185
RAC_FRAMEWORK_NONE = 6, /**< No framework needed */
186186
RAC_FRAMEWORK_MLX = 7, /**< MLX C++ (Apple Silicon VLM) */
187187
RAC_FRAMEWORK_COREML = 8, /**< Core ML (Apple Neural Engine) */
188-
RAC_FRAMEWORK_WHISPERKIT = 9, /**< WhisperKit (Apple Neural Engine STT) */
188+
RAC_FRAMEWORK_WHISPERKIT_COREML = 9, /**< WhisperKit CoreML (Apple Neural Engine STT) */
189189
RAC_FRAMEWORK_UNKNOWN = 99 /**< Unknown framework */
190190
} rac_inference_framework_t;
191191

sdk/runanywhere-commons/src/infrastructure/model_management/model_paths.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ const char* rac_framework_raw_value(rac_inference_framework_t framework) {
110110
return "SystemTTS";
111111
case RAC_FRAMEWORK_FLUID_AUDIO:
112112
return "FluidAudio";
113-
case RAC_FRAMEWORK_WHISPERKIT:
114-
return "WhisperKit";
113+
case RAC_FRAMEWORK_WHISPERKIT_COREML:
114+
return "WhisperKitCoreML";
115115
case RAC_FRAMEWORK_BUILTIN:
116116
return "BuiltIn";
117117
case RAC_FRAMEWORK_NONE:
@@ -408,8 +408,8 @@ rac_result_t rac_model_paths_extract_framework(const char* path,
408408
} else if (nextComponent == "FluidAudio") {
409409
*out_framework = RAC_FRAMEWORK_FLUID_AUDIO;
410410
return RAC_SUCCESS;
411-
} else if (nextComponent == "WhisperKit") {
412-
*out_framework = RAC_FRAMEWORK_WHISPERKIT;
411+
} else if (nextComponent == "WhisperKitCoreML") {
412+
*out_framework = RAC_FRAMEWORK_WHISPERKIT_COREML;
413413
return RAC_SUCCESS;
414414
} else if (nextComponent == "BuiltIn") {
415415
*out_framework = RAC_FRAMEWORK_BUILTIN;

sdk/runanywhere-commons/src/infrastructure/model_management/model_registry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ rac_result_t rac_model_registry_discover_downloaded(rac_model_registry_handle_t
614614
rac_inference_framework_t frameworks[] = {RAC_FRAMEWORK_LLAMACPP, RAC_FRAMEWORK_ONNX,
615615
RAC_FRAMEWORK_COREML, RAC_FRAMEWORK_MLX,
616616
RAC_FRAMEWORK_FLUID_AUDIO, RAC_FRAMEWORK_FOUNDATION_MODELS,
617-
RAC_FRAMEWORK_SYSTEM_TTS, RAC_FRAMEWORK_WHISPERKIT,
617+
RAC_FRAMEWORK_SYSTEM_TTS, RAC_FRAMEWORK_WHISPERKIT_COREML,
618618
RAC_FRAMEWORK_UNKNOWN};
619619
size_t framework_count = sizeof(frameworks) / sizeof(frameworks[0]);
620620

sdk/runanywhere-commons/src/infrastructure/model_management/model_types.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ rac_bool_t rac_framework_uses_directory_based_models(rac_inference_framework_t f
179179
switch (framework) {
180180
case RAC_FRAMEWORK_ONNX:
181181
case RAC_FRAMEWORK_COREML: // CoreML compiled models (.mlmodelc) are directories
182-
case RAC_FRAMEWORK_WHISPERKIT: // WhisperKit models are directories of .mlmodelc files
182+
case RAC_FRAMEWORK_WHISPERKIT_COREML: // WhisperKit models are directories of .mlmodelc files
183183
return RAC_TRUE;
184184
default:
185185
return RAC_FALSE;
@@ -202,7 +202,7 @@ rac_bool_t rac_framework_supports_stt(rac_inference_framework_t framework) {
202202
// Mirrors Swift's InferenceFramework.supportsSTT
203203
switch (framework) {
204204
case RAC_FRAMEWORK_ONNX:
205-
case RAC_FRAMEWORK_WHISPERKIT:
205+
case RAC_FRAMEWORK_WHISPERKIT_COREML:
206206
return RAC_TRUE;
207207
default:
208208
return RAC_FALSE;
@@ -235,8 +235,8 @@ const char* rac_framework_display_name(rac_inference_framework_t framework) {
235235
return "System TTS";
236236
case RAC_FRAMEWORK_FLUID_AUDIO:
237237
return "FluidAudio";
238-
case RAC_FRAMEWORK_WHISPERKIT:
239-
return "WhisperKit";
238+
case RAC_FRAMEWORK_WHISPERKIT_COREML:
239+
return "WhisperKit CoreML";
240240
case RAC_FRAMEWORK_BUILTIN:
241241
return "Built-in";
242242
case RAC_FRAMEWORK_NONE:
@@ -263,8 +263,8 @@ const char* rac_framework_analytics_key(rac_inference_framework_t framework) {
263263
return "system_tts";
264264
case RAC_FRAMEWORK_FLUID_AUDIO:
265265
return "fluid_audio";
266-
case RAC_FRAMEWORK_WHISPERKIT:
267-
return "whisper_kit";
266+
case RAC_FRAMEWORK_WHISPERKIT_COREML:
267+
return "whisperkit_coreml";
268268
case RAC_FRAMEWORK_BUILTIN:
269269
return "built_in";
270270
case RAC_FRAMEWORK_NONE:

sdk/runanywhere-swift/Sources/RunAnywhere/CRACommons/include/rac_model_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ typedef enum rac_inference_framework {
185185
RAC_FRAMEWORK_NONE = 6, /**< No framework needed */
186186
RAC_FRAMEWORK_MLX = 7, /**< MLX C++ (Apple Silicon VLM) */
187187
RAC_FRAMEWORK_COREML = 8, /**< Core ML (Apple Neural Engine) */
188-
RAC_FRAMEWORK_WHISPERKIT = 9, /**< WhisperKit (Apple Neural Engine STT) */
188+
RAC_FRAMEWORK_WHISPERKIT_COREML = 9, /**< WhisperKit CoreML (Apple Neural Engine STT) */
189189
RAC_FRAMEWORK_UNKNOWN = 99 /**< Unknown framework */
190190
} rac_inference_framework_t;
191191

0 commit comments

Comments
 (0)