@runanywhere/core 0.16.10 → 0.17.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.
Files changed (217) hide show
  1. package/README.md +427 -0
  2. package/RunAnywhereCore.podspec +4 -4
  3. package/cpp/HybridRunAnywhereCore.cpp +10 -4
  4. package/cpp/bridges/TelemetryBridge.cpp +10 -3
  5. package/ios/.testlocal +0 -0
  6. package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.hpp +1 -1
  7. package/package.json +12 -11
  8. package/src/Features/VoiceSession/AudioCaptureManager.ts +274 -109
  9. package/src/Features/VoiceSession/AudioPlaybackManager.ts +247 -59
  10. package/src/Features/VoiceSession/VoiceSessionHandle.ts +200 -133
  11. package/src/Public/Extensions/RunAnywhere+Audio.ts +688 -0
  12. package/src/Public/Extensions/RunAnywhere+VoiceSession.ts +15 -11
  13. package/src/Public/Extensions/index.ts +25 -0
  14. package/src/Public/RunAnywhere.ts +36 -14
  15. package/android/src/main/include/rac/backends/rac_llm_llamacpp.h +0 -218
  16. package/android/src/main/include/rac/backends/rac_stt_onnx.h +0 -99
  17. package/android/src/main/include/rac/backends/rac_stt_whispercpp.h +0 -153
  18. package/android/src/main/include/rac/backends/rac_tts_onnx.h +0 -71
  19. package/android/src/main/include/rac/backends/rac_vad_onnx.h +0 -84
  20. package/android/src/main/include/rac/core/capabilities/rac_lifecycle.h +0 -290
  21. package/android/src/main/include/rac/core/rac_analytics_events.h +0 -610
  22. package/android/src/main/include/rac/core/rac_audio_utils.h +0 -88
  23. package/android/src/main/include/rac/core/rac_component_types.h +0 -160
  24. package/android/src/main/include/rac/core/rac_core.h +0 -331
  25. package/android/src/main/include/rac/core/rac_error.h +0 -469
  26. package/android/src/main/include/rac/core/rac_events.h +0 -334
  27. package/android/src/main/include/rac/core/rac_logger.h +0 -416
  28. package/android/src/main/include/rac/core/rac_platform_adapter.h +0 -340
  29. package/android/src/main/include/rac/core/rac_sdk_state.h +0 -292
  30. package/android/src/main/include/rac/core/rac_structured_error.h +0 -594
  31. package/android/src/main/include/rac/core/rac_types.h +0 -264
  32. package/android/src/main/include/rac/features/llm/rac_llm.h +0 -17
  33. package/android/src/main/include/rac/features/llm/rac_llm_analytics.h +0 -188
  34. package/android/src/main/include/rac/features/llm/rac_llm_component.h +0 -228
  35. package/android/src/main/include/rac/features/llm/rac_llm_events.h +0 -215
  36. package/android/src/main/include/rac/features/llm/rac_llm_metrics.h +0 -402
  37. package/android/src/main/include/rac/features/llm/rac_llm_service.h +0 -163
  38. package/android/src/main/include/rac/features/llm/rac_llm_structured_output.h +0 -141
  39. package/android/src/main/include/rac/features/llm/rac_llm_types.h +0 -384
  40. package/android/src/main/include/rac/features/platform/rac_llm_platform.h +0 -204
  41. package/android/src/main/include/rac/features/platform/rac_tts_platform.h +0 -197
  42. package/android/src/main/include/rac/features/stt/rac_stt.h +0 -17
  43. package/android/src/main/include/rac/features/stt/rac_stt_analytics.h +0 -204
  44. package/android/src/main/include/rac/features/stt/rac_stt_component.h +0 -162
  45. package/android/src/main/include/rac/features/stt/rac_stt_events.h +0 -62
  46. package/android/src/main/include/rac/features/stt/rac_stt_service.h +0 -154
  47. package/android/src/main/include/rac/features/stt/rac_stt_types.h +0 -389
  48. package/android/src/main/include/rac/features/tts/rac_tts.h +0 -17
  49. package/android/src/main/include/rac/features/tts/rac_tts_analytics.h +0 -181
  50. package/android/src/main/include/rac/features/tts/rac_tts_component.h +0 -158
  51. package/android/src/main/include/rac/features/tts/rac_tts_events.h +0 -54
  52. package/android/src/main/include/rac/features/tts/rac_tts_service.h +0 -162
  53. package/android/src/main/include/rac/features/tts/rac_tts_types.h +0 -374
  54. package/android/src/main/include/rac/features/vad/rac_vad.h +0 -17
  55. package/android/src/main/include/rac/features/vad/rac_vad_analytics.h +0 -236
  56. package/android/src/main/include/rac/features/vad/rac_vad_component.h +0 -185
  57. package/android/src/main/include/rac/features/vad/rac_vad_energy.h +0 -443
  58. package/android/src/main/include/rac/features/vad/rac_vad_events.h +0 -76
  59. package/android/src/main/include/rac/features/vad/rac_vad_service.h +0 -167
  60. package/android/src/main/include/rac/features/vad/rac_vad_types.h +0 -244
  61. package/android/src/main/include/rac/features/voice_agent/rac_voice_agent.h +0 -612
  62. package/android/src/main/include/rac/infrastructure/device/rac_device_manager.h +0 -176
  63. package/android/src/main/include/rac/infrastructure/download/rac_download.h +0 -418
  64. package/android/src/main/include/rac/infrastructure/events/rac_events.h +0 -177
  65. package/android/src/main/include/rac/infrastructure/model_management/rac_model_assignment.h +0 -169
  66. package/android/src/main/include/rac/infrastructure/model_management/rac_model_paths.h +0 -258
  67. package/android/src/main/include/rac/infrastructure/model_management/rac_model_registry.h +0 -357
  68. package/android/src/main/include/rac/infrastructure/model_management/rac_model_strategy.h +0 -374
  69. package/android/src/main/include/rac/infrastructure/model_management/rac_model_types.h +0 -613
  70. package/android/src/main/include/rac/infrastructure/network/rac_api_types.h +0 -335
  71. package/android/src/main/include/rac/infrastructure/network/rac_auth_manager.h +0 -252
  72. package/android/src/main/include/rac/infrastructure/network/rac_dev_config.h +0 -85
  73. package/android/src/main/include/rac/infrastructure/network/rac_endpoints.h +0 -102
  74. package/android/src/main/include/rac/infrastructure/network/rac_environment.h +0 -220
  75. package/android/src/main/include/rac/infrastructure/network/rac_http_client.h +0 -233
  76. package/android/src/main/include/rac/infrastructure/storage/rac_storage_analyzer.h +0 -286
  77. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_manager.h +0 -206
  78. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_types.h +0 -234
  79. package/android/src/main/jniLibs/arm64-v8a/libc++_shared.so +0 -0
  80. package/android/src/main/jniLibs/arm64-v8a/libomp.so +0 -0
  81. package/android/src/main/jniLibs/arm64-v8a/librac_commons.so +0 -0
  82. package/android/src/main/jniLibs/arm64-v8a/librunanywhere_jni.so +0 -0
  83. package/ios/Frameworks/RACommons.xcframework/Info.plist +0 -44
  84. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/RACommons.h +0 -67
  85. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_analytics_events.h +0 -610
  86. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_api_types.h +0 -335
  87. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_audio_utils.h +0 -88
  88. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_auth_manager.h +0 -252
  89. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_component_types.h +0 -160
  90. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_core.h +0 -331
  91. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_dev_config.h +0 -85
  92. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_device_manager.h +0 -176
  93. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_download.h +0 -418
  94. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_endpoints.h +0 -102
  95. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_environment.h +0 -220
  96. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_error.h +0 -469
  97. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_events.h +0 -177
  98. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_http_client.h +0 -233
  99. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_lifecycle.h +0 -290
  100. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm.h +0 -17
  101. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_analytics.h +0 -188
  102. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_component.h +0 -228
  103. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_events.h +0 -215
  104. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_llamacpp.h +0 -218
  105. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_metrics.h +0 -402
  106. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_platform.h +0 -204
  107. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_service.h +0 -163
  108. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_structured_output.h +0 -141
  109. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_types.h +0 -384
  110. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_logger.h +0 -416
  111. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_assignment.h +0 -169
  112. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_paths.h +0 -258
  113. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_registry.h +0 -357
  114. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_strategy.h +0 -374
  115. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_types.h +0 -613
  116. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_platform_adapter.h +0 -340
  117. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_sdk_state.h +0 -292
  118. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_storage_analyzer.h +0 -286
  119. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_structured_error.h +0 -594
  120. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt.h +0 -17
  121. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_analytics.h +0 -204
  122. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_component.h +0 -162
  123. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_events.h +0 -62
  124. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_onnx.h +0 -99
  125. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_service.h +0 -154
  126. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_types.h +0 -389
  127. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_whispercpp.h +0 -153
  128. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_manager.h +0 -206
  129. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_types.h +0 -234
  130. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts.h +0 -17
  131. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_analytics.h +0 -181
  132. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_component.h +0 -158
  133. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_events.h +0 -54
  134. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_onnx.h +0 -71
  135. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_platform.h +0 -197
  136. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_service.h +0 -162
  137. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_types.h +0 -374
  138. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_types.h +0 -264
  139. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad.h +0 -17
  140. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_analytics.h +0 -236
  141. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_component.h +0 -185
  142. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_energy.h +0 -443
  143. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_events.h +0 -76
  144. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_onnx.h +0 -84
  145. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_service.h +0 -167
  146. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_types.h +0 -244
  147. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_voice_agent.h +0 -612
  148. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Info.plist +0 -11
  149. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/Modules/module.modulemap +0 -5
  150. package/ios/Frameworks/RACommons.xcframework/ios-arm64/RACommons.framework/RACommons +0 -0
  151. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/RACommons.h +0 -67
  152. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_analytics_events.h +0 -610
  153. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_api_types.h +0 -335
  154. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_audio_utils.h +0 -88
  155. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_auth_manager.h +0 -252
  156. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_component_types.h +0 -160
  157. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_core.h +0 -331
  158. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_dev_config.h +0 -85
  159. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_device_manager.h +0 -176
  160. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_download.h +0 -418
  161. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_endpoints.h +0 -102
  162. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_environment.h +0 -220
  163. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_error.h +0 -469
  164. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_events.h +0 -177
  165. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_http_client.h +0 -233
  166. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_lifecycle.h +0 -290
  167. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm.h +0 -17
  168. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_analytics.h +0 -188
  169. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_component.h +0 -228
  170. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_events.h +0 -215
  171. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_llamacpp.h +0 -218
  172. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_metrics.h +0 -402
  173. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_platform.h +0 -204
  174. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_service.h +0 -163
  175. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_structured_output.h +0 -141
  176. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_types.h +0 -384
  177. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_logger.h +0 -416
  178. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_assignment.h +0 -169
  179. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_paths.h +0 -258
  180. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_registry.h +0 -357
  181. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_strategy.h +0 -374
  182. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_types.h +0 -613
  183. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_platform_adapter.h +0 -340
  184. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_sdk_state.h +0 -292
  185. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_storage_analyzer.h +0 -286
  186. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_structured_error.h +0 -594
  187. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt.h +0 -17
  188. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_analytics.h +0 -204
  189. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_component.h +0 -162
  190. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_events.h +0 -62
  191. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_onnx.h +0 -99
  192. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_service.h +0 -154
  193. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_types.h +0 -389
  194. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_whispercpp.h +0 -153
  195. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_manager.h +0 -206
  196. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_types.h +0 -234
  197. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts.h +0 -17
  198. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_analytics.h +0 -181
  199. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_component.h +0 -158
  200. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_events.h +0 -54
  201. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_onnx.h +0 -71
  202. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_platform.h +0 -197
  203. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_service.h +0 -162
  204. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_types.h +0 -374
  205. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_types.h +0 -264
  206. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad.h +0 -17
  207. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_analytics.h +0 -236
  208. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_component.h +0 -185
  209. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_energy.h +0 -443
  210. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_events.h +0 -76
  211. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_onnx.h +0 -84
  212. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_service.h +0 -167
  213. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_types.h +0 -244
  214. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_voice_agent.h +0 -612
  215. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Info.plist +0 -11
  216. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Modules/module.modulemap +0 -5
  217. package/ios/Frameworks/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/RACommons +0 -0
