@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,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file rac_tts_component.h
|
|
3
|
+
* @brief RunAnywhere Commons - TTS Capability Component
|
|
4
|
+
*
|
|
5
|
+
* C port of Swift's TTSCapability.swift from:
|
|
6
|
+
* Sources/RunAnywhere/Features/TTS/TTSCapability.swift
|
|
7
|
+
*
|
|
8
|
+
* Actor-based TTS capability that owns voice lifecycle and synthesis.
|
|
9
|
+
* Uses lifecycle manager for unified lifecycle + analytics handling.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
#ifndef RAC_TTS_COMPONENT_H
|
|
13
|
+
#define RAC_TTS_COMPONENT_H
|
|
14
|
+
|
|
15
|
+
#include "rac/core/capabilities/rac_lifecycle.h"
|
|
16
|
+
#include "rac/core/rac_error.h"
|
|
17
|
+
#include "rac/features/tts/rac_tts_types.h"
|
|
18
|
+
|
|
19
|
+
#ifdef __cplusplus
|
|
20
|
+
extern "C" {
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
// NOTE: rac_tts_config_t is defined in rac_tts_types.h (included above)
|
|
24
|
+
|
|
25
|
+
// =============================================================================
|
|
26
|
+
// TTS COMPONENT API - Mirrors Swift's TTSCapability
|
|
27
|
+
// =============================================================================
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @brief Create a TTS capability component
|
|
31
|
+
*
|
|
32
|
+
* @param out_handle Output: Handle to the component
|
|
33
|
+
* @return RAC_SUCCESS or error code
|
|
34
|
+
*/
|
|
35
|
+
RAC_API rac_result_t rac_tts_component_create(rac_handle_t* out_handle);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @brief Configure the TTS component
|
|
39
|
+
*
|
|
40
|
+
* @param handle Component handle
|
|
41
|
+
* @param config Configuration
|
|
42
|
+
* @return RAC_SUCCESS or error code
|
|
43
|
+
*/
|
|
44
|
+
RAC_API rac_result_t rac_tts_component_configure(rac_handle_t handle,
|
|
45
|
+
const rac_tts_config_t* config);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @brief Check if voice is loaded
|
|
49
|
+
*
|
|
50
|
+
* @param handle Component handle
|
|
51
|
+
* @return RAC_TRUE if loaded, RAC_FALSE otherwise
|
|
52
|
+
*/
|
|
53
|
+
RAC_API rac_bool_t rac_tts_component_is_loaded(rac_handle_t handle);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @brief Get current voice ID
|
|
57
|
+
*
|
|
58
|
+
* @param handle Component handle
|
|
59
|
+
* @return Current voice ID (NULL if not loaded)
|
|
60
|
+
*/
|
|
61
|
+
RAC_API const char* rac_tts_component_get_voice_id(rac_handle_t handle);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @brief Load a voice
|
|
65
|
+
*
|
|
66
|
+
* @param handle Component handle
|
|
67
|
+
* @param voice_path File path to the voice (used for loading) - REQUIRED
|
|
68
|
+
* @param voice_id Voice identifier for telemetry (e.g., "vits-piper-en_GB-alba-medium")
|
|
69
|
+
* Optional: if NULL, defaults to voice_path
|
|
70
|
+
* @param voice_name Human-readable voice name (e.g., "Piper TTS (British English)")
|
|
71
|
+
* Optional: if NULL, defaults to voice_id
|
|
72
|
+
* @return RAC_SUCCESS or error code
|
|
73
|
+
*/
|
|
74
|
+
RAC_API rac_result_t rac_tts_component_load_voice(rac_handle_t handle, const char* voice_path,
|
|
75
|
+
const char* voice_id, const char* voice_name);
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @brief Unload the current voice
|
|
79
|
+
*
|
|
80
|
+
* @param handle Component handle
|
|
81
|
+
* @return RAC_SUCCESS or error code
|
|
82
|
+
*/
|
|
83
|
+
RAC_API rac_result_t rac_tts_component_unload(rac_handle_t handle);
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @brief Cleanup and reset the component
|
|
87
|
+
*
|
|
88
|
+
* @param handle Component handle
|
|
89
|
+
* @return RAC_SUCCESS or error code
|
|
90
|
+
*/
|
|
91
|
+
RAC_API rac_result_t rac_tts_component_cleanup(rac_handle_t handle);
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @brief Stop current synthesis
|
|
95
|
+
*
|
|
96
|
+
* @param handle Component handle
|
|
97
|
+
* @return RAC_SUCCESS or error code
|
|
98
|
+
*/
|
|
99
|
+
RAC_API rac_result_t rac_tts_component_stop(rac_handle_t handle);
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @brief Synthesize text to audio
|
|
103
|
+
*
|
|
104
|
+
* @param handle Component handle
|
|
105
|
+
* @param text Text to synthesize
|
|
106
|
+
* @param options Synthesis options (can be NULL for defaults)
|
|
107
|
+
* @param out_result Output: Synthesis result
|
|
108
|
+
* @return RAC_SUCCESS or error code
|
|
109
|
+
*/
|
|
110
|
+
RAC_API rac_result_t rac_tts_component_synthesize(rac_handle_t handle, const char* text,
|
|
111
|
+
const rac_tts_options_t* options,
|
|
112
|
+
rac_tts_result_t* out_result);
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @brief Synthesize text with streaming
|
|
116
|
+
*
|
|
117
|
+
* @param handle Component handle
|
|
118
|
+
* @param text Text to synthesize
|
|
119
|
+
* @param options Synthesis options
|
|
120
|
+
* @param callback Callback for audio chunks
|
|
121
|
+
* @param user_data User context passed to callback
|
|
122
|
+
* @return RAC_SUCCESS or error code
|
|
123
|
+
*/
|
|
124
|
+
RAC_API rac_result_t rac_tts_component_synthesize_stream(rac_handle_t handle, const char* text,
|
|
125
|
+
const rac_tts_options_t* options,
|
|
126
|
+
rac_tts_stream_callback_t callback,
|
|
127
|
+
void* user_data);
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @brief Get lifecycle state
|
|
131
|
+
*
|
|
132
|
+
* @param handle Component handle
|
|
133
|
+
* @return Current lifecycle state
|
|
134
|
+
*/
|
|
135
|
+
RAC_API rac_lifecycle_state_t rac_tts_component_get_state(rac_handle_t handle);
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @brief Get lifecycle metrics
|
|
139
|
+
*
|
|
140
|
+
* @param handle Component handle
|
|
141
|
+
* @param out_metrics Output: Lifecycle metrics
|
|
142
|
+
* @return RAC_SUCCESS or error code
|
|
143
|
+
*/
|
|
144
|
+
RAC_API rac_result_t rac_tts_component_get_metrics(rac_handle_t handle,
|
|
145
|
+
rac_lifecycle_metrics_t* out_metrics);
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @brief Destroy the TTS component
|
|
149
|
+
*
|
|
150
|
+
* @param handle Component handle
|
|
151
|
+
*/
|
|
152
|
+
RAC_API void rac_tts_component_destroy(rac_handle_t handle);
|
|
153
|
+
|
|
154
|
+
#ifdef __cplusplus
|
|
155
|
+
}
|
|
156
|
+
#endif
|
|
157
|
+
|
|
158
|
+
#endif /* RAC_TTS_COMPONENT_H */
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file rac_tts_events.h
|
|
3
|
+
* @brief TTS-specific event types - 1:1 port of TTSEvent.swift
|
|
4
|
+
*
|
|
5
|
+
* Swift Source: Sources/RunAnywhere/Features/TTS/Analytics/TTSEvent.swift
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#ifndef RAC_TTS_EVENTS_H
|
|
9
|
+
#define RAC_TTS_EVENTS_H
|
|
10
|
+
|
|
11
|
+
#include "rac/core/rac_types.h"
|
|
12
|
+
#include "rac/infrastructure/events/rac_events.h"
|
|
13
|
+
|
|
14
|
+
#ifdef __cplusplus
|
|
15
|
+
extern "C" {
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
// =============================================================================
|
|
19
|
+
// TTS EVENT TYPES
|
|
20
|
+
// =============================================================================
|
|
21
|
+
|
|
22
|
+
typedef enum rac_tts_event_type {
|
|
23
|
+
RAC_TTS_EVENT_SYNTHESIS_STARTED = 0,
|
|
24
|
+
RAC_TTS_EVENT_SYNTHESIS_CHUNK,
|
|
25
|
+
RAC_TTS_EVENT_SYNTHESIS_COMPLETED,
|
|
26
|
+
RAC_TTS_EVENT_SYNTHESIS_FAILED,
|
|
27
|
+
} rac_tts_event_type_t;
|
|
28
|
+
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// EVENT PUBLISHING FUNCTIONS
|
|
31
|
+
// =============================================================================
|
|
32
|
+
|
|
33
|
+
RAC_API rac_result_t rac_tts_event_synthesis_started(const char* synthesis_id, const char* model_id,
|
|
34
|
+
int32_t character_count, int32_t sample_rate,
|
|
35
|
+
rac_inference_framework_t framework);
|
|
36
|
+
|
|
37
|
+
RAC_API rac_result_t rac_tts_event_synthesis_chunk(const char* synthesis_id, int32_t chunk_size);
|
|
38
|
+
|
|
39
|
+
RAC_API rac_result_t rac_tts_event_synthesis_completed(
|
|
40
|
+
const char* synthesis_id, const char* model_id, int32_t character_count,
|
|
41
|
+
double audio_duration_ms, int32_t audio_size_bytes, double processing_duration_ms,
|
|
42
|
+
double characters_per_second, int32_t sample_rate, rac_inference_framework_t framework);
|
|
43
|
+
|
|
44
|
+
RAC_API rac_result_t rac_tts_event_synthesis_failed(const char* synthesis_id, const char* model_id,
|
|
45
|
+
rac_result_t error_code,
|
|
46
|
+
const char* error_message);
|
|
47
|
+
|
|
48
|
+
RAC_API const char* rac_tts_event_type_string(rac_tts_event_type_t event_type);
|
|
49
|
+
|
|
50
|
+
#ifdef __cplusplus
|
|
51
|
+
}
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
#endif /* RAC_TTS_EVENTS_H */
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file rac_tts_service.h
|
|
3
|
+
* @brief RunAnywhere Commons - TTS Service Interface
|
|
4
|
+
*
|
|
5
|
+
* Defines the generic TTS service API and vtable for multi-backend dispatch.
|
|
6
|
+
* Backends (ONNX, Platform/System TTS, etc.) implement the vtable and register
|
|
7
|
+
* with the service registry.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#ifndef RAC_TTS_SERVICE_H
|
|
11
|
+
#define RAC_TTS_SERVICE_H
|
|
12
|
+
|
|
13
|
+
#include "rac/core/rac_error.h"
|
|
14
|
+
#include "rac/features/tts/rac_tts_types.h"
|
|
15
|
+
|
|
16
|
+
#ifdef __cplusplus
|
|
17
|
+
extern "C" {
|
|
18
|
+
#endif
|
|
19
|
+
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// SERVICE VTABLE - Backend implementations provide this
|
|
22
|
+
// =============================================================================
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* TTS Service operations vtable.
|
|
26
|
+
* Each backend implements these functions and provides a static vtable.
|
|
27
|
+
*/
|
|
28
|
+
typedef struct rac_tts_service_ops {
|
|
29
|
+
/** Initialize the service */
|
|
30
|
+
rac_result_t (*initialize)(void* impl);
|
|
31
|
+
|
|
32
|
+
/** Synthesize text to audio (blocking) */
|
|
33
|
+
rac_result_t (*synthesize)(void* impl, const char* text, const rac_tts_options_t* options,
|
|
34
|
+
rac_tts_result_t* out_result);
|
|
35
|
+
|
|
36
|
+
/** Stream synthesis for long text */
|
|
37
|
+
rac_result_t (*synthesize_stream)(void* impl, const char* text,
|
|
38
|
+
const rac_tts_options_t* options,
|
|
39
|
+
rac_tts_stream_callback_t callback, void* user_data);
|
|
40
|
+
|
|
41
|
+
/** Stop current synthesis */
|
|
42
|
+
rac_result_t (*stop)(void* impl);
|
|
43
|
+
|
|
44
|
+
/** Get service info */
|
|
45
|
+
rac_result_t (*get_info)(void* impl, rac_tts_info_t* out_info);
|
|
46
|
+
|
|
47
|
+
/** Cleanup/release resources (keeps service alive) */
|
|
48
|
+
rac_result_t (*cleanup)(void* impl);
|
|
49
|
+
|
|
50
|
+
/** Destroy the service */
|
|
51
|
+
void (*destroy)(void* impl);
|
|
52
|
+
} rac_tts_service_ops_t;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* TTS Service instance.
|
|
56
|
+
* Contains vtable pointer and backend-specific implementation.
|
|
57
|
+
*/
|
|
58
|
+
typedef struct rac_tts_service {
|
|
59
|
+
/** Vtable with backend operations */
|
|
60
|
+
const rac_tts_service_ops_t* ops;
|
|
61
|
+
|
|
62
|
+
/** Backend-specific implementation handle */
|
|
63
|
+
void* impl;
|
|
64
|
+
|
|
65
|
+
/** Model/voice ID for reference */
|
|
66
|
+
const char* model_id;
|
|
67
|
+
} rac_tts_service_t;
|
|
68
|
+
|
|
69
|
+
// =============================================================================
|
|
70
|
+
// PUBLIC API - Generic service functions
|
|
71
|
+
// =============================================================================
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @brief Create a TTS service
|
|
75
|
+
*
|
|
76
|
+
* Routes through service registry to find appropriate backend.
|
|
77
|
+
*
|
|
78
|
+
* @param voice_id Voice/model identifier (registry ID or path)
|
|
79
|
+
* @param out_handle Output: Handle to the created service
|
|
80
|
+
* @return RAC_SUCCESS or error code
|
|
81
|
+
*/
|
|
82
|
+
RAC_API rac_result_t rac_tts_create(const char* voice_id, rac_handle_t* out_handle);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @brief Initialize a TTS service
|
|
86
|
+
*
|
|
87
|
+
* @param handle Service handle
|
|
88
|
+
* @return RAC_SUCCESS or error code
|
|
89
|
+
*/
|
|
90
|
+
RAC_API rac_result_t rac_tts_initialize(rac_handle_t handle);
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @brief Synthesize text to audio
|
|
94
|
+
*
|
|
95
|
+
* @param handle Service handle
|
|
96
|
+
* @param text Text to synthesize
|
|
97
|
+
* @param options Synthesis options (can be NULL for defaults)
|
|
98
|
+
* @param out_result Output: Synthesis result (caller must free with rac_tts_result_free)
|
|
99
|
+
* @return RAC_SUCCESS or error code
|
|
100
|
+
*/
|
|
101
|
+
RAC_API rac_result_t rac_tts_synthesize(rac_handle_t handle, const char* text,
|
|
102
|
+
const rac_tts_options_t* options,
|
|
103
|
+
rac_tts_result_t* out_result);
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @brief Stream synthesis for long text
|
|
107
|
+
*
|
|
108
|
+
* @param handle Service handle
|
|
109
|
+
* @param text Text to synthesize
|
|
110
|
+
* @param options Synthesis options
|
|
111
|
+
* @param callback Callback for each audio chunk
|
|
112
|
+
* @param user_data User context passed to callback
|
|
113
|
+
* @return RAC_SUCCESS or error code
|
|
114
|
+
*/
|
|
115
|
+
RAC_API rac_result_t rac_tts_synthesize_stream(rac_handle_t handle, const char* text,
|
|
116
|
+
const rac_tts_options_t* options,
|
|
117
|
+
rac_tts_stream_callback_t callback, void* user_data);
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @brief Stop current synthesis
|
|
121
|
+
*
|
|
122
|
+
* @param handle Service handle
|
|
123
|
+
* @return RAC_SUCCESS or error code
|
|
124
|
+
*/
|
|
125
|
+
RAC_API rac_result_t rac_tts_stop(rac_handle_t handle);
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @brief Get service information
|
|
129
|
+
*
|
|
130
|
+
* @param handle Service handle
|
|
131
|
+
* @param out_info Output: Service information
|
|
132
|
+
* @return RAC_SUCCESS or error code
|
|
133
|
+
*/
|
|
134
|
+
RAC_API rac_result_t rac_tts_get_info(rac_handle_t handle, rac_tts_info_t* out_info);
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @brief Cleanup and release resources
|
|
138
|
+
*
|
|
139
|
+
* @param handle Service handle
|
|
140
|
+
* @return RAC_SUCCESS or error code
|
|
141
|
+
*/
|
|
142
|
+
RAC_API rac_result_t rac_tts_cleanup(rac_handle_t handle);
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @brief Destroy a TTS service instance
|
|
146
|
+
*
|
|
147
|
+
* @param handle Service handle to destroy
|
|
148
|
+
*/
|
|
149
|
+
RAC_API void rac_tts_destroy(rac_handle_t handle);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @brief Free a TTS result
|
|
153
|
+
*
|
|
154
|
+
* @param result Result to free
|
|
155
|
+
*/
|
|
156
|
+
RAC_API void rac_tts_result_free(rac_tts_result_t* result);
|
|
157
|
+
|
|
158
|
+
#ifdef __cplusplus
|
|
159
|
+
}
|
|
160
|
+
#endif
|
|
161
|
+
|
|
162
|
+
#endif /* RAC_TTS_SERVICE_H */
|