@runanywhere/core 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RunAnywhereCore.podspec +130 -0
- package/android/CMakeLists.txt +92 -0
- package/android/build.gradle +321 -0
- package/android/consumer-rules.pro +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +271 -0
- package/android/src/main/include/rac/backends/rac_llm_llamacpp.h +218 -0
- package/android/src/main/include/rac/backends/rac_stt_onnx.h +99 -0
- package/android/src/main/include/rac/backends/rac_stt_whispercpp.h +153 -0
- package/android/src/main/include/rac/backends/rac_tts_onnx.h +71 -0
- package/android/src/main/include/rac/backends/rac_vad_onnx.h +84 -0
- package/android/src/main/include/rac/core/capabilities/rac_lifecycle.h +290 -0
- package/android/src/main/include/rac/core/rac_analytics_events.h +610 -0
- package/android/src/main/include/rac/core/rac_audio_utils.h +88 -0
- package/android/src/main/include/rac/core/rac_component_types.h +160 -0
- package/android/src/main/include/rac/core/rac_core.h +331 -0
- package/android/src/main/include/rac/core/rac_error.h +469 -0
- package/android/src/main/include/rac/core/rac_events.h +334 -0
- package/android/src/main/include/rac/core/rac_logger.h +416 -0
- package/android/src/main/include/rac/core/rac_platform_adapter.h +340 -0
- package/android/src/main/include/rac/core/rac_sdk_state.h +292 -0
- package/android/src/main/include/rac/core/rac_structured_error.h +594 -0
- package/android/src/main/include/rac/core/rac_types.h +264 -0
- package/android/src/main/include/rac/features/llm/rac_llm.h +17 -0
- package/android/src/main/include/rac/features/llm/rac_llm_analytics.h +188 -0
- package/android/src/main/include/rac/features/llm/rac_llm_component.h +228 -0
- package/android/src/main/include/rac/features/llm/rac_llm_events.h +215 -0
- package/android/src/main/include/rac/features/llm/rac_llm_metrics.h +402 -0
- package/android/src/main/include/rac/features/llm/rac_llm_service.h +163 -0
- package/android/src/main/include/rac/features/llm/rac_llm_structured_output.h +141 -0
- package/android/src/main/include/rac/features/llm/rac_llm_types.h +384 -0
- package/android/src/main/include/rac/features/platform/rac_llm_platform.h +204 -0
- package/android/src/main/include/rac/features/platform/rac_tts_platform.h +197 -0
- package/android/src/main/include/rac/features/stt/rac_stt.h +17 -0
- package/android/src/main/include/rac/features/stt/rac_stt_analytics.h +204 -0
- package/android/src/main/include/rac/features/stt/rac_stt_component.h +162 -0
- package/android/src/main/include/rac/features/stt/rac_stt_events.h +62 -0
- package/android/src/main/include/rac/features/stt/rac_stt_service.h +154 -0
- package/android/src/main/include/rac/features/stt/rac_stt_types.h +389 -0
- package/android/src/main/include/rac/features/tts/rac_tts.h +17 -0
- package/android/src/main/include/rac/features/tts/rac_tts_analytics.h +181 -0
- package/android/src/main/include/rac/features/tts/rac_tts_component.h +158 -0
- package/android/src/main/include/rac/features/tts/rac_tts_events.h +54 -0
- package/android/src/main/include/rac/features/tts/rac_tts_service.h +162 -0
- package/android/src/main/include/rac/features/tts/rac_tts_types.h +374 -0
- package/android/src/main/include/rac/features/vad/rac_vad.h +17 -0
- package/android/src/main/include/rac/features/vad/rac_vad_analytics.h +236 -0
- package/android/src/main/include/rac/features/vad/rac_vad_component.h +185 -0
- package/android/src/main/include/rac/features/vad/rac_vad_energy.h +443 -0
- package/android/src/main/include/rac/features/vad/rac_vad_events.h +76 -0
- package/android/src/main/include/rac/features/vad/rac_vad_service.h +167 -0
- package/android/src/main/include/rac/features/vad/rac_vad_types.h +244 -0
- package/android/src/main/include/rac/features/voice_agent/rac_voice_agent.h +612 -0
- package/android/src/main/include/rac/infrastructure/device/rac_device_manager.h +176 -0
- package/android/src/main/include/rac/infrastructure/download/rac_download.h +418 -0
- package/android/src/main/include/rac/infrastructure/events/rac_events.h +177 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_assignment.h +169 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_paths.h +258 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_registry.h +357 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_strategy.h +374 -0
- package/android/src/main/include/rac/infrastructure/model_management/rac_model_types.h +613 -0
- package/android/src/main/include/rac/infrastructure/network/rac_api_types.h +335 -0
- package/android/src/main/include/rac/infrastructure/network/rac_auth_manager.h +252 -0
- package/android/src/main/include/rac/infrastructure/network/rac_dev_config.h +85 -0
- package/android/src/main/include/rac/infrastructure/network/rac_endpoints.h +102 -0
- package/android/src/main/include/rac/infrastructure/network/rac_environment.h +220 -0
- package/android/src/main/include/rac/infrastructure/network/rac_http_client.h +233 -0
- package/android/src/main/include/rac/infrastructure/storage/rac_storage_analyzer.h +286 -0
- package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_manager.h +206 -0
- package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_types.h +234 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/ArchiveUtility.kt +308 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfo.kt +229 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/PlatformAdapterBridge.kt +392 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/RunAnywhereCorePackage.kt +28 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/SDKLogger.kt +357 -0
- package/android/src/main/java/com/margelo/nitro/runanywhere/SecureStorageManager.kt +147 -0
- package/android/src/main/jniLibs/arm64-v8a/libc++_shared.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libomp.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/librac_commons.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/librunanywhere_jni.so +0 -0
- package/cpp/HybridRunAnywhereCore.cpp +2505 -0
- package/cpp/HybridRunAnywhereCore.hpp +271 -0
- package/cpp/bridges/AuthBridge.cpp +209 -0
- package/cpp/bridges/AuthBridge.hpp +157 -0
- package/cpp/bridges/DeviceBridge.cpp +257 -0
- package/cpp/bridges/DeviceBridge.hpp +155 -0
- package/cpp/bridges/DownloadBridge.cpp +299 -0
- package/cpp/bridges/DownloadBridge.hpp +197 -0
- package/cpp/bridges/EventBridge.cpp +125 -0
- package/cpp/bridges/EventBridge.hpp +139 -0
- package/cpp/bridges/HTTPBridge.cpp +96 -0
- package/cpp/bridges/HTTPBridge.hpp +144 -0
- package/cpp/bridges/InitBridge.cpp +1273 -0
- package/cpp/bridges/InitBridge.hpp +306 -0
- package/cpp/bridges/ModelRegistryBridge.cpp +394 -0
- package/cpp/bridges/ModelRegistryBridge.hpp +177 -0
- package/cpp/bridges/StorageBridge.cpp +269 -0
- package/cpp/bridges/StorageBridge.hpp +172 -0
- package/cpp/bridges/TelemetryBridge.cpp +352 -0
- package/cpp/bridges/TelemetryBridge.hpp +126 -0
- package/ios/.testlocal +0 -0
- package/ios/ArchiveUtility.swift +526 -0
- package/ios/ArchiveUtilityBridge.m +52 -0
- package/ios/AudioDecoder.h +38 -0
- package/ios/AudioDecoder.m +162 -0
- package/ios/Binaries/RACommons.xcframework/Info.plist +44 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/RACommons.h +67 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_analytics_events.h +610 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_api_types.h +335 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_audio_utils.h +88 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_auth_manager.h +252 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_component_types.h +160 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_core.h +331 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_dev_config.h +85 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_device_manager.h +176 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_download.h +418 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_endpoints.h +102 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_environment.h +220 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_error.h +469 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_events.h +177 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_http_client.h +233 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_lifecycle.h +290 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_component.h +228 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_events.h +215 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_platform.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_service.h +163 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_types.h +384 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_logger.h +416 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_assignment.h +169 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_paths.h +258 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_registry.h +357 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_strategy.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_types.h +613 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_sdk_state.h +292 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_structured_error.h +594 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_component.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_events.h +62 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_service.h +154 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_types.h +389 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_component.h +158 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_events.h +54 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_platform.h +197 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_service.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_types.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_types.h +264 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_component.h +185 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_energy.h +443 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_events.h +76 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_service.h +167 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_types.h +244 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_voice_agent.h +612 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Info.plist +11 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Modules/module.modulemap +5 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/RACommons +0 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/RACommons.h +67 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_analytics_events.h +610 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_api_types.h +335 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_audio_utils.h +88 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_auth_manager.h +252 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_component_types.h +160 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_core.h +331 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_dev_config.h +85 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_device_manager.h +176 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_download.h +418 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_endpoints.h +102 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_environment.h +220 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_error.h +469 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_events.h +177 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_http_client.h +233 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_lifecycle.h +290 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_component.h +228 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_events.h +215 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_platform.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_service.h +163 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_types.h +384 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_logger.h +416 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_assignment.h +169 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_paths.h +258 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_registry.h +357 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_strategy.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_types.h +613 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_sdk_state.h +292 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_structured_error.h +594 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_component.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_events.h +62 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_service.h +154 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_types.h +389 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_component.h +158 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_events.h +54 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_platform.h +197 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_service.h +162 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_types.h +374 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_types.h +264 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad.h +17 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_component.h +185 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_energy.h +443 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_events.h +76 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_service.h +167 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_types.h +244 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_voice_agent.h +612 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Info.plist +11 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Modules/module.modulemap +5 -0
- package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/RACommons +0 -0
- package/ios/HybridRunAnywhereDeviceInfo.swift +214 -0
- package/ios/KeychainManager.swift +116 -0
- package/ios/PlatformAdapter.swift +100 -0
- package/ios/PlatformAdapterBridge.h +152 -0
- package/ios/PlatformAdapterBridge.m +570 -0
- package/ios/RNSDKLoggerBridge.h +41 -0
- package/ios/RNSDKLoggerBridge.m +66 -0
- package/ios/SDKLogger.swift +329 -0
- package/nitro.json +20 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.cpp +257 -0
- package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.hpp +77 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfoSpec.kt +106 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/runanywherecoreOnLoad.kt +35 -0
- package/nitrogen/generated/android/runanywherecore+autolinking.cmake +82 -0
- package/nitrogen/generated/android/runanywherecore+autolinking.gradle +27 -0
- package/nitrogen/generated/android/runanywherecoreOnLoad.cpp +54 -0
- package/nitrogen/generated/android/runanywherecoreOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/RunAnywhereCore+autolinking.rb +60 -0
- package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.cpp +65 -0
- package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.hpp +197 -0
- package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Umbrella.hpp +45 -0
- package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.mm +43 -0
- package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.hpp +173 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec.swift +68 -0
- package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec_cxx.swift +366 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.cpp +92 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.hpp +138 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.cpp +33 -0
- package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.hpp +75 -0
- package/package.json +76 -0
- package/react-native.config.js +14 -0
- package/src/Features/VoiceSession/AudioCaptureManager.ts +286 -0
- package/src/Features/VoiceSession/AudioPlaybackManager.ts +300 -0
- package/src/Features/VoiceSession/VoiceSessionHandle.ts +530 -0
- package/src/Features/VoiceSession/index.ts +20 -0
- package/src/Features/index.ts +7 -0
- package/src/Foundation/Constants/SDKConstants.ts +47 -0
- package/src/Foundation/Constants/index.ts +8 -0
- package/src/Foundation/DependencyInjection/ServiceContainer.ts +154 -0
- package/src/Foundation/DependencyInjection/ServiceRegistry.ts +51 -0
- package/src/Foundation/DependencyInjection/index.ts +6 -0
- package/src/Foundation/ErrorTypes/ErrorCategory.ts +184 -0
- package/src/Foundation/ErrorTypes/ErrorCodes.ts +151 -0
- package/src/Foundation/ErrorTypes/ErrorContext.ts +201 -0
- package/src/Foundation/ErrorTypes/SDKError.ts +507 -0
- package/src/Foundation/ErrorTypes/index.ts +57 -0
- package/src/Foundation/Initialization/InitializationPhase.ts +85 -0
- package/src/Foundation/Initialization/InitializationState.ts +168 -0
- package/src/Foundation/Initialization/index.ts +26 -0
- package/src/Foundation/Logging/Destinations/NativeLogBridge.ts +147 -0
- package/src/Foundation/Logging/Destinations/SentryDestination.ts +209 -0
- package/src/Foundation/Logging/Logger/SDKLogger.ts +232 -0
- package/src/Foundation/Logging/Models/LogLevel.ts +36 -0
- package/src/Foundation/Logging/Models/LoggingConfiguration.ts +117 -0
- package/src/Foundation/Logging/Services/LoggingManager.ts +407 -0
- package/src/Foundation/Logging/index.ts +59 -0
- package/src/Foundation/Security/DeviceIdentity.ts +92 -0
- package/src/Foundation/Security/SecureStorageError.ts +132 -0
- package/src/Foundation/Security/SecureStorageKeys.ts +35 -0
- package/src/Foundation/Security/SecureStorageService.ts +449 -0
- package/src/Foundation/Security/index.ts +17 -0
- package/src/Foundation/index.ts +26 -0
- package/src/Infrastructure/Events/EventPublisher.ts +165 -0
- package/src/Infrastructure/Events/SDKEvent.ts +214 -0
- package/src/Infrastructure/Events/index.ts +15 -0
- package/src/Infrastructure/index.ts +9 -0
- package/src/Public/Events/EventBus.ts +488 -0
- package/src/Public/Events/index.ts +8 -0
- package/src/Public/Extensions/RunAnywhere+Logging.ts +51 -0
- package/src/Public/Extensions/RunAnywhere+Models.ts +392 -0
- package/src/Public/Extensions/RunAnywhere+STT.ts +424 -0
- package/src/Public/Extensions/RunAnywhere+Storage.ts +151 -0
- package/src/Public/Extensions/RunAnywhere+StructuredOutput.ts +316 -0
- package/src/Public/Extensions/RunAnywhere+TTS.ts +430 -0
- package/src/Public/Extensions/RunAnywhere+TextGeneration.ts +320 -0
- package/src/Public/Extensions/RunAnywhere+VAD.ts +359 -0
- package/src/Public/Extensions/RunAnywhere+VoiceAgent.ts +225 -0
- package/src/Public/Extensions/RunAnywhere+VoiceSession.ts +155 -0
- package/src/Public/Extensions/index.ts +126 -0
- package/src/Public/RunAnywhere.ts +695 -0
- package/src/index.ts +238 -0
- package/src/native/NativeRunAnywhereCore.ts +291 -0
- package/src/native/NativeRunAnywhereModule.ts +32 -0
- package/src/native/index.ts +21 -0
- package/src/services/DownloadService.ts +282 -0
- package/src/services/FileSystem.ts +810 -0
- package/src/services/ModelRegistry.ts +246 -0
- package/src/services/Network/APIEndpoints.ts +84 -0
- package/src/services/Network/HTTPService.ts +479 -0
- package/src/services/Network/NetworkConfiguration.ts +130 -0
- package/src/services/Network/TelemetryService.ts +318 -0
- package/src/services/Network/index.ts +29 -0
- package/src/services/SystemTTSService.ts +130 -0
- package/src/services/index.ts +66 -0
- package/src/specs/RunAnywhereCore.nitro.ts +627 -0
- package/src/specs/RunAnywhereDeviceInfo.nitro.ts +73 -0
- package/src/types/LLMTypes.ts +127 -0
- package/src/types/STTTypes.ts +124 -0
- package/src/types/StructuredOutputTypes.ts +156 -0
- package/src/types/TTSTypes.ts +126 -0
- package/src/types/VADTypes.ts +70 -0
- package/src/types/VoiceAgentTypes.ts +182 -0
- package/src/types/enums.ts +258 -0
- package/src/types/events.ts +337 -0
- package/src/types/external.d.ts +142 -0
- package/src/types/index.ts +146 -0
- package/src/types/models.ts +579 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLMTypes.ts
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for LLM streaming functionality.
|
|
5
|
+
*
|
|
6
|
+
* Reference: sdk/runanywhere-swift/Sources/RunAnywhere/Public/Extensions/LLM/LLMTypes.swift
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* LLM generation options
|
|
11
|
+
*/
|
|
12
|
+
export interface LLMGenerationOptions {
|
|
13
|
+
/** Maximum tokens to generate */
|
|
14
|
+
maxTokens?: number;
|
|
15
|
+
|
|
16
|
+
/** Temperature (0.0 - 2.0) */
|
|
17
|
+
temperature?: number;
|
|
18
|
+
|
|
19
|
+
/** Top-p sampling */
|
|
20
|
+
topP?: number;
|
|
21
|
+
|
|
22
|
+
/** Top-k sampling */
|
|
23
|
+
topK?: number;
|
|
24
|
+
|
|
25
|
+
/** Stop sequences */
|
|
26
|
+
stopSequences?: string[];
|
|
27
|
+
|
|
28
|
+
/** System prompt */
|
|
29
|
+
systemPrompt?: string;
|
|
30
|
+
|
|
31
|
+
/** Enable streaming */
|
|
32
|
+
streamingEnabled?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* LLM generation result
|
|
37
|
+
*/
|
|
38
|
+
export interface LLMGenerationResult {
|
|
39
|
+
/** Generated text */
|
|
40
|
+
text: string;
|
|
41
|
+
|
|
42
|
+
/** Thinking content (for models with reasoning) */
|
|
43
|
+
thinkingContent?: string;
|
|
44
|
+
|
|
45
|
+
/** Input tokens count */
|
|
46
|
+
inputTokens: number;
|
|
47
|
+
|
|
48
|
+
/** Output tokens count */
|
|
49
|
+
tokensUsed: number;
|
|
50
|
+
|
|
51
|
+
/** Model ID used */
|
|
52
|
+
modelUsed: string;
|
|
53
|
+
|
|
54
|
+
/** Total latency in ms */
|
|
55
|
+
latencyMs: number;
|
|
56
|
+
|
|
57
|
+
/** Framework used */
|
|
58
|
+
framework: string;
|
|
59
|
+
|
|
60
|
+
/** Tokens per second */
|
|
61
|
+
tokensPerSecond: number;
|
|
62
|
+
|
|
63
|
+
/** Time to first token in ms */
|
|
64
|
+
timeToFirstTokenMs?: number;
|
|
65
|
+
|
|
66
|
+
/** Thinking tokens count */
|
|
67
|
+
thinkingTokens: number;
|
|
68
|
+
|
|
69
|
+
/** Response tokens count */
|
|
70
|
+
responseTokens: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* LLM streaming result
|
|
75
|
+
* Contains both a stream for real-time tokens and a promise for final metrics
|
|
76
|
+
*/
|
|
77
|
+
export interface LLMStreamingResult {
|
|
78
|
+
/** Async iterator for tokens */
|
|
79
|
+
stream: AsyncIterable<string>;
|
|
80
|
+
|
|
81
|
+
/** Promise that resolves to final result with metrics */
|
|
82
|
+
result: Promise<LLMGenerationResult>;
|
|
83
|
+
|
|
84
|
+
/** Cancel the generation */
|
|
85
|
+
cancel: () => void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* LLM streaming metrics collector state
|
|
90
|
+
*/
|
|
91
|
+
export interface LLMStreamingMetrics {
|
|
92
|
+
/** Full generated text */
|
|
93
|
+
fullText: string;
|
|
94
|
+
|
|
95
|
+
/** Total token count */
|
|
96
|
+
tokenCount: number;
|
|
97
|
+
|
|
98
|
+
/** Time to first token in ms */
|
|
99
|
+
timeToFirstTokenMs?: number;
|
|
100
|
+
|
|
101
|
+
/** Total generation time in ms */
|
|
102
|
+
totalTimeMs: number;
|
|
103
|
+
|
|
104
|
+
/** Tokens per second */
|
|
105
|
+
tokensPerSecond: number;
|
|
106
|
+
|
|
107
|
+
/** Whether generation completed successfully */
|
|
108
|
+
completed: boolean;
|
|
109
|
+
|
|
110
|
+
/** Error if generation failed */
|
|
111
|
+
error?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Token callback for streaming
|
|
116
|
+
*/
|
|
117
|
+
export type LLMTokenCallback = (token: string) => void;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Stream completion callback
|
|
121
|
+
*/
|
|
122
|
+
export type LLMStreamCompleteCallback = (result: LLMGenerationResult) => void;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Stream error callback
|
|
126
|
+
*/
|
|
127
|
+
export type LLMStreamErrorCallback = (error: Error) => void;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* STTTypes.ts
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Speech-to-Text functionality.
|
|
5
|
+
*
|
|
6
|
+
* Reference: sdk/runanywhere-swift/Sources/RunAnywhere/Public/Extensions/STT/STTTypes.swift
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* STT options
|
|
11
|
+
*/
|
|
12
|
+
export interface STTOptions {
|
|
13
|
+
/** Language code (e.g., 'en') */
|
|
14
|
+
language?: string;
|
|
15
|
+
|
|
16
|
+
/** Sample rate in Hz (default: 16000) */
|
|
17
|
+
sampleRate?: number;
|
|
18
|
+
|
|
19
|
+
/** Enable word timestamps */
|
|
20
|
+
timestamps?: boolean;
|
|
21
|
+
|
|
22
|
+
/** Enable multiple alternatives */
|
|
23
|
+
alternatives?: boolean;
|
|
24
|
+
|
|
25
|
+
/** Maximum alternatives to return */
|
|
26
|
+
maxAlternatives?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* STT transcription output
|
|
31
|
+
*/
|
|
32
|
+
export interface STTOutput {
|
|
33
|
+
/** Transcribed text */
|
|
34
|
+
text: string;
|
|
35
|
+
|
|
36
|
+
/** Confidence score (0.0 - 1.0) */
|
|
37
|
+
confidence: number;
|
|
38
|
+
|
|
39
|
+
/** Word timestamps (if requested) */
|
|
40
|
+
wordTimestamps?: WordTimestamp[];
|
|
41
|
+
|
|
42
|
+
/** Detected language */
|
|
43
|
+
detectedLanguage?: string;
|
|
44
|
+
|
|
45
|
+
/** Alternative transcriptions */
|
|
46
|
+
alternatives?: STTAlternative[];
|
|
47
|
+
|
|
48
|
+
/** Transcription metadata */
|
|
49
|
+
metadata: TranscriptionMetadata;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Word timestamp
|
|
54
|
+
*/
|
|
55
|
+
export interface WordTimestamp {
|
|
56
|
+
word: string;
|
|
57
|
+
startTime: number;
|
|
58
|
+
endTime: number;
|
|
59
|
+
confidence?: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Alternative transcription
|
|
64
|
+
*/
|
|
65
|
+
export interface STTAlternative {
|
|
66
|
+
text: string;
|
|
67
|
+
confidence: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Transcription metadata
|
|
72
|
+
*/
|
|
73
|
+
export interface TranscriptionMetadata {
|
|
74
|
+
/** Model ID used */
|
|
75
|
+
modelId: string;
|
|
76
|
+
|
|
77
|
+
/** Processing time in seconds */
|
|
78
|
+
processingTime: number;
|
|
79
|
+
|
|
80
|
+
/** Audio length in seconds */
|
|
81
|
+
audioLength: number;
|
|
82
|
+
|
|
83
|
+
/** Real-time factor (processing time / audio length) */
|
|
84
|
+
realTimeFactor?: number;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* STT partial result (for streaming)
|
|
89
|
+
*/
|
|
90
|
+
export interface STTPartialResult {
|
|
91
|
+
/** Partial transcript */
|
|
92
|
+
transcript: string;
|
|
93
|
+
|
|
94
|
+
/** Confidence (if available) */
|
|
95
|
+
confidence?: number;
|
|
96
|
+
|
|
97
|
+
/** Word timestamps (if available) */
|
|
98
|
+
timestamps?: WordTimestamp[];
|
|
99
|
+
|
|
100
|
+
/** Detected language */
|
|
101
|
+
language?: string;
|
|
102
|
+
|
|
103
|
+
/** Alternative transcriptions */
|
|
104
|
+
alternatives?: STTAlternative[];
|
|
105
|
+
|
|
106
|
+
/** Whether this is the final result */
|
|
107
|
+
isFinal: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* STT streaming callback
|
|
112
|
+
*/
|
|
113
|
+
export type STTStreamCallback = (result: STTPartialResult) => void;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* STT streaming options
|
|
117
|
+
*/
|
|
118
|
+
export interface STTStreamOptions extends STTOptions {
|
|
119
|
+
/** Callback for partial results */
|
|
120
|
+
onPartialResult?: STTStreamCallback;
|
|
121
|
+
|
|
122
|
+
/** Interval for partial results in ms */
|
|
123
|
+
partialResultInterval?: number;
|
|
124
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StructuredOutputTypes.ts
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Structured Output functionality.
|
|
5
|
+
*
|
|
6
|
+
* Reference: sdk/runanywhere-swift/Sources/RunAnywhere/Public/Extensions/LLM/StructuredOutput/
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* JSON Schema type
|
|
11
|
+
*/
|
|
12
|
+
export type JSONSchemaType =
|
|
13
|
+
| 'string'
|
|
14
|
+
| 'number'
|
|
15
|
+
| 'integer'
|
|
16
|
+
| 'boolean'
|
|
17
|
+
| 'object'
|
|
18
|
+
| 'array'
|
|
19
|
+
| 'null';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* JSON Schema property
|
|
23
|
+
*/
|
|
24
|
+
export interface JSONSchemaProperty {
|
|
25
|
+
type?: JSONSchemaType | JSONSchemaType[];
|
|
26
|
+
description?: string;
|
|
27
|
+
enum?: (string | number | boolean)[];
|
|
28
|
+
const?: string | number | boolean;
|
|
29
|
+
default?: unknown;
|
|
30
|
+
|
|
31
|
+
// String validations
|
|
32
|
+
minLength?: number;
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
pattern?: string;
|
|
35
|
+
format?: string;
|
|
36
|
+
|
|
37
|
+
// Number validations
|
|
38
|
+
minimum?: number;
|
|
39
|
+
maximum?: number;
|
|
40
|
+
exclusiveMinimum?: number;
|
|
41
|
+
exclusiveMaximum?: number;
|
|
42
|
+
multipleOf?: number;
|
|
43
|
+
|
|
44
|
+
// Array validations
|
|
45
|
+
items?: JSONSchema;
|
|
46
|
+
minItems?: number;
|
|
47
|
+
maxItems?: number;
|
|
48
|
+
uniqueItems?: boolean;
|
|
49
|
+
|
|
50
|
+
// Object validations
|
|
51
|
+
properties?: Record<string, JSONSchemaProperty>;
|
|
52
|
+
required?: string[];
|
|
53
|
+
additionalProperties?: boolean | JSONSchema;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* JSON Schema definition
|
|
58
|
+
*/
|
|
59
|
+
export interface JSONSchema extends JSONSchemaProperty {
|
|
60
|
+
$schema?: string;
|
|
61
|
+
$id?: string;
|
|
62
|
+
title?: string;
|
|
63
|
+
definitions?: Record<string, JSONSchema>;
|
|
64
|
+
$ref?: string;
|
|
65
|
+
|
|
66
|
+
// Composition
|
|
67
|
+
allOf?: JSONSchema[];
|
|
68
|
+
anyOf?: JSONSchema[];
|
|
69
|
+
oneOf?: JSONSchema[];
|
|
70
|
+
not?: JSONSchema;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Structured output options
|
|
75
|
+
*/
|
|
76
|
+
export interface StructuredOutputOptions {
|
|
77
|
+
/** Maximum tokens to generate */
|
|
78
|
+
maxTokens?: number;
|
|
79
|
+
|
|
80
|
+
/** Temperature for generation (0.0 - 2.0) */
|
|
81
|
+
temperature?: number;
|
|
82
|
+
|
|
83
|
+
/** Strict schema adherence */
|
|
84
|
+
strict?: boolean;
|
|
85
|
+
|
|
86
|
+
/** Number of retries on parse failure */
|
|
87
|
+
retries?: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Structured output result
|
|
92
|
+
*/
|
|
93
|
+
export interface StructuredOutputResult<T = unknown> {
|
|
94
|
+
/** Parsed data */
|
|
95
|
+
data: T;
|
|
96
|
+
|
|
97
|
+
/** Raw JSON string */
|
|
98
|
+
raw: string;
|
|
99
|
+
|
|
100
|
+
/** Whether generation was successful */
|
|
101
|
+
success: boolean;
|
|
102
|
+
|
|
103
|
+
/** Error message if failed */
|
|
104
|
+
error?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Entity extraction result
|
|
109
|
+
*/
|
|
110
|
+
export interface EntityExtractionResult<T = unknown> {
|
|
111
|
+
entities: T;
|
|
112
|
+
confidence: number;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Classification result
|
|
117
|
+
*/
|
|
118
|
+
export interface ClassificationResult {
|
|
119
|
+
category: string;
|
|
120
|
+
confidence: number;
|
|
121
|
+
alternatives?: Array<{
|
|
122
|
+
category: string;
|
|
123
|
+
confidence: number;
|
|
124
|
+
}>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sentiment analysis result
|
|
129
|
+
*/
|
|
130
|
+
export interface SentimentResult {
|
|
131
|
+
sentiment: 'positive' | 'negative' | 'neutral';
|
|
132
|
+
score: number;
|
|
133
|
+
aspects?: Array<{
|
|
134
|
+
aspect: string;
|
|
135
|
+
sentiment: 'positive' | 'negative' | 'neutral';
|
|
136
|
+
score: number;
|
|
137
|
+
}>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Named entity result
|
|
142
|
+
*/
|
|
143
|
+
export interface NamedEntity {
|
|
144
|
+
text: string;
|
|
145
|
+
type: string;
|
|
146
|
+
startOffset: number;
|
|
147
|
+
endOffset: number;
|
|
148
|
+
confidence: number;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Named entity recognition result
|
|
153
|
+
*/
|
|
154
|
+
export interface NERResult {
|
|
155
|
+
entities: NamedEntity[];
|
|
156
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TTSTypes.ts
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Text-to-Speech functionality.
|
|
5
|
+
*
|
|
6
|
+
* Reference: sdk/runanywhere-swift/Sources/RunAnywhere/Public/Extensions/TTS/TTSTypes.swift
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* TTS synthesis options
|
|
11
|
+
*/
|
|
12
|
+
export interface TTSOptions {
|
|
13
|
+
/** Voice ID to use */
|
|
14
|
+
voice?: string;
|
|
15
|
+
|
|
16
|
+
/** Speech rate multiplier (default: 1.0) */
|
|
17
|
+
rate?: number;
|
|
18
|
+
|
|
19
|
+
/** Pitch adjustment (default: 1.0) */
|
|
20
|
+
pitch?: number;
|
|
21
|
+
|
|
22
|
+
/** Volume (0.0 - 1.0, default: 1.0) */
|
|
23
|
+
volume?: number;
|
|
24
|
+
|
|
25
|
+
/** Sample rate in Hz (default: 22050) */
|
|
26
|
+
sampleRate?: number;
|
|
27
|
+
|
|
28
|
+
/** Language code (e.g., 'en-US') */
|
|
29
|
+
language?: string;
|
|
30
|
+
|
|
31
|
+
/** Audio format */
|
|
32
|
+
audioFormat?: AudioFormat;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Audio format enum
|
|
37
|
+
*/
|
|
38
|
+
export type AudioFormat = 'pcm' | 'wav' | 'mp3';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* TTS synthesis output
|
|
42
|
+
*/
|
|
43
|
+
export interface TTSOutput {
|
|
44
|
+
/** Audio data (base64 encoded or raw PCM) */
|
|
45
|
+
audioData: string;
|
|
46
|
+
|
|
47
|
+
/** Audio format */
|
|
48
|
+
format: AudioFormat;
|
|
49
|
+
|
|
50
|
+
/** Duration in seconds */
|
|
51
|
+
duration: number;
|
|
52
|
+
|
|
53
|
+
/** Phoneme timestamps (if available) */
|
|
54
|
+
phonemeTimestamps?: PhonemeTimestamp[];
|
|
55
|
+
|
|
56
|
+
/** Synthesis metadata */
|
|
57
|
+
metadata: TTSSynthesisMetadata;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Phoneme timestamp
|
|
62
|
+
*/
|
|
63
|
+
export interface PhonemeTimestamp {
|
|
64
|
+
phoneme: string;
|
|
65
|
+
startTime: number;
|
|
66
|
+
endTime: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* TTS synthesis metadata
|
|
71
|
+
*/
|
|
72
|
+
export interface TTSSynthesisMetadata {
|
|
73
|
+
/** Voice used */
|
|
74
|
+
voice: string;
|
|
75
|
+
|
|
76
|
+
/** Language */
|
|
77
|
+
language?: string;
|
|
78
|
+
|
|
79
|
+
/** Processing time in seconds */
|
|
80
|
+
processingTime: number;
|
|
81
|
+
|
|
82
|
+
/** Character count of input text */
|
|
83
|
+
characterCount: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* TTS speak result (simple playback API)
|
|
88
|
+
*/
|
|
89
|
+
export interface TTSSpeakResult {
|
|
90
|
+
/** Duration of audio in seconds */
|
|
91
|
+
duration: number;
|
|
92
|
+
|
|
93
|
+
/** Voice used */
|
|
94
|
+
voice: string;
|
|
95
|
+
|
|
96
|
+
/** Processing time in seconds */
|
|
97
|
+
processingTime: number;
|
|
98
|
+
|
|
99
|
+
/** Character count */
|
|
100
|
+
characterCount: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* TTS voice info
|
|
105
|
+
*/
|
|
106
|
+
export interface TTSVoiceInfo {
|
|
107
|
+
/** Voice ID */
|
|
108
|
+
id: string;
|
|
109
|
+
|
|
110
|
+
/** Display name */
|
|
111
|
+
name: string;
|
|
112
|
+
|
|
113
|
+
/** Language code */
|
|
114
|
+
language: string;
|
|
115
|
+
|
|
116
|
+
/** Gender */
|
|
117
|
+
gender?: 'male' | 'female' | 'neutral';
|
|
118
|
+
|
|
119
|
+
/** Whether this voice is downloaded */
|
|
120
|
+
isDownloaded: boolean;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* TTS stream chunk callback
|
|
125
|
+
*/
|
|
126
|
+
export type TTSStreamChunkCallback = (audioChunk: ArrayBuffer) => void;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VADTypes.ts
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Voice Activity Detection functionality.
|
|
5
|
+
*
|
|
6
|
+
* Reference: sdk/runanywhere-swift/Sources/RunAnywhere/Public/Extensions/VAD/VADTypes.swift
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* VAD configuration options
|
|
11
|
+
*/
|
|
12
|
+
export interface VADConfiguration {
|
|
13
|
+
/** Sample rate in Hz (default: 16000) */
|
|
14
|
+
sampleRate?: number;
|
|
15
|
+
|
|
16
|
+
/** Frame length in seconds (default: 0.1) */
|
|
17
|
+
frameLength?: number;
|
|
18
|
+
|
|
19
|
+
/** Energy threshold for speech detection (default: 0.005) */
|
|
20
|
+
energyThreshold?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* VAD processing result
|
|
25
|
+
*/
|
|
26
|
+
export interface VADResult {
|
|
27
|
+
/** Whether speech was detected */
|
|
28
|
+
isSpeech: boolean;
|
|
29
|
+
|
|
30
|
+
/** Speech probability (0.0 - 1.0) */
|
|
31
|
+
probability: number;
|
|
32
|
+
|
|
33
|
+
/** Start time of speech segment (seconds) */
|
|
34
|
+
startTime?: number;
|
|
35
|
+
|
|
36
|
+
/** End time of speech segment (seconds) */
|
|
37
|
+
endTime?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Speech activity event types
|
|
42
|
+
*/
|
|
43
|
+
export type SpeechActivityEvent = 'started' | 'ended';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* VAD speech activity callback
|
|
47
|
+
*/
|
|
48
|
+
export type VADSpeechActivityCallback = (event: SpeechActivityEvent) => void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* VAD audio buffer callback
|
|
52
|
+
*/
|
|
53
|
+
export type VADAudioBufferCallback = (samples: Float32Array) => void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* VAD state
|
|
57
|
+
*/
|
|
58
|
+
export interface VADState {
|
|
59
|
+
/** Whether VAD is initialized */
|
|
60
|
+
isInitialized: boolean;
|
|
61
|
+
|
|
62
|
+
/** Whether VAD is currently running */
|
|
63
|
+
isRunning: boolean;
|
|
64
|
+
|
|
65
|
+
/** Whether speech is currently active */
|
|
66
|
+
isSpeechActive: boolean;
|
|
67
|
+
|
|
68
|
+
/** Current speech probability */
|
|
69
|
+
currentProbability: number;
|
|
70
|
+
}
|