@@ -1,612 +0,0 @@
1
- /**
2
- * @file rac_voice_agent.h
3
- * @brief Voice Agent Capability - Full Voice Conversation Pipeline
4
- *
5
- * C port of Swift's VoiceAgentCapability.swift
6
- * Swift Source: Sources/RunAnywhere/Features/VoiceAgent/VoiceAgentCapability.swift
7
- *
8
- * IMPORTANT: This is a direct translation of the Swift implementation.
9
- * Do NOT add features not present in the Swift code.
10
- *
11
- * Composes STT, LLM, TTS, and VAD capabilities for end-to-end voice processing.
12
- */
13
-
14
- #ifndef RAC_VOICE_AGENT_H
15
- #define RAC_VOICE_AGENT_H
16
-
17
- #include <RACommons/rac_error.h>
18
- #include <RACommons/rac_types.h>
19
- #include <RACommons/rac_llm_types.h>
20
- #include <RACommons/rac_stt_types.h>
21
- #include <RACommons/rac_tts_types.h>
22
- #include <RACommons/rac_vad_types.h>
23
-
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif
27
-
28
- // =============================================================================
29
- // CONSTANTS - Voice Agent Timing Defaults
30
- // =============================================================================
31
-
32
- /** Default timeout for waiting for speech input (seconds) */
33
- #define RAC_VOICE_AGENT_DEFAULT_SPEECH_TIMEOUT_SEC 10.0
34
-
35
- /** Default maximum recording duration (seconds) */
36
- #define RAC_VOICE_AGENT_DEFAULT_MAX_RECORDING_DURATION_SEC 30.0
37
-
38
- /** Default pause duration to end recording (seconds) */
39
- #define RAC_VOICE_AGENT_DEFAULT_END_OF_SPEECH_PAUSE_SEC 1.5
40
-
41
- /** Maximum time to wait for LLM response (seconds) */
42
- #define RAC_VOICE_AGENT_LLM_RESPONSE_TIMEOUT_SEC 30.0
43
-
44
- /** Maximum time to wait for TTS synthesis (seconds) */
45
- #define RAC_VOICE_AGENT_TTS_RESPONSE_TIMEOUT_SEC 15.0
46
-
47
- // =============================================================================
48
- // TYPES - Mirrors Swift's VoiceAgentConfiguration and VoiceAgentResult
49
- // =============================================================================
50
-
51
- /**
52
- * @brief Audio pipeline state - Mirrors Swift's AudioPipelineState enum
53
- *
54
- * Represents the current state of the audio pipeline to prevent feedback loops.
55
- * See: Sources/RunAnywhere/Features/VoiceAgent/Models/AudioPipelineState.swift
56
- */
57
- typedef enum rac_audio_pipeline_state {
58
- RAC_AUDIO_PIPELINE_IDLE = 0, /**< System is idle, ready to start listening */
59
- RAC_AUDIO_PIPELINE_LISTENING = 1, /**< Actively listening for speech via VAD */
60
- RAC_AUDIO_PIPELINE_PROCESSING_SPEECH = 2, /**< Processing detected speech with STT */
61
- RAC_AUDIO_PIPELINE_GENERATING_RESPONSE = 3, /**< Generating response with LLM */
62
- RAC_AUDIO_PIPELINE_PLAYING_TTS = 4, /**< Playing TTS output */
63
- RAC_AUDIO_PIPELINE_COOLDOWN = 5, /**< Cooldown period after TTS to prevent feedback */
64
- RAC_AUDIO_PIPELINE_ERROR = 6 /**< Error state requiring reset */
65
- } rac_audio_pipeline_state_t;
66
-
67
- /**
68
- * @brief Get string representation of audio pipeline state
69
- *
70
- * @param state The pipeline state
71
- * @return State name string (static, do not free)
72
- */
73
- RAC_API const char* rac_audio_pipeline_state_name(rac_audio_pipeline_state_t state);
74
-
75
- /**
76
- * @brief Voice agent event types.
77
- * Mirrors Swift's VoiceAgentEvent enum.
78
- */
79
- typedef enum rac_voice_agent_event_type {
80
- RAC_VOICE_AGENT_EVENT_PROCESSED = 0, /**< Complete processing result */
81
- RAC_VOICE_AGENT_EVENT_VAD_TRIGGERED = 1, /**< VAD triggered (speech detected/ended) */
82
- RAC_VOICE_AGENT_EVENT_TRANSCRIPTION = 2, /**< Transcription available from STT */
83
- RAC_VOICE_AGENT_EVENT_RESPONSE = 3, /**< Response generated from LLM */
84
- RAC_VOICE_AGENT_EVENT_AUDIO_SYNTHESIZED = 4, /**< Audio synthesized from TTS */
85
- RAC_VOICE_AGENT_EVENT_ERROR = 5 /**< Error occurred during processing */
86
- } rac_voice_agent_event_type_t;
87
-
88
- /**
89
- * @brief VAD configuration for voice agent.
90
- * Mirrors Swift's VADConfiguration.
91
- */
92
- typedef struct rac_voice_agent_vad_config {
93
- /** Sample rate (default: 16000) */
94
- int32_t sample_rate;
95
-
96
- /** Frame length in seconds (default: 0.1) */
97
- float frame_length;
98
-
99
- /** Energy threshold (default: 0.005) */
100
- float energy_threshold;
101
- } rac_voice_agent_vad_config_t;
102
-
103
- /**
104
- * @brief Default VAD configuration.
105
- */
106
- static const rac_voice_agent_vad_config_t RAC_VOICE_AGENT_VAD_CONFIG_DEFAULT = {
107
- .sample_rate = 16000, .frame_length = 0.1f, .energy_threshold = 0.005f};
108
-
109
- /**
110
- * @brief STT configuration for voice agent.
111
- * Mirrors Swift's STTConfiguration.
112
- */
113
- typedef struct rac_voice_agent_stt_config {
114
- /** Model path - file path used for loading (can be NULL to use already-loaded model) */
115
- const char* model_path;
116
- /** Model ID - identifier for telemetry (e.g., "whisper-base") */
117
- const char* model_id;
118
- /** Model name - human-readable name (e.g., "Whisper Base") */
119
- const char* model_name;
120
- } rac_voice_agent_stt_config_t;
121
-
122
- /**
123
- * @brief LLM configuration for voice agent.
124
- * Mirrors Swift's LLMConfiguration.
125
- */
126
- typedef struct rac_voice_agent_llm_config {
127
- /** Model path - file path used for loading (can be NULL to use already-loaded model) */
128
- const char* model_path;
129
- /** Model ID - identifier for telemetry (e.g., "llama-3.2-1b") */
130
- const char* model_id;
131
- /** Model name - human-readable name (e.g., "Llama 3.2 1B Instruct") */
132
- const char* model_name;
133
- } rac_voice_agent_llm_config_t;
134
-
135
- /**
136
- * @brief TTS configuration for voice agent.
137
- * Mirrors Swift's TTSConfiguration.
138
- */
139
- typedef struct rac_voice_agent_tts_config {
140
- /** Voice path - file path used for loading (can be NULL/empty to use already-loaded voice) */
141
- const char* voice_path;
142
- /** Voice ID - identifier for telemetry (e.g., "vits-piper-en_GB-alba-medium") */
143
- const char* voice_id;
144
- /** Voice name - human-readable name (e.g., "Piper TTS (British English)") */
145
- const char* voice_name;
146
- } rac_voice_agent_tts_config_t;
147
-
148
- /**
149
- * @brief Voice agent configuration.
150
- * Mirrors Swift's VoiceAgentConfiguration.
151
- */
152
- typedef struct rac_voice_agent_config {
153
- /** VAD configuration */
154
- rac_voice_agent_vad_config_t vad_config;
155
-
156
- /** STT configuration */
157
- rac_voice_agent_stt_config_t stt_config;
158
-
159
- /** LLM configuration */
160
- rac_voice_agent_llm_config_t llm_config;
161
-
162
- /** TTS configuration */
163
- rac_voice_agent_tts_config_t tts_config;
164
- } rac_voice_agent_config_t;
165
-
166
- /**
167
- * @brief Default voice agent configuration.
168
- */
169
- static const rac_voice_agent_config_t RAC_VOICE_AGENT_CONFIG_DEFAULT = {
170
- .vad_config = {.sample_rate = 16000, .frame_length = 0.1f, .energy_threshold = 0.005f},
171
- .stt_config = {.model_path = RAC_NULL, .model_id = RAC_NULL, .model_name = RAC_NULL},
172
- .llm_config = {.model_path = RAC_NULL, .model_id = RAC_NULL, .model_name = RAC_NULL},
173
- .tts_config = {.voice_path = RAC_NULL, .voice_id = RAC_NULL, .voice_name = RAC_NULL}};
174
-
175
- // =============================================================================
176
- // AUDIO PIPELINE STATE MANAGER CONFIG - Mirrors Swift's AudioPipelineStateManager.Configuration
177
- // =============================================================================
178
-
179
- /**
180
- * @brief Audio pipeline state manager configuration
181
- *
182
- * Mirrors Swift's AudioPipelineStateManager.Configuration struct.
183
- * See: Sources/RunAnywhere/Features/VoiceAgent/Models/AudioPipelineState.swift
184
- */
185
- typedef struct rac_audio_pipeline_config {
186
- /** Duration to wait after TTS before allowing microphone (seconds) */
187
- float cooldown_duration;
188
-
189
- /** Whether to enforce strict state transitions */
190
- rac_bool_t strict_transitions;
191
-
192
- /** Maximum TTS duration before forced timeout (seconds) */
193
- float max_tts_duration;
194
- } rac_audio_pipeline_config_t;
195
-
196
- /**
197
- * @brief Default audio pipeline configuration
198
- */
199
- static const rac_audio_pipeline_config_t RAC_AUDIO_PIPELINE_CONFIG_DEFAULT = {
200
- .cooldown_duration = 0.8f, /* 800ms - better feedback prevention */
201
- .strict_transitions = RAC_TRUE,
202
- .max_tts_duration = 30.0f};
203
-
204
- // =============================================================================
205
- // AUDIO PIPELINE STATE MANAGER API
206
- // =============================================================================
207
-
208
- /**
209
- * @brief Check if microphone can be activated in current state
210
- *
211
- * @param current_state Current pipeline state
212
- * @param last_tts_end_time_ms Last TTS end time in milliseconds since epoch (0 if none)
213
- * @param cooldown_duration_ms Cooldown duration in milliseconds
214
- * @return RAC_TRUE if microphone can be activated
215
- */
216
- RAC_API rac_bool_t rac_audio_pipeline_can_activate_microphone(
217
- rac_audio_pipeline_state_t current_state, int64_t last_tts_end_time_ms,
218
- int64_t cooldown_duration_ms);
219
-
220
- /**
221
- * @brief Check if TTS can be played in current state
222
- *
223
- * @param current_state Current pipeline state
224
- * @return RAC_TRUE if TTS can be played
225
- */
226
- RAC_API rac_bool_t rac_audio_pipeline_can_play_tts(rac_audio_pipeline_state_t current_state);
227
-
228
- /**
229
- * @brief Check if a state transition is valid
230
- *
231
- * @param from_state Current state
232
- * @param to_state Target state
233
- * @return RAC_TRUE if transition is valid
234
- */
235
- RAC_API rac_bool_t rac_audio_pipeline_is_valid_transition(rac_audio_pipeline_state_t from_state,
236
- rac_audio_pipeline_state_t to_state);
237
-
238
- /**
239
- * @brief Voice agent processing result.
240
- * Mirrors Swift's VoiceAgentResult.
241
- */
242
- typedef struct rac_voice_agent_result {
243
- /** Whether speech was detected in the input audio */
244
- rac_bool_t speech_detected;
245
-
246
- /** Transcribed text from STT (owned, must be freed with rac_free) */
247
- char* transcription;
248
-
249
- /** Generated response text from LLM (owned, must be freed with rac_free) */
250
- char* response;
251
-
252
- /** Synthesized audio data from TTS (owned, must be freed with rac_free) */
253
- void* synthesized_audio;
254
-
255
- /** Size of synthesized audio data in bytes */
256
- size_t synthesized_audio_size;
257
- } rac_voice_agent_result_t;
258
-
259
- /**
260
- * @brief Voice agent event data.
261
- * Contains union for different event types.
262
- */
263
- typedef struct rac_voice_agent_event {
264
- /** Event type */
265
- rac_voice_agent_event_type_t type;
266
-
267
- union {
268
- /** For PROCESSED event */
269
- rac_voice_agent_result_t result;
270
-
271
- /** For VAD_TRIGGERED event: true if speech started, false if ended */
272
- rac_bool_t vad_speech_active;
273
-
274
- /** For TRANSCRIPTION event */
275
- const char* transcription;
276
-
277
- /** For RESPONSE event */
278
- const char* response;
279
-
280
- /** For AUDIO_SYNTHESIZED event */
281
- struct {
282
- const void* audio_data;
283
- size_t audio_size;
284
- } audio;
285
-
286
- /** For ERROR event */
287
- rac_result_t error_code;
288
- } data;
289
- } rac_voice_agent_event_t;
290
-
291
- /**
292
- * @brief Callback for voice agent events during streaming.
293
- *
294
- * @param event The event that occurred
295
- * @param user_data User-provided context
296
- */
297
- typedef void (*rac_voice_agent_event_callback_fn)(const rac_voice_agent_event_t* event,
298
- void* user_data);
299
-
300
- // =============================================================================
301
- // OPAQUE HANDLE
302
- // =============================================================================
303
-
304
- /**
305
- * @brief Opaque handle for voice agent instance.
306
- */
307
- typedef struct rac_voice_agent* rac_voice_agent_handle_t;
308
-
309
- // =============================================================================
310
- // LIFECYCLE API
311
- // =============================================================================
312
-
313
- /**
314
- * @brief Create a standalone voice agent that owns its component handles.
315
- *
316
- * This is the recommended API. The voice agent creates and manages its own
317
- * STT, LLM, TTS, and VAD component handles internally. Use the model loading
318
- * APIs to load models after creation.
319
- *
320
- * @param out_handle Output: Handle to the created voice agent
321
- * @return RAC_SUCCESS or error code
322
- */
323
- RAC_API rac_result_t rac_voice_agent_create_standalone(rac_voice_agent_handle_t* out_handle);
324
-
325
- /**
326
- * @brief Create a voice agent instance with external component handles.
327
- *
328
- * DEPRECATED: Prefer rac_voice_agent_create_standalone().
329
- * This API is for backward compatibility when you need to share handles.
330
- *
331
- * @param llm_component_handle Handle to LLM component (rac_llm_component)
332
- * @param stt_component_handle Handle to STT component (rac_stt_component)
333
- * @param tts_component_handle Handle to TTS component (rac_tts_component)
334
- * @param vad_component_handle Handle to VAD component (rac_vad_component)
335
- * @param out_handle Output: Handle to the created voice agent
336
- * @return RAC_SUCCESS or error code
337
- */
338
- RAC_API rac_result_t rac_voice_agent_create(rac_handle_t llm_component_handle,
339
- rac_handle_t stt_component_handle,
340
- rac_handle_t tts_component_handle,
341
- rac_handle_t vad_component_handle,
342
- rac_voice_agent_handle_t* out_handle);
343
-
344
- /**
345
- * @brief Destroy a voice agent instance.
346
- *
347
- * If created with rac_voice_agent_create_standalone(), this also destroys
348
- * the owned component handles.
349
- *
350
- * @param handle Voice agent handle
351
- */
352
- RAC_API void rac_voice_agent_destroy(rac_voice_agent_handle_t handle);
353
-
354
- // =============================================================================
355
- // MODEL LOADING API (for standalone voice agent)
356
- // =============================================================================
357
-
358
- /**
359
- * @brief Load an STT model into the voice agent.
360
- *
361
- * @param handle Voice agent handle
362
- * @param model_path File path to the model (used for loading)
363
- * @param model_id Model identifier (used for telemetry, e.g., "whisper-base")
364
- * @param model_name Human-readable model name (e.g., "Whisper Base")
365
- * @return RAC_SUCCESS or error code
366
- */
367
- RAC_API rac_result_t rac_voice_agent_load_stt_model(rac_voice_agent_handle_t handle,
368
- const char* model_path, const char* model_id,
369
- const char* model_name);
370
-
371
- /**
372
- * @brief Load an LLM model into the voice agent.
373
- *
374
- * @param handle Voice agent handle
375
- * @param model_path File path to the model (used for loading)
376
- * @param model_id Model identifier (used for telemetry, e.g., "llama-3.2-1b")
377
- * @param model_name Human-readable model name (e.g., "Llama 3.2 1B Instruct")
378
- * @return RAC_SUCCESS or error code
379
- */
380
- RAC_API rac_result_t rac_voice_agent_load_llm_model(rac_voice_agent_handle_t handle,
381
- const char* model_path, const char* model_id,
382
- const char* model_name);
383
-
384
- /**
385
- * @brief Load a TTS voice into the voice agent.
386
- *
387
- * @param handle Voice agent handle
388
- * @param voice_path File path to the voice (used for loading)
389
- * @param voice_id Voice identifier (used for telemetry, e.g., "vits-piper-en_GB-alba-medium")
390
- * @param voice_name Human-readable voice name (e.g., "Piper TTS (British English)")
391
- * @return RAC_SUCCESS or error code
392
- */
393
- RAC_API rac_result_t rac_voice_agent_load_tts_voice(rac_voice_agent_handle_t handle,
394
- const char* voice_path, const char* voice_id,
395
- const char* voice_name);
396
-
397
- /**
398
- * @brief Check if STT model is loaded.
399
- *
400
- * @param handle Voice agent handle
401
- * @param out_loaded Output: RAC_TRUE if loaded
402
- * @return RAC_SUCCESS or error code
403
- */
404
- RAC_API rac_result_t rac_voice_agent_is_stt_loaded(rac_voice_agent_handle_t handle,
405
- rac_bool_t* out_loaded);
406
-
407
- /**
408
- * @brief Check if LLM model is loaded.
409
- *
410
- * @param handle Voice agent handle
411
- * @param out_loaded Output: RAC_TRUE if loaded
412
- * @return RAC_SUCCESS or error code
413
- */
414
- RAC_API rac_result_t rac_voice_agent_is_llm_loaded(rac_voice_agent_handle_t handle,
415
- rac_bool_t* out_loaded);
416
-
417
- /**
418
- * @brief Check if TTS voice is loaded.
419
- *
420
- * @param handle Voice agent handle
421
- * @param out_loaded Output: RAC_TRUE if loaded
422
- * @return RAC_SUCCESS or error code
423
- */
424
- RAC_API rac_result_t rac_voice_agent_is_tts_loaded(rac_voice_agent_handle_t handle,
425
- rac_bool_t* out_loaded);
426
-
427
- /**
428
- * @brief Get the currently loaded STT model ID.
429
- *
430
- * @param handle Voice agent handle
431
- * @return Model ID string (static, do not free) or NULL if not loaded
432
- */
433
- RAC_API const char* rac_voice_agent_get_stt_model_id(rac_voice_agent_handle_t handle);
434
-
435
- /**
436
- * @brief Get the currently loaded LLM model ID.
437
- *
438
- * @param handle Voice agent handle
439
- * @return Model ID string (static, do not free) or NULL if not loaded
440
- */
441
- RAC_API const char* rac_voice_agent_get_llm_model_id(rac_voice_agent_handle_t handle);
442
-
443
- /**
444
- * @brief Get the currently loaded TTS voice ID.
445
- *
446
- * @param handle Voice agent handle
447
- * @return Voice ID string (static, do not free) or NULL if not loaded
448
- */
449
- RAC_API const char* rac_voice_agent_get_tts_voice_id(rac_voice_agent_handle_t handle);
450
-
451
- /**
452
- * @brief Initialize the voice agent with configuration.
453
- *
454
- * Mirrors Swift's VoiceAgentCapability.initialize(_:).
455
- * This method is smart about reusing already-loaded models.
456
- *
457
- * @param handle Voice agent handle
458
- * @param config Configuration (can be NULL for defaults)
459
- * @return RAC_SUCCESS or error code
460
- */
461
- RAC_API rac_result_t rac_voice_agent_initialize(rac_voice_agent_handle_t handle,
462
- const rac_voice_agent_config_t* config);
463
-
464
- /**
465
- * @brief Initialize using already-loaded models.
466
- *
467
- * Mirrors Swift's VoiceAgentCapability.initializeWithLoadedModels().
468
- * Verifies all required components are loaded and marks the voice agent as ready.
469
- *
470
- * @param handle Voice agent handle
471
- * @return RAC_SUCCESS or error code
472
- */
473
- RAC_API rac_result_t rac_voice_agent_initialize_with_loaded_models(rac_voice_agent_handle_t handle);
474
-
475
- /**
476
- * @brief Cleanup voice agent resources.
477
- *
478
- * Mirrors Swift's VoiceAgentCapability.cleanup().
479
- *
480
- * @param handle Voice agent handle
481
- * @return RAC_SUCCESS or error code
482
- */
483
- RAC_API rac_result_t rac_voice_agent_cleanup(rac_voice_agent_handle_t handle);
484
-
485
- /**
486
- * @brief Check if voice agent is ready.
487
- *
488
- * Mirrors Swift's VoiceAgentCapability.isReady property.
489
- *
490
- * @param handle Voice agent handle
491
- * @param out_is_ready Output: RAC_TRUE if ready
492
- * @return RAC_SUCCESS or error code
493
- */
494
- RAC_API rac_result_t rac_voice_agent_is_ready(rac_voice_agent_handle_t handle,
495
- rac_bool_t* out_is_ready);
496
-
497
- // =============================================================================
498
- // VOICE PROCESSING API
499
- // =============================================================================
500
-
501
- /**
502
- * @brief Process a complete voice turn: audio → transcription → LLM response → synthesized speech.
503
- *
504
- * Mirrors Swift's VoiceAgentCapability.processVoiceTurn(_:).
505
- *
506
- * @param handle Voice agent handle
507
- * @param audio_data Audio data from user
508
- * @param audio_size Size of audio data in bytes
509
- * @param out_result Output: Voice agent result (caller owns memory, must free with
510
- * rac_voice_agent_result_free)
511
- * @return RAC_SUCCESS or error code
512
- */
513
- RAC_API rac_result_t rac_voice_agent_process_voice_turn(rac_voice_agent_handle_t handle,
514
- const void* audio_data, size_t audio_size,
515
- rac_voice_agent_result_t* out_result);
516
-
517
- /**
518
- * @brief Process audio with streaming events.
519
- *
520
- * Mirrors Swift's VoiceAgentCapability.processStream(_:).
521
- * Events are delivered via the callback as processing progresses.
522
- *
523
- * @param handle Voice agent handle
524
- * @param audio_data Audio data from user
525
- * @param audio_size Size of audio data in bytes
526
- * @param callback Event callback function
527
- * @param user_data User context passed to callback
528
- * @return RAC_SUCCESS or error code
529
- */
530
- RAC_API rac_result_t rac_voice_agent_process_stream(rac_voice_agent_handle_t handle,
531
- const void* audio_data, size_t audio_size,
532
- rac_voice_agent_event_callback_fn callback,
533
- void* user_data);
534
-
535
- // =============================================================================
536
- // INDIVIDUAL COMPONENT ACCESS API
537
- // =============================================================================
538
-
539
- /**
540
- * @brief Transcribe audio only (without LLM/TTS).
541
- *
542
- * Mirrors Swift's VoiceAgentCapability.transcribe(_:).
543
- *
544
- * @param handle Voice agent handle
545
- * @param audio_data Audio data
546
- * @param audio_size Size of audio data in bytes
547
- * @param out_transcription Output: Transcribed text (owned, must be freed with rac_free)
548
- * @return RAC_SUCCESS or error code
549
- */
550
- RAC_API rac_result_t rac_voice_agent_transcribe(rac_voice_agent_handle_t handle,
551
- const void* audio_data, size_t audio_size,
552
- char** out_transcription);
553
-
554
- /**
555
- * @brief Generate LLM response only.
556
- *
557
- * Mirrors Swift's VoiceAgentCapability.generateResponse(_:).
558
- *
559
- * @param handle Voice agent handle
560
- * @param prompt Input prompt
561
- * @param out_response Output: Generated response (owned, must be freed with rac_free)
562
- * @return RAC_SUCCESS or error code
563
- */
564
- RAC_API rac_result_t rac_voice_agent_generate_response(rac_voice_agent_handle_t handle,
565
- const char* prompt, char** out_response);
566
-
567
- /**
568
- * @brief Synthesize speech only.
569
- *
570
- * Mirrors Swift's VoiceAgentCapability.synthesizeSpeech(_:).
571
- *
572
- * @param handle Voice agent handle
573
- * @param text Text to synthesize
574
- * @param out_audio Output: Synthesized audio data (owned, must be freed with rac_free)
575
- * @param out_audio_size Output: Size of audio data in bytes
576
- * @return RAC_SUCCESS or error code
577
- */
578
- RAC_API rac_result_t rac_voice_agent_synthesize_speech(rac_voice_agent_handle_t handle,
579
- const char* text, void** out_audio,
580
- size_t* out_audio_size);
581
-
582
- /**
583
- * @brief Check if VAD detects speech.
584
- *
585
- * Mirrors Swift's VoiceAgentCapability.detectSpeech(_:).
586
- *
587
- * @param handle Voice agent handle
588
- * @param samples Audio samples (float32)
589
- * @param sample_count Number of samples
590
- * @param out_speech_detected Output: RAC_TRUE if speech detected
591
- * @return RAC_SUCCESS or error code
592
- */
593
- RAC_API rac_result_t rac_voice_agent_detect_speech(rac_voice_agent_handle_t handle,
594
- const float* samples, size_t sample_count,
595
- rac_bool_t* out_speech_detected);
596
-
597
- // =============================================================================
598
- // MEMORY MANAGEMENT
599
- // =============================================================================
600
-
601
- /**
602
- * @brief Free a voice agent result.
603
- *
604
- * @param result Result to free
605
- */
606
- RAC_API void rac_voice_agent_result_free(rac_voice_agent_result_t* result);
607
-
608
- #ifdef __cplusplus
609
- }
610
- #endif
611
-
612
- #endif /* RAC_VOICE_AGENT_H */
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>CFBundleExecutable</key><string>RACommons</string>
6
- <key>CFBundleIdentifier</key><string>ai.runanywhere.RACommons</string>
7
- <key>CFBundlePackageType</key><string>FMWK</string>
8
- <key>CFBundleShortVersionString</key><string>0.1.5</string>
9
- <key>MinimumOSVersion</key><string>13.0</string>
10
- </dict>
11
- </plist>
@@ -1,5 +0,0 @@
1
- framework module RACommons {
2
- umbrella header "RACommons.h"
3
- export *
4
- module * { export * }
5
- }