Browse Source

Merge commit '00ddc7170e3648c9ac88dc1268896168e7a8b11f' into lxm

newdev_shunjiawei
lxm 1 year ago
parent
commit
b466d7ae63
  1. 79
      .gitignore
  2. 7
      android/settings.gradle.kts
  3. 90
      clean_spm.sh
  4. 2
      ios/Flutter/AppFrameworkInfo.plist
  5. 83
      ios/Podfile.lock
  6. 156
      ios/Runner.xcodeproj/project.pbxproj
  7. 2
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  8. 213
      ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved
  9. 25
      ios/Runner/Info.plist
  10. 1
      lib/core/bindings/initial_binding.dart
  11. 3
      lib/data/services/network/nw_api.dart
  12. 7
      lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart
  13. 28
      lib/modules/pairing/controllers/pairing_controller.dart
  14. 2
      local_plugins/agent_service/android/build.gradle.kts
  15. 13
      local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/AgentService.kt
  16. 4
      local_plugins/agent_service/ios/Classes/AgentServicePlugin.h
  17. 12
      local_plugins/agent_service/ios/Classes/AgentServicePlugin.m
  18. 240
      local_plugins/agent_service/ios/Classes/AudioSessionHub.swift
  19. 29
      local_plugins/agent_service/ios/agent_service.podspec
  20. 37
      local_plugins/agent_service/ios/agent_service/Package.swift
  21. 189
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift
  22. 0
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift
  23. 437
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/AudioSessionHub.swift
  24. BIN
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/Resources/calling.mp3
  25. BIN
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/Resources/start.mp3
  26. BIN
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/Resources/stop.mp3
  27. 8
      local_plugins/agent_service/pubspec.yaml
  28. 95
      local_plugins/azure_speech/android/src/main/kotlin/com/yunqiinnovation/azure_speech/AzureAsrHelper.kt
  29. 3
      local_plugins/azure_speech/android/src/main/kotlin/com/yunqiinnovation/azure_speech/AzureTtsHelper.kt
  30. 29
      local_plugins/azure_speech/ios/azure_speech.podspec
  31. 120
      local_plugins/azure_speech/ios/azure_speech/LICENSE.md
  32. 53
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/Info.plist
  33. 201
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioConfiguration.h
  34. 133
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioDataStream.h
  35. 43
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioProcessingOptions.h
  36. 168
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioStream.h
  37. 90
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioStreamFormat.h
  38. 84
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAutoDetectSourceLanguageConfiguration.h
  39. 32
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAutoDetectSourceLanguageResult.h
  40. 201
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnection.h
  41. 17
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnectionEventArgs.h
  42. 51
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnectionMessage.h
  43. 21
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnectionMessageEventArgs.h
  44. 338
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversation.h
  45. 40
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationEventArgs.h
  46. 258
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranscriber.h
  47. 46
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranscriptionEventArgs.h
  48. 20
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranscriptionResult.h
  49. 31
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranslationEventArgs.h
  50. 25
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranslationResult.h
  51. 255
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranslator.h
  52. 320
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConfiguration.h
  53. 592
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConnector.h
  54. 40
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConnectorActivityReceivedEventArgs.h
  55. 39
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConnectorTurnStatusReceivedEventArgs.h
  56. 166
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXEmbeddedSpeechConfiguration.h
  57. 77
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXEventLogger.h
  58. 99
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXFileLogger.h
  59. 9
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXFoundation.h
  60. 17
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXGrammar.h
  61. 23
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXGrammarPhrase.h
  62. 46
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXIntentRecognitionEventArgs.h
  63. 21
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXIntentRecognitionResult.h
  64. 333
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXIntentRecognizer.h
  65. 30
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognitionEventArgs.h
  66. 32
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognitionModel.h
  67. 15
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognitionResult.h
  68. 101
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognizer.h
  69. 44
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXLanguageUnderstandingModel.h
  70. 327
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeeting.h
  71. 153
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeetingTranscriber.h
  72. 45
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeetingTranscriptionEventArgs.h
  73. 25
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeetingTranscriptionResult.h
  74. 127
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMemoryLogger.h
  75. 126
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXParticipant.h
  76. 38
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPhraseListGrammar.h
  77. 192
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPronunciationAssessmentConfiguration.h
  78. 93
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPronunciationAssessmentResult.h
  79. 69
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPropertyCollection.h
  80. 21
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXRecognitionEventArgs.h
  81. 134
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXRecognitionResult.h
  82. 54
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXRecognizer.h
  83. 19
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSessionEventArgs.h
  84. 59
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSourceLanguageConfiguration.h
  85. 71
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechApi.h
  86. 402
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechConfiguration.h
  87. 1320
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechEnums.h
  88. 47
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognitionEventArgs.h
  89. 48
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognitionModelInfo.h
  90. 17
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognitionResult.h
  91. 556
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognizer.h
  92. 71
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesisCancellationDetails.h
  93. 134
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesisEventArgs.h
  94. 44
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesisResult.h
  95. 352
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesizer.h
  96. 256
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechTranslationConfiguration.h
  97. 55
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechTranslationModelInfo.h
  98. 44
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSynthesisVoicesResult.h
  99. 135
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXTimingResult.h
  100. 47
      local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXTranslationRecognitionEventArgs.h

79
.gitignore

@ -142,3 +142,82 @@ linux/flutter/generated_plugins.cmake
windows/flutter/generated_plugin_registrant.cc
windows/flutter/generated_plugin_registrant.h
windows/flutter/generated_plugins.cmake
# ================== Swift Package Manager (SPM) ==================
# SPM build directories
**/.build/
**/build/
.build/
build/
# SPM dependency resolution (controversial - some teams commit this)
Package.resolved
**/Package.resolved
# SPM working directory files
**/.swiftpm/
.swiftpm/
# SPM derived data and cache
**/DerivedData/
DerivedData/
# SPM temporary files
**/.DS_Store
.DS_Store
**/*.xcworkspace/xcuserdata/
**/*.xcodeproj/xcuserdata/
**/*.xcodeproj/project.xcworkspace/xcuserdata/
# SPM Xcode integration
**/*.xcodeproj/project.xcworkspace/
**/*.xcworkspace/
# SPM package pins (legacy)
Package.pins
**/Package.pins
# SPM manifest backup files
Package.swift.orig
**/Package.swift.orig
# ================== Local Plugins SPM Support ==================
# Local plugins build artifacts
local_plugins/**/.build/
local_plugins/**/build/
local_plugins/**/Package.resolved
local_plugins/**/.swiftpm/
local_plugins/**/DerivedData/
# Specifically for the problematic paths we saw
local_plugins/chat_api/ios/chat_api/.build/
local_plugins/chat_api/ios/chat_api/Package.resolved
local_plugins/ble_service/ios/ble_service/.build/
local_plugins/ble_service/ios/ble_service/Package.resolved
# ================== Additional iOS/Xcode Cleanup ==================
# Xcode user-specific files
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
*.xcscmblueprint
*.xccheckout
# Xcode shared user data
xcshareddata/
**/xcshareddata/UserInterfaceState.xcuserstate
# CocoaPods artifacts (if mixed with SPM)
Pods/
**/Pods/
Podfile.lock
**/Podfile.lock
# FastLane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
fastlane/readme.md

7
android/settings.gradle.kts

@ -32,7 +32,6 @@ plugins {
include(":app")
include(":azure_speech")
include(":open_ai_service")
include(":chat_storage")
include(":jieli")
include(":spotify_sdk")
@ -40,13 +39,15 @@ include(":ble_service")
include(":classic_bluetooth")
include(":agent_service")
include(":speech")
include(":open_ai_service")
// 设置azure_speech项目的路径
project(":azure_speech").projectDir = file("../local_plugins/azure_speech/android")
project(":open_ai_service").projectDir = file("../local_plugins/open_ai_service/android")
project(":chat_storage").projectDir = file("../local_plugins/chat_storage/android")
project(":jieli").projectDir = file("../local_plugins/jieli/android")
project(":spotify_sdk").projectDir = file("../local_plugins/spotify_sdk/android")
project(":ble_service").projectDir = file("../local_plugins/ble_service/android")
project(":classic_bluetooth").projectDir = file("../local_plugins/classic_bluetooth/android")
project(":agent_service").projectDir = file("../local_plugins/agent_service/android")
project(":speech").projectDir = file("../local_plugins/speech/android")
project(":speech").projectDir = file("../local_plugins/speech/android")
project(":open_ai_service").projectDir = file("../local_plugins/open_ai_service/android")

90
clean_spm.sh

@ -0,0 +1,90 @@
#!/bin/bash
# 清理Xcode DerivedData
echo "清理Xcode DerivedData..."
rm -rf ~/Library/Developer/Xcode/DerivedData/*
# 清理SPM缓存
echo "清理SPM缓存..."
rm -rf ~/Library/Caches/org.swift.swiftpm/
# 进入项目根目录
cd /Users/wolfplus/Developer/deep_voice
# 清理各个插件的SPM生成目录
echo "开始清理各插件的SPM生成目录..."
# 1. agent_service
echo "清理 agent_service..."
cd local_plugins/agent_service/ios/agent_service
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
# 2. azure_speech
echo "清理 azure_speech..."
cd local_plugins/azure_speech/ios/azure_speech
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
# 3. ble_service
echo "清理 ble_service..."
cd local_plugins/ble_service/ios/ble_service
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
# 4. chat_api
echo "清理 chat_api..."
cd local_plugins/chat_api/ios/chat_api
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
# 5. chat_storage
echo "清理 chat_storage..."
cd local_plugins/chat_storage/ios/chat_storage
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
# 6. open_ai_service
echo "清理 open_ai_service..."
cd local_plugins/open_ai_service/ios/open_ai_service
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
# 7. speech
echo "清理 speech..."
cd local_plugins/speech/ios/speech
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
# 8. test
echo "清理 test..."
cd local_plugins/test/ios/test
rm -rf .build
rm -f Package.resolved
rm -f workspace-state.json
cd ../../../../
echo "所有插件清理完成!"
# 额外清理项目级别的SPM文件
echo "清理项目级别的SPM文件..."
rm -rf ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/
rm -rf ios/Runner.xcworkspace/xcshareddata/swiftpm/
rm -rf macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/
rm -rf macos/Runner.xcworkspace/xcshareddata/swiftpm/
echo "全部清理完成!"

2
ios/Flutter/AppFrameworkInfo.plist

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
<string>18.0</string>
</dict>
</plist>

83
ios/Podfile.lock

@ -1,36 +1,21 @@
PODS:
- agent_service (0.0.1):
- azure_speech
- ble_service
- chat_storage
- Flutter
- open_ai_service
- audio_waveforms (0.0.1):
- Flutter
- azure_speech (0.0.1):
- Flutter
- MicrosoftCognitiveServicesSpeech-iOS (~> 1.37.0)
- speech
- ble_service (0.0.1):
- Flutter
- YbridOpus (~> 0.8)
- chat_storage (0.0.1):
- Flutter
- classic_bluetooth (0.0.1):
- Flutter
- device_info_plus (0.0.1):
- Flutter
- FBAEMKit (17.1.0):
- FBSDKCoreKit_Basics (= 17.1.0)
- FBSDKCoreKit (17.1.0):
- FBAEMKit (= 17.1.0)
- FBSDKCoreKit_Basics (= 17.1.0)
- FBSDKCoreKit_Basics (17.1.0)
- FBSDKLoginKit (17.1.0):
- FBSDKCoreKit (= 17.1.0)
- FBAEMKit (18.0.0):
- FBSDKCoreKit_Basics (= 18.0.0)
- FBSDKCoreKit (18.0.0):
- FBAEMKit (= 18.0.0)
- FBSDKCoreKit_Basics (= 18.0.0)
- FBSDKCoreKit_Basics (18.0.0)
- FBSDKLoginKit (18.0.0):
- FBSDKCoreKit (= 18.0.0)
- Flutter (1.0.0)
- flutter_facebook_auth (7.1.1):
- FBSDKLoginKit (~> 17.1.0)
- flutter_facebook_auth (7.1.2):
- FBSDKLoginKit (~> 18.0.0)
- Flutter
- flutter_image_compress_common (1.0.0):
- Flutter
@ -68,11 +53,8 @@ PODS:
- Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0)
- MicrosoftCognitiveServicesSpeech-iOS (1.37.0)
- music_service (0.0.1):
- Flutter
- open_ai_service (0.0.1):
- Flutter
- permission_handler_apple (9.3.0):
- Flutter
- QCloudCore (6.4.7):
@ -92,22 +74,15 @@ PODS:
- SDWebImageWebPCoder (0.14.6):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.17)
- speech (0.0.1):
- Flutter
- spotify_sdk (0.0.1):
- Flutter
- tencentcloud_cos_sdk_plugin (1.2.3):
- tencentcloud_cos_sdk_plugin (1.2.4):
- Flutter
- QCloudCOSXML (= 6.4.7)
- WechatOpenSDK-XCFramework (2.0.4)
- YbridOpus (0.8.0)
DEPENDENCIES:
- agent_service (from `.symlinks/plugins/agent_service/ios`)
- audio_waveforms (from `.symlinks/plugins/audio_waveforms/ios`)
- azure_speech (from `.symlinks/plugins/azure_speech/ios`)
- ble_service (from `.symlinks/plugins/ble_service/ios`)
- chat_storage (from `.symlinks/plugins/chat_storage/ios`)
- classic_bluetooth (from `.symlinks/plugins/classic_bluetooth/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
@ -120,10 +95,8 @@ DEPENDENCIES:
- haptic_feedback (from `.symlinks/plugins/haptic_feedback/ios`)
- jl_ota (from `.symlinks/plugins/jl_ota/ios`)
- music_service (from `.symlinks/plugins/music_service/ios`)
- open_ai_service (from `.symlinks/plugins/open_ai_service/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- record_darwin (from `.symlinks/plugins/record_darwin/ios`)
- speech (from `.symlinks/plugins/speech/ios`)
- spotify_sdk (from `.symlinks/plugins/spotify_sdk/ios`)
- tencentcloud_cos_sdk_plugin (from `.symlinks/plugins/tencentcloud_cos_sdk_plugin/ios`)
@ -135,26 +108,16 @@ SPEC REPOS:
- FBSDKLoginKit
- libwebp
- Mantle
- MicrosoftCognitiveServicesSpeech-iOS
- QCloudCore
- QCloudCOSXML
- QCloudTrack
- SDWebImage
- SDWebImageWebPCoder
- WechatOpenSDK-XCFramework
- YbridOpus
EXTERNAL SOURCES:
agent_service:
:path: ".symlinks/plugins/agent_service/ios"
audio_waveforms:
:path: ".symlinks/plugins/audio_waveforms/ios"
azure_speech:
:path: ".symlinks/plugins/azure_speech/ios"
ble_service:
:path: ".symlinks/plugins/ble_service/ios"
chat_storage:
:path: ".symlinks/plugins/chat_storage/ios"
classic_bluetooth:
:path: ".symlinks/plugins/classic_bluetooth/ios"
device_info_plus:
@ -179,33 +142,25 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/jl_ota/ios"
music_service:
:path: ".symlinks/plugins/music_service/ios"
open_ai_service:
:path: ".symlinks/plugins/open_ai_service/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
record_darwin:
:path: ".symlinks/plugins/record_darwin/ios"
speech:
:path: ".symlinks/plugins/speech/ios"
spotify_sdk:
:path: ".symlinks/plugins/spotify_sdk/ios"
tencentcloud_cos_sdk_plugin:
:path: ".symlinks/plugins/tencentcloud_cos_sdk_plugin/ios"
SPEC CHECKSUMS:
agent_service: a95166e1939f18436aa2ae6b80c17751a2f69b89
audio_waveforms: a6dde7fe7c0ea05f06ffbdb0f7c1b2b2ba6cedcf
azure_speech: 23c6573d04e7f84a0839e935e527c87b5f78311f
ble_service: 9f394ad44d435010e718bc81de494d9425295a85
chat_storage: 933a96144157a07a2fef7f6acb28c78ff18465d8
classic_bluetooth: c146e1618e867a47fa7ab79a3bf262e7d69d557d
device_info_plus: 71ffc6ab7634ade6267c7a93088ed7e4f74e5896
FBAEMKit: cb719c53575a3be86ea873279f30d6a2c4e15881
FBSDKCoreKit: ecdb980a24633ccb012700299ceb16d0235e14d2
FBSDKCoreKit_Basics: 045101c4a9ef10c845347424d73a29aae02c3e43
FBSDKLoginKit: 69eb59b2f839aba635616df6e422acd0ca88030a
FBAEMKit: e34530df538b8eb8aeb53c35867715ba6c63ef0c
FBSDKCoreKit: d3f479a69127acebb1c6aad91c1a33907bcf6c2f
FBSDKCoreKit_Basics: 017b6dc2a1862024815a8229e75661e627ac1e29
FBSDKLoginKit: 5875762d1fe09ddcb05d03365d4f5dc34413843d
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_facebook_auth: 8a9ad5fbfc25b77e7a53ea8986866950b27edcae
flutter_facebook_auth: d97dc09216aebd99d7ac52360186a630f67bdf18
flutter_image_compress_common: 1697a328fd72bfb335507c6bca1a65fa5ad87df1
flutter_local_notifications: 395056b3175ba4f08480a7c5de30cd36d69827e4
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
@ -215,9 +170,7 @@ SPEC CHECKSUMS:
jl_ota: 5fa90bf47674de0f5bce9af2219e25fa0c1425f5
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
MicrosoftCognitiveServicesSpeech-iOS: 766852ccd56e0c74bafbe9ea7033083c5f748d04
music_service: 85abecc8fa21599a06907ad50d83f48a58e0dc0d
open_ai_service: d78dff9359ee4c04f20d250d655d6ec75b4c5434
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
QCloudCore: 49e7571984a8e5fd8f0fd58c2f3b806255796223
QCloudCOSXML: 7205e76aa9cf613468222615483c9d7c074e4298
@ -225,11 +178,9 @@ SPEC CHECKSUMS:
record_darwin: fb1f375f1d9603714f55b8708a903bbb91ffdb0a
SDWebImage: f84b0feeb08d2d11e6a9b843cb06d75ebf5b8868
SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380
speech: 89e648ea83c83d32b25ad2247fdec80fdddd7fb6
spotify_sdk: a48400bb29f70c4fe251ebfdc9135c37097ac5ca
tencentcloud_cos_sdk_plugin: c3d78b2c3bae42b5a20009dc047f3f1621e6272b
tencentcloud_cos_sdk_plugin: 7bed564dbe72df23e7b5cacb1e51b1a20cb1639c
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
YbridOpus: e9af373b9b38acff3702d9a3bd97cae3c232887c
PODFILE CHECKSUM: c47ae1d38025d25153dc07bcb7a82393e57bb809

156
ios/Runner.xcodeproj/project.pbxproj

@ -13,11 +13,11 @@
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
93D73EC48D95512F5F541AD7 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 162D67C21ED243BA396CEF5C /* Pods_RunnerTests.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
9EB82175436F3A3D593E4423 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9725ECE141452716001447D /* Pods_Runner.framework */; };
DD1E3297BCF7B8F42676149E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41D979DCCB9FC1A2739ED9E2 /* Pods_RunnerTests.framework */; };
CBE786ED7A0DB415954B1BA4 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EFDA2C0DD7A7D82CA03799B2 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -44,20 +44,22 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
0A9A0EEC032E92406E64632E /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
0AD944112DD9DB5C00557D21 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
0AD944132DDA0C0D00557D21 /* AccessorySetupKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AccessorySetupKit.framework; path = System/Library/Frameworks/AccessorySetupKit.framework; sourceTree = SDKROOT; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
162D67C21ED243BA396CEF5C /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
280769B5B4FB941FA7D35C06 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
2C91016A31D6647548E59DC8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
41D979DCCB9FC1A2739ED9E2 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
46859C536D3D0051CC82E6C5 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
4852C04805E85DB32D31EEC2 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
76274BCD123CDD5AF172875F /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
8960B97871604358D5CA1866 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
932005D16734B31A8CB0583F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -65,29 +67,9 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BCF37DA3F60C9FDB47151D46 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
CD9846946CA680DD2E0721FA /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
D2958658C06A5ADF62D6ABA2 /* Runner.entitlements */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
D2A873E56435FC1342AE0A85 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
D7BFB5FE33B0270C30A1DFAA /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
E9725ECE141452716001447D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
0AD9449B2DE6F89600557D21 /* Remove Bitcode from YbridOpus */ = {
isa = PBXFileReference;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Remove Bitcode from YbridOpus";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# 移除YbridOpus框架中的bitcode\necho \"检查并移除YbridOpus框架中的bitcode...\"\n\nFRAMEWORK_PATHS=(\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-arm64_armv7/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-i386_x86_64-simulator/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-arm64_x86_64-maccatalyst/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/macos-arm64_x86_64/YbridOpus.framework/YbridOpus\"\n)\n\nfor framework_path in \"${FRAMEWORK_PATHS[@]}\"; do\n if [ -f \"$framework_path\" ]; then\n if otool -l \"$framework_path\" | grep -q __LLVM; then\n echo \"移除bitcode: $framework_path\"\n # 直接覆盖,不创建备份\n xcrun bitcode_strip -r \"$framework_path\" -o \"$framework_path.tmp\"\n mv \"$framework_path.tmp\" \"$framework_path\"\n fi\n fi\ndone\n\n# 清理任何可能的备份文件\nfind \"${PODS_ROOT}\" -name \"*.backup\" -type f -delete 2>/dev/null || true\nfind \"${BUILT_PRODUCTS_DIR}\" -name \"*.backup\" -type f -delete 2>/dev/null || true\n\necho \"bitcode移除和清理完成!\"";
};
EFDA2C0DD7A7D82CA03799B2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -96,7 +78,7 @@
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
9EB82175436F3A3D593E4423 /* Pods_Runner.framework in Frameworks */,
CBE786ED7A0DB415954B1BA4 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -104,7 +86,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DD1E3297BCF7B8F42676149E /* Pods_RunnerTests.framework in Frameworks */,
93D73EC48D95512F5F541AD7 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -114,12 +96,12 @@
1ACB686EC7DC36C6E33D372F /* Pods */ = {
isa = PBXGroup;
children = (
D2A873E56435FC1342AE0A85 /* Pods-Runner.debug.xcconfig */,
932005D16734B31A8CB0583F /* Pods-Runner.release.xcconfig */,
BCF37DA3F60C9FDB47151D46 /* Pods-Runner.profile.xcconfig */,
0A9A0EEC032E92406E64632E /* Pods-RunnerTests.debug.xcconfig */,
8960B97871604358D5CA1866 /* Pods-RunnerTests.release.xcconfig */,
D7BFB5FE33B0270C30A1DFAA /* Pods-RunnerTests.profile.xcconfig */,
CD9846946CA680DD2E0721FA /* Pods-Runner.debug.xcconfig */,
4852C04805E85DB32D31EEC2 /* Pods-Runner.release.xcconfig */,
280769B5B4FB941FA7D35C06 /* Pods-Runner.profile.xcconfig */,
46859C536D3D0051CC82E6C5 /* Pods-RunnerTests.debug.xcconfig */,
76274BCD123CDD5AF172875F /* Pods-RunnerTests.release.xcconfig */,
2C91016A31D6647548E59DC8 /* Pods-RunnerTests.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@ -128,8 +110,8 @@
isa = PBXGroup;
children = (
0AD944132DDA0C0D00557D21 /* AccessorySetupKit.framework */,
E9725ECE141452716001447D /* Pods_Runner.framework */,
41D979DCCB9FC1A2739ED9E2 /* Pods_RunnerTests.framework */,
EFDA2C0DD7A7D82CA03799B2 /* Pods_Runner.framework */,
162D67C21ED243BA396CEF5C /* Pods_RunnerTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -198,7 +180,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
BF953267BBF1D433B6E02C09 /* [CP] Check Pods Manifest.lock */,
C9BCBB2ED2D63153791BA331 /* [CP] Check Pods Manifest.lock */,
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
B3515CD9628E3332AFC88CD4 /* Frameworks */,
@ -217,7 +199,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
99B1E635188BC8E58C3A1B67 /* [CP] Check Pods Manifest.lock */,
C8A928FCC4E7B91E60992CB3 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
@ -225,8 +207,8 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
0AD9449B2DE6F89600557D21 /* Remove Bitcode from YbridOpus */,
CC018A1832E51ED5B994765E /* [CP] Embed Pods Frameworks */,
A196696487421EBA40281C38 /* [CP] Copy Pods Resources */,
7983395BAD15A5F148B66817 /* [CP] Embed Pods Frameworks */,
2F4CC5CCDA87D20DF15BA3FF /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -270,7 +252,7 @@
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
@ -305,95 +287,90 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
0AD9449B2DE6F89600557D21 /* Remove Bitcode from YbridOpus */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
name = "Remove Bitcode from YbridOpus";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
shellScript = "# 移除YbridOpus框架中的bitcode\necho \"检查并移除YbridOpus框架中的bitcode...\"\n\nFRAMEWORK_PATHS=(\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-arm64_armv7/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-i386_x86_64-simulator/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-arm64_x86_64-maccatalyst/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/macos-arm64_x86_64/YbridOpus.framework/YbridOpus\"\n)\n\nfor framework_path in \"${FRAMEWORK_PATHS[@]}\"; do\n if [ -f \"$framework_path\" ]; then\n if otool -l \"$framework_path\" | grep -q __LLVM; then\n echo \"移除bitcode: $framework_path\"\n # 直接覆盖,不创建备份\n xcrun bitcode_strip -r \"$framework_path\" -o \"$framework_path.tmp\"\n mv \"$framework_path.tmp\" \"$framework_path\"\n fi\n fi\ndone\n\n# 清理任何可能的备份文件\nfind \"${PODS_ROOT}\" -name \"*.backup\" -type f -delete 2>/dev/null || true\nfind \"${BUILT_PRODUCTS_DIR}\" -name \"*.backup\" -type f -delete 2>/dev/null || true\n\necho \"bitcode移除和清理完成!\"";
};
0AD9449B2DE6F89600557D21 /* Remove Bitcode from YbridOpus */ = {
2F4CC5CCDA87D20DF15BA3FF /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "Remove Bitcode from YbridOpus";
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
);
outputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# 移除YbridOpus框架中的bitcode\necho \"检查并移除YbridOpus框架中的bitcode...\"\n\nFRAMEWORK_PATHS=(\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-arm64_armv7/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-i386_x86_64-simulator/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/ios-arm64_x86_64-maccatalyst/YbridOpus.framework/YbridOpus\"\n \"${PODS_ROOT}/YbridOpus/YbridOpus.xcframework/macos-arm64_x86_64/YbridOpus.framework/YbridOpus\"\n)\n\nfor framework_path in \"${FRAMEWORK_PATHS[@]}\"; do\n if [ -f \"$framework_path\" ]; then\n if otool -l \"$framework_path\" | grep -q __LLVM; then\n echo \"移除bitcode: $framework_path\"\n # 直接覆盖,不创建备份\n xcrun bitcode_strip -r \"$framework_path\" -o \"$framework_path.tmp\"\n mv \"$framework_path.tmp\" \"$framework_path\"\n fi\n fi\ndone\n\n# 清理任何可能的备份文件\nfind \"${PODS_ROOT}\" -name \"*.backup\" -type f -delete 2>/dev/null || true\nfind \"${BUILT_PRODUCTS_DIR}\" -name \"*.backup\" -type f -delete 2>/dev/null || true\n\necho \"bitcode移除和清理完成!\"";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Run Script";
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
99B1E635188BC8E58C3A1B67 /* [CP] Check Pods Manifest.lock */ = {
7983395BAD15A5F148B66817 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
A196696487421EBA40281C38 /* [CP] Copy Pods Resources */ = {
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
BF953267BBF1D433B6E02C09 /* [CP] Check Pods Manifest.lock */ = {
C8A928FCC4E7B91E60992CB3 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -408,28 +385,33 @@
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
CC018A1832E51ED5B994765E /* [CP] Embed Pods Frameworks */ = {
C9BCBB2ED2D63153791BA331 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
@ -561,7 +543,7 @@
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 0A9A0EEC032E92406E64632E /* Pods-RunnerTests.debug.xcconfig */;
baseConfigurationReference = 46859C536D3D0051CC82E6C5 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@ -580,7 +562,7 @@
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8960B97871604358D5CA1866 /* Pods-RunnerTests.release.xcconfig */;
baseConfigurationReference = 76274BCD123CDD5AF172875F /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@ -597,7 +579,7 @@
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D7BFB5FE33B0270C30A1DFAA /* Pods-RunnerTests.profile.xcconfig */;
baseConfigurationReference = 2C91016A31D6647548E59DC8 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@ -810,7 +792,7 @@
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};

2
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@ -44,6 +44,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
@ -72,6 +73,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

213
ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved

@ -1,213 +0,0 @@
{
"originHash" : "fb7ecff82f4ff109531189491cc6cc2299a7357c61874f58bae1e0f7b7d9e8d0",
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bbe8b69694d7873315fd3a4ad41efe043e1c07c5",
"version" : "1.2024072200.0"
}
},
{
"identity" : "app-check",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/app-check.git",
"state" : {
"revision" : "61b85103a1aeed8218f17c794687781505fbbef5",
"version" : "11.2.0"
}
},
{
"identity" : "appauth-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/openid/AppAuth-iOS.git",
"state" : {
"revision" : "2781038865a80e2c425a1da12cc1327bcd56501f",
"version" : "1.7.6"
}
},
{
"identity" : "dkcamera",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKCamera",
"state" : {
"branch" : "master",
"revision" : "5c691d11014b910aff69f960475d70e65d9dcc96"
}
},
{
"identity" : "dkimagepickercontroller",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKImagePickerController",
"state" : {
"branch" : "4.3.9",
"revision" : "0bdfeacefa308545adde07bef86e349186335915"
}
},
{
"identity" : "dkphotogallery",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKPhotoGallery",
"state" : {
"branch" : "master",
"revision" : "311c1bc7a94f1538f82773a79c84374b12a2ef3d"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
"revision" : "3663b1aa6c7a1bed67ee80fd09dc6d0f9c3bb660",
"version" : "11.13.0"
}
},
{
"identity" : "flutterfire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/flutterfire",
"state" : {
"revision" : "a80a123386fd4904cad6938673020a7bcf31b2f2",
"version" : "3.13.0-firebase-core-swift"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "543071966b3fb6613a2fc5c6e7112d1e998184a7",
"version" : "11.13.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "617af071af9aa1d6a091d59a202910ac482128f9",
"version" : "10.1.0"
}
},
{
"identity" : "googlesignin-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleSignIn-iOS.git",
"state" : {
"revision" : "a7965d134c5d3567026c523e0a8a583f73b62b0d",
"version" : "7.1.0"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "60da361632d0de02786f709bdc0c4df340f7613e",
"version" : "8.1.0"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "cc0001a0cf963aa40501d9c2b181e7fc9fd8ec71",
"version" : "1.69.0"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b",
"version" : "3.5.0"
}
},
{
"identity" : "gtmappauth",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GTMAppAuth.git",
"state" : {
"revision" : "5d7d66f647400952b1758b230e019b07c0b4b22a",
"version" : "4.1.1"
}
},
{
"identity" : "interop-ios-for-google-sdks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/interop-ios-for-google-sdks.git",
"state" : {
"revision" : "040d087ac2267d2ddd4cca36c757d1c6a05fdbfe",
"version" : "101.0.0"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
"version" : "1.22.5"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
"version" : "2.30910.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
"version" : "2.4.0"
}
},
{
"identity" : "sdwebimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage",
"state" : {
"revision" : "cac9a55a3ae92478a2c95042dcc8d9695d2129ca",
"version" : "5.21.0"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "d72aed98f8253ec1aa9ea1141e28150f408cf17f",
"version" : "1.29.0"
}
},
{
"identity" : "swiftygif",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kirualex/SwiftyGif.git",
"state" : {
"revision" : "4430cbc148baa3907651d40562d96325426f409a",
"version" : "5.4.5"
}
},
{
"identity" : "tocropviewcontroller",
"kind" : "remoteSourceControl",
"location" : "https://github.com/TimOliver/TOCropViewController",
"state" : {
"revision" : "a634cb7cdfd580006e79a6e74e64417fe9e9783b",
"version" : "2.7.4"
}
}
],
"version" : 3
}

25
ios/Runner/Info.plist

@ -42,11 +42,11 @@
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<true/>
<false/>
<key>FacebookAppID</key>
<string>3829022037361855</string>
<key>FacebookAutoLogAppEventsEnabled</key>
<true/>
<false/>
<key>FacebookClientToken</key>
<string>193d0a2b1757c41cfa557ea8e8f21c33</string>
<key>LSApplicationQueriesSchemes</key>
@ -96,6 +96,27 @@
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>mcp.ideapsound.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>mcp.amap.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>需要蓝牙权限用于连接和管理音频设备</string>

1
lib/core/bindings/initial_binding.dart

@ -8,7 +8,6 @@ import '../../data/services/language_manager.dart';
import '../../core/utils/logger.dart';
import '../../data/services/bluetooth_manager.dart';
import '../../data/services/ble_manager.dart';
import 'package:agent_service/agent_service.dart';
/// 初始绑定,用于管理全局依赖
class InitialBinding extends Bindings {

3
lib/data/services/network/nw_api.dart

@ -1,6 +1,5 @@
class NWApi {
// static const baseApi = "https://www.deapsound.com";
//测试服务器链接地址,经常修改变动,开发使用
static const baseApi = "https://api.deapsound.com";
// static const baseApi = "https://api.ideapsound.com";
//static const baseApi = "https://api.ideapsound.com";
}

7
lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart

@ -8,6 +8,7 @@ import 'dart:io';
import 'package:dio/dio.dart';
import 'package:path_provider/path_provider.dart';
import 'package:jl_ota/jl_ota.dart';
import 'package:ota/ota.dart';
import '../../../data/services/ble_manager.dart';
class OtaUpgradeController extends GetxController {
@ -22,7 +23,7 @@ class OtaUpgradeController extends GetxController {
final isUpdateAvailable = true.obs;
final RxDouble progress = 0.0.obs;
final JlOta jla = JlOta();
var jlota = Ota();
// 蓝牙服务
final _bleManager = Get.find<BleManager>();
@override
@ -54,6 +55,7 @@ class OtaUpgradeController extends GetxController {
Future<void> _getCurrentVersion() async {
try {
jlota.getPlatformVersion();
// 添加获取设备信息的重试机制
DeviceInfo? deviceInfo = _bleManager.deviceInfo.value;
@ -292,7 +294,8 @@ class OtaUpgradeController extends GetxController {
// 开始升级
void _installApp(String path) async {
jla.getPlatformVersion();
jlota.searchDevices();
jlota.startUpgrade();
// JlOtaPlugin()
// final File file = File(path);
// if (await file.exists()) {

28
lib/modules/pairing/controllers/pairing_controller.dart

@ -342,7 +342,7 @@ class PairingController extends GetxController {
}
// 设置配对超时保护
_stateTimer = Timer(const Duration(seconds: 10), () {
_stateTimer = Timer(const Duration(seconds: 30), () {
if (state == PairingState.pairing) {
Logger.e(_tag, 'BLE配对超时');
_transition(PairingState.exitTimeout);
@ -358,7 +358,22 @@ class PairingController extends GetxController {
);
if (success) {
Logger.i(_tag, 'BLE配对启动成功,等待连接完成...');
Logger.i(_tag, 'BLE配对启动成功,立即注册后台扫描');
// 配对启动成功后立即注册后台扫描
try {
// Android平台注册后台扫描
if (Platform.isAndroid) {
await BleManager.to.registerBackgroundScan(
macAddress: _currentClassicDevice!.address);
Logger.i(_tag, '已注册后台扫描');
}
} catch (e) {
Logger.e(_tag, '注册后台扫描失败: $e');
// 注册失败不影响配对流程继续
}
Logger.i(_tag, '等待BLE连接完成...');
// 配对结果将通过BLE状态监听回调处理
} else {
Logger.e(_tag, 'BLE配对启动失败');
@ -427,15 +442,6 @@ class PairingController extends GetxController {
statusDescription.value = '配对成功!';
try {
if (_currentClassicDevice != null) {
// Android平台注册后台扫描
if (Platform.isAndroid) {
await BleManager.to.registerBackgroundScan(
macAddress: _currentClassicDevice!.address);
Logger.i(_tag, '已注册后台扫描');
}
}
// 启动BLE后台服务
await BleManager.to.startAgentService();
Logger.i(_tag, 'BLE后台服务已启动');

2
local_plugins/agent_service/android/build.gradle.kts

@ -43,10 +43,10 @@ dependencies {
implementation("androidx.security:security-crypto:1.1.0-alpha03")
// 依赖本地其他插件
add("compileOnly", project(":azure_speech"))
add("compileOnly", project(":open_ai_service"))
add("compileOnly", project(":chat_storage"))
add("compileOnly", project(":ble_service"))
add("compileOnly", project(":music_service"))
add("compileOnly", project(":amap_service"))
add("compileOnly", project(":speech"))
add("compileOnly", project(":open_ai_service"))
}

13
local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/AgentService.kt

@ -53,7 +53,7 @@ object AgentService : CoroutineScope {
// 使用AzureTtsHelper作为唯一的TTS实现
private var ttsService: AzureTtsHelper? = null
// OpenAI服务
// OpenAI服务 - 修改为使用OpenAIService
private lateinit var openAIService: OpenAIService
// 聊天存储服务
@ -181,6 +181,11 @@ object AgentService : CoroutineScope {
azureAsrHelper?.dispose()
// 释放OpenAI服务
if (::openAIService.isInitialized) {
openAIService.cancelAll()
}
// 释放TTS服务
ttsService?.release()
ttsService = null
@ -630,7 +635,7 @@ object AgentService : CoroutineScope {
// 先添加系统提示词
if (systemPrompt.isNotEmpty()) {
messagesWithSystemPrompt.put(openAIService.createSystemMessage(systemPrompt))
Log.d(TAG, "系统提示词: ${systemPrompt}")
// Log.d(TAG, "系统提示词: ${systemPrompt}")
}
// 再添加历史消息
@ -668,8 +673,8 @@ object AgentService : CoroutineScope {
}
openAIService.sendMessageStream(
messages = messagesWithSystemPrompt,
callback = object : OpenAIService.StreamCallback {
messagesWithSystemPrompt,
object : OpenAIService.StreamCallback {
override fun onToken(token: String) {
responseBuilder.append(token)
if (speakResponse && !nobroadcast) {

4
local_plugins/agent_service/ios/Classes/AgentServicePlugin.h

@ -1,4 +0,0 @@
#import <Flutter/Flutter.h>
@interface AgentServicePlugin : NSObject<FlutterPlugin>
@end

12
local_plugins/agent_service/ios/Classes/AgentServicePlugin.m

@ -1,12 +0,0 @@
#import "AgentServicePlugin.h"
#if __has_include(<agent_service/agent_service-Swift.h>)
#import <agent_service/agent_service-Swift.h>
#else
#import "agent_service-Swift.h"
#endif
@implementation AgentServicePlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
[AgentServicePlugin registerWithRegistrar:registrar];
}
@end

240
local_plugins/agent_service/ios/Classes/AudioSessionHub.swift

@ -1,240 +0,0 @@
import AVFoundation
import os.log
public enum AudioIntent {
case voice
case playback
}
public class AudioSessionHub {
public static let shared = AudioSessionHub()
private let logger = OSLog(subsystem: "com.yunqiinnovation.agent_service", category: "AudioSessionHub")
private var currentIntent: AudioIntent?
private let audioSession = AVAudioSession.sharedInstance()
private var isInterrupted = false
private init() {
setupNotifications()
}
public func begin(_ intent: AudioIntent) {
if intent == currentIntent && audioSession.isOtherAudioPlaying == false {
return
}
currentIntent = intent
do {
switch intent {
case .voice:
try audioSession.setCategory(.playAndRecord,
mode: .voiceChat,
options: [.allowBluetooth, .mixWithOthers])
// 如果有蓝牙HFP设备,强制设置为首选输入
if let bluetoothInput = audioSession.availableInputs?.first(where: { $0.portType == .bluetoothHFP }) {
try audioSession.setPreferredInput(bluetoothInput)
os_log("已设置蓝牙HFP为首选输入: %{public}@", log: logger, type: .info, bluetoothInput.portName)
}
case .playback:
try audioSession.setCategory(.playback,
mode: .default,
options: [.allowBluetooth, .mixWithOthers])
}
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
os_log("音频会话已设置为:%{public}@", log: logger, type: .debug, String(describing: intent))
// 输出当前音频路由信息
let hasBluetoothDevice = hasBluetoothAudioDevice()
let hasBluetoothMic = hasBluetoothMicrophone()
let currentInput = getCurrentInputDevice()
os_log("蓝牙音频设备状态: %{public}@", log: logger, type: .info, hasBluetoothDevice ? "已连接" : "未连接")
os_log("蓝牙麦克风状态: %{public}@", log: logger, type: .info, hasBluetoothMic ? "已连接" : "未连接")
os_log("当前输入设备: %{public}@", log: logger, type: .info, currentInput)
if hasBluetoothDevice {
os_log("%{public}@", log: logger, type: .debug, getCurrentAudioRoute())
}
} catch {
os_log("设置音频会话失败:%{public}@", log: logger, type: .error, error.localizedDescription)
}
}
public func appWillEnterForeground() {
if let intent = currentIntent {
begin(intent)
}
}
public func appDidEnterBackground() {
do {
try audioSession.setActive(false, options: .notifyOthersOnDeactivation)
os_log("音频会话已释放(应用进入后台)", log: logger, type: .debug)
} catch {
os_log("释放音频会话失败:%{public}@", log: logger, type: .error, error.localizedDescription)
}
}
/// 获取当前音频路由信息
public func getCurrentAudioRoute() -> String {
let currentRoute = audioSession.currentRoute
var routeInfo = "当前音频路由:\n"
// 输出设备
routeInfo += "输出设备:\n"
for output in currentRoute.outputs {
routeInfo += " - \(output.portName) (\(output.portType.rawValue))\n"
}
// 输入设备
routeInfo += "输入设备:\n"
for input in currentRoute.inputs {
routeInfo += " - \(input.portName) (\(input.portType.rawValue))\n"
}
return routeInfo
}
/// 检查是否有蓝牙音频设备连接
public func hasBluetoothAudioDevice() -> Bool {
let currentRoute = audioSession.currentRoute
// 检查输出设备
for output in currentRoute.outputs {
if output.portType == .bluetoothA2DP ||
output.portType == .bluetoothHFP ||
output.portType == .bluetoothLE {
return true
}
}
// 检查输入设备(这是关键!)
for input in currentRoute.inputs {
if input.portType == .bluetoothHFP {
return true
}
}
return false
}
/// 检查是否有蓝牙麦克风作为输入设备
public func hasBluetoothMicrophone() -> Bool {
let currentRoute = audioSession.currentRoute
for input in currentRoute.inputs {
if input.portType == .bluetoothHFP {
return true
}
}
return false
}
/// 获取当前输入设备信息
public func getCurrentInputDevice() -> String {
let currentRoute = audioSession.currentRoute
if let input = currentRoute.inputs.first {
return "\(input.portName) (\(input.portType.rawValue))"
}
return "无输入设备"
}
private func setupNotifications() {
NotificationCenter.default.addObserver(
self,
selector: #selector(handleAudioSessionInterruption),
name: AVAudioSession.interruptionNotification,
object: nil
)
NotificationCenter.default.addObserver(
self,
selector: #selector(handleAudioRouteChange),
name: AVAudioSession.routeChangeNotification,
object: nil
)
}
/// 处理音频中断
@objc private func handleAudioSessionInterruption(notification: Notification) {
guard let userInfo = notification.userInfo,
let typeValue = userInfo[AVAudioSessionInterruptionTypeKey] as? UInt,
let type = AVAudioSession.InterruptionType(rawValue: typeValue) else {
return
}
switch type {
case .began:
// 中断开始
isInterrupted = true
os_log("音频会话被中断", log: logger, type: .debug)
case .ended:
// 中断结束
isInterrupted = false
// 检查是否应该恢复
if let optionsValue = userInfo[AVAudioSessionInterruptionOptionKey] as? UInt {
let options = AVAudioSession.InterruptionOptions(rawValue: optionsValue)
if options.contains(.shouldResume), let intent = currentIntent {
// 恢复之前的音频意图
begin(intent)
os_log("音频会话中断结束,已恢复", log: logger, type: .debug)
}
}
@unknown default:
os_log("未知的音频中断类型: %{public}@", log: logger, type: .error, "\(type)")
}
}
/// 处理音频路由变化
@objc private func handleAudioRouteChange(notification: Notification) {
guard let userInfo = notification.userInfo,
let reasonValue = userInfo[AVAudioSessionRouteChangeReasonKey] as? UInt,
let reason = AVAudioSession.RouteChangeReason(rawValue: reasonValue) else {
return
}
switch reason {
case .newDeviceAvailable:
os_log("新音频设备已连接", log: logger, type: .info)
os_log("%{public}@", log: logger, type: .debug, getCurrentAudioRoute())
// 重新应用当前意图以确保正确路由
if let intent = currentIntent {
begin(intent)
}
case .oldDeviceUnavailable:
os_log("音频设备已断开", log: logger, type: .info)
os_log("%{public}@", log: logger, type: .debug, getCurrentAudioRoute())
// 重新应用当前意图以确保正确路由
if let intent = currentIntent {
begin(intent)
}
case .categoryChange:
os_log("音频类别已变化", log: logger, type: .info)
default:
break
}
}
deinit {
NotificationCenter.default.removeObserver(self)
}
}

29
local_plugins/agent_service/ios/agent_service.podspec

@ -1,29 +0,0 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint agent_service.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'agent_service'
s.version = '0.0.1'
s.summary = '智能助手代理服务'
s.description = <<-DESC
智能助手代理服务,提供语音识别、语音合成和OpenAI对话功能
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*.swift'
s.resources = ['Resources/*.mp3']
s.dependency 'Flutter'
s.dependency 'azure_speech'
s.dependency 'ble_service'
s.dependency 'open_ai_service'
s.dependency 'chat_storage'
s.platform = :ios, '13.0'
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.swift_version = '5.0'
end

37
local_plugins/agent_service/ios/agent_service/Package.swift

@ -0,0 +1,37 @@
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "agent_service",
platforms: [.iOS("18.0")],
products: [
.library(name: "agent-service", targets: ["agent_service"])
],
dependencies: [
.package(path: "../../../test/ios/test"),
.package(path: "../../../ble_service/ios/ble_service"),
.package(path: "../../../speech/ios/speech"),
.package(path: "../../../azure_speech/ios/azure_speech"),
.package(path: "../../../chat_api/ios/chat_api"),
.package(path: "../../../chat_storage/ios/chat_storage")
],
targets: [
.target(
name: "agent_service",
dependencies: [
.product(name: "test", package: "test"),
.product(name: "ble-service", package: "ble_service"),
.product(name: "speech", package: "speech"),
.product(name: "azure-speech", package: "azure_speech"),
.product(name: "chat-api", package: "chat_api"),
.product(name: "chat-storage", package: "chat_storage")
],
path: "Sources/agent_service",
resources: [
.copy("Resources/calling.mp3"),
.copy("Resources/start.mp3"),
.copy("Resources/stop.mp3")
]
)
]
)

189
local_plugins/agent_service/ios/Classes/AgentServiceImpl.swift → local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift

@ -5,8 +5,7 @@ import speech
import azure_speech
import os
import os.log
import agent_service
import open_ai_service
import chat_api
import chat_storage
protocol AgentServiceListener: AnyObject {
@ -29,7 +28,7 @@ class AgentServiceImpl: NSObject {
private var azureAsrHelper: AzureAsrHelper?
internal var azureTtsHelper: AzureTtsHelper?
private var openAIService: OpenAIService?
private var chatApiService: ChatApiService?
private var apiKey: String = ""
private var baseUrl: String = "https://api.openai.com/v1/chat/completions"
private var model: String = "gpt-3.5-turbo"
@ -66,7 +65,7 @@ class AgentServiceImpl: NSObject {
azureAsrHelper = AzureAsrHelper()
azureTtsHelper = AzureTtsHelper()
openAIService = OpenAIService()
chatApiService = ChatApiService()
// chatStorageHelper 现在是单例,不需要初始化
@ -165,10 +164,18 @@ class AgentServiceImpl: NSObject {
if let mcpServer = config["mcpServer"] as? String {
self.mcpServer = mcpServer
}
// self.mcpServer = """
// {
// "mcpServers": {
// "amap-map-sse": {
// "url": "https://mcp.amap.com/sse?key=df7b0b6747c632fc38ddad22e7176646"
// }
// }
// }
// """
let asrInitSuccess = initializeAzureSpeech()
let openaiInitSuccess = initializeOpenAIService()
let openaiInitSuccess = initializeChatApiService()
isInitialized = asrInitSuccess && openaiInitSuccess
@ -207,24 +214,34 @@ class AgentServiceImpl: NSObject {
return true
}
private func initializeOpenAIService() -> Bool {
guard let openAIService = openAIService else {
sendError("OpenAI服务未创建", code: "OPENAI_INIT_ERROR")
private func initializeChatApiService() -> Bool {
os_log("开始初始化ChatAPI服务", log: logger, type: .info)
guard let chatApiService = chatApiService else {
os_log("ChatAPI服务未创建", log: logger, type: .error)
sendError("ChatAPI服务未创建", code: "CHATAPI_INIT_ERROR")
return false
}
let success = openAIService.initialize(
os_log("ChatAPI初始化参数: apiKey=%{public}@, baseUrl=%{public}@, model=%{public}@, mcpServer=%{public}@",
log: logger, type: .info,
apiKey.isEmpty ? "空" : "已设置", baseUrl, model, mcpServer)
let success = chatApiService.initialize(
apiKey: apiKey,
baseUrl: baseUrl,
model: model,
mcpServer: mcpServer
)
os_log("ChatAPI服务初始化结果: %{public}@", log: logger, type: .info, success ? "成功" : "失败")
if !success {
sendError("初始化OpenAI服务失败", code: "OPENAI_INIT_ERROR")
sendError("初始化ChatAPI服务失败", code: "CHATAPI_INIT_ERROR")
return false
}
return true
}
@ -234,9 +251,11 @@ class AgentServiceImpl: NSObject {
guard isRecognizing else { return }
// 使用全局队列而不是主队列,避免后台挂起问题
idleTimer = DispatchSource.makeTimerSource(queue: DispatchQueue.global(qos: .utility))
idleTimer?.schedule(deadline: .now() + maxIdleSeconds)
idleTimer?.setEventHandler { [weak self] in
let timer = DispatchSource.makeTimerSource(queue: DispatchQueue.global(qos: .utility))
idleTimer = timer
timer.schedule(deadline: .now() + maxIdleSeconds)
timer.setEventHandler { [weak self] in
// 使用更安全的方式检查self是否存在
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
@ -250,14 +269,12 @@ class AgentServiceImpl: NSObject {
}
}
}
idleTimer?.resume()
timer.resume()
}
private func stopIdleCheck() {
if let timer = idleTimer {
timer.cancel()
idleTimer = nil
}
idleTimer?.cancel()
idleTimer = nil
}
private func restartIdleCheck() {
@ -361,7 +378,7 @@ class AgentServiceImpl: NSObject {
if isAiStreaming {
isAiStreaming = false
_ = openAIService?.cancelCurrentStream()
_ = chatApiService?.cancelCurrentStream()
interrupted = true
}
@ -373,62 +390,79 @@ class AgentServiceImpl: NSObject {
}
func processTextInput(_ text: String, speakResponse: Bool) -> Bool {
os_log("收到文本输入: text=%{public}@, speakResponse=%{public}@", log: logger, type: .info, text, speakResponse ? "是" : "否")
if !isInitialized {
os_log("服务未初始化,无法处理文本输入", log: logger, type: .error)
sendError("服务未初始化", code: "NOT_INITIALIZED")
return false
}
if text.isEmpty {
os_log("文本输入为空", log: logger, type: .error)
sendError("文本输入不能为空", code: "EMPTY_TEXT")
return false
}
processWithOpenAI(text: text, speakResponse: speakResponse)
os_log("开始处理文本输入", log: logger, type: .info)
processWithChatApiService(text: text, speakResponse: speakResponse)
return true
}
private func processWithOpenAI(text: String, speakResponse: Bool = true) {
guard let openAIService = openAIService else {
sendError("OpenAI服务未初始化", code: "OPENAI_NOT_INITIALIZED")
private func processWithChatApiService(text: String, speakResponse: Bool = true) {
guard let chatApiService = chatApiService else {
sendError("ChatAPI服务未初始化", code: "CHATAPI_NOT_INITIALIZED")
return
}
let userMessage = openAIService.createUserMessage(content: text)
processWithOpenAIInternal(userMessage: userMessage, displayText: text, speakResponse: speakResponse)
let userMessage = chatApiService.createUserMessage(content: text)
processWithChatApiServiceInternal(userMessage: userMessage, displayText: text, speakResponse: speakResponse)
}
private func processWithOpenAIInternal(userMessage: [String: Any], displayText: String, speakResponse: Bool = true, hasImage: Bool = false) {
guard let openAIService = openAIService else {
sendError("OpenAI服务未初始化", code: "OPENAI_NOT_INITIALIZED")
private func processWithChatApiServiceInternal(userMessage: [String: Any], displayText: String, speakResponse: Bool = true, hasImage: Bool = false) {
os_log("开始处理ChatAPI请求: displayText=%{public}@, speakResponse=%{public}@, hasImage=%{public}@",
log: logger, type: .info, displayText, speakResponse ? "是" : "否", hasImage ? "是" : "否")
guard let chatApiService = chatApiService else {
os_log("ChatAPI服务未初始化", log: logger, type: .error)
sendError("ChatAPI服务未初始化", code: "CHATAPI_NOT_INITIALIZED")
return
}
if isAiStreaming {
os_log("中断当前AI流式响应", log: logger, type: .info)
_ = interruptCurrentResponse()
}
isAiStreaming = true
os_log("设置AI流式状态为true", log: logger, type: .info)
var messages: [[String: Any]] = []
if !systemPrompt.isEmpty {
messages.append(openAIService.createSystemMessage(content: systemPrompt))
messages.append(chatApiService.createSystemMessage(content: systemPrompt))
os_log("添加系统提示消息", log: logger, type: .info)
}
messages.append(contentsOf: chatHistory)
os_log("添加历史消息: %d条", log: logger, type: .info, chatHistory.count)
messages.append(userMessage)
os_log("添加用户消息", log: logger, type: .info)
addToHistoryMessages(openAIService.createUserMessage(content: displayText))
addToHistoryMessages(chatApiService.createUserMessage(content: displayText))
let callback = OpenAIStreamCallback(
let callback = ChatApiStreamCallback(
agentService: self,
speakResponse: speakResponse,
displayText: displayText,
hasImage: hasImage
)
openAIService.sendMessageStream(messages: messages, callback: callback)
os_log("设置回调并调用sendMessageStream", log: logger, type: .info)
chatApiService.setStreamCallback(callback)
chatApiService.sendMessageStream(messages: messages)
os_log("sendMessageStream调用完成", log: logger, type: .info)
}
func processImageInput(imagePath: String, text: String, speakResponse: Bool) -> Bool {
@ -442,8 +476,8 @@ class AgentServiceImpl: NSObject {
return false
}
guard let openAIService = openAIService else {
sendError("OpenAI服务未初始化", code: "OPENAI_NOT_INITIALIZED")
guard let chatApiService = chatApiService else {
sendError("ChatAPI服务未初始化", code: "CHATAPI_NOT_INITIALIZED")
return false
}
@ -455,7 +489,7 @@ class AgentServiceImpl: NSObject {
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
guard let self = self else { return }
guard let imageBase64 = openAIService.fileToBase64(filePath: imagePath) else {
guard let imageBase64 = chatApiService.fileToBase64(filePath: imagePath) else {
DispatchQueue.main.async {
self.sendEvent(name: "error", data: [
"code": "IMAGE_CONVERSION_FAILED",
@ -471,10 +505,10 @@ class AgentServiceImpl: NSObject {
"imagePath": imagePath
])
let userMessage = openAIService.createUserMessageWithImage(text: text, imageBase64: imageBase64)
let userMessage = chatApiService.createUserMessageWithImage(text: text, imageBase64: imageBase64)
let displayText = text.isEmpty ? "[图片]" : text
self.processWithOpenAIInternal(
self.processWithChatApiServiceInternal(
userMessage: userMessage,
displayText: displayText,
speakResponse: speakResponse,
@ -516,8 +550,8 @@ class AgentServiceImpl: NSObject {
}
if sender == "user" {
if let openAIService = openAIService {
addToHistoryMessages(openAIService.createUserMessage(content: content))
if let chatApiService = chatApiService {
addToHistoryMessages(chatApiService.createUserMessage(content: content))
}
} else if sender == "assistant" {
let assistantMessage: [String: Any] = [
@ -613,6 +647,11 @@ class AgentServiceImpl: NSObject {
return true
}
func getTestPluginVersion() -> String {
// 通过test插件验证集成,不直接使用OpenAI SDK
return "通过test插件集成MacPaw OpenAI SDK v0.4.3 - 集成成功"
}
func dispose() -> Bool {
if isRecognizing {
stopRecognition()
@ -630,8 +669,8 @@ class AgentServiceImpl: NSObject {
azureAsrHelper?.dispose()
azureTtsHelper?.dispose()
openAIService?.cancelAll()
openAIService = nil
chatApiService?.cancelAll()
chatApiService = nil
audioPlayer = nil
@ -645,9 +684,10 @@ class AgentServiceImpl: NSObject {
return true
}
}
class OpenAIStreamCallback: StreamCallback {
class ChatApiStreamCallback: StreamCallback {
private weak var agentService: AgentServiceImpl?
private let speakResponse: Bool
private let displayText: String
@ -660,11 +700,14 @@ class OpenAIStreamCallback: StreamCallback {
self.speakResponse = speakResponse
self.displayText = displayText
self.hasImage = hasImage
}
func onToken(_ token: String) {
guard let agentService = agentService else { return }
responseBuilder += token
agentService.sendEvent(name: "assistant_token", data: ["token": token])
@ -677,6 +720,7 @@ class OpenAIStreamCallback: StreamCallback {
func onComplete() {
guard let agentService = agentService else { return }
if speakResponse {
agentService.azureTtsHelper?.flushStream()
}
@ -701,34 +745,45 @@ class OpenAIStreamCallback: StreamCallback {
// 保存聊天记录
agentService.saveChatMessage(userMessage: displayText, assistantMessage: response, metadata: metadata)
os_log("保存聊天记录完成", log: agentService.logger, type: .info)
} else {
os_log("警告: 响应内容为空", log: agentService.logger, type: .error)
}
agentService.isAiStreaming = false
os_log("设置AI流式状态为false", log: agentService.logger, type: .info)
}
func onError(_ error: Error) {
guard let agentService = agentService else { return }
os_log("ChatAPI错误: %{public}@", log: agentService.logger, type: .error, error.localizedDescription)
agentService.sendEvent(name: "error", data: [
"code": "AI_ERROR",
"message": error.localizedDescription
])
agentService.isAiStreaming = false
os_log("因错误设置AI流式状态为false", log: agentService.logger, type: .info)
}
func onFunctionCall(_ functionCall: [String: Any]) {
guard let agentService = agentService else { return }
let name = functionCall["name"] as? String ?? ""
os_log("收到函数调用: %{public}@", log: agentService.logger, type: .info, name)
agentService.audioPlayer?.playCallingSound()
let name = functionCall["name"] as? String ?? ""
agentService.sendEvent(name: "function_call", data: [
"name": name,
"arguments": functionCall
])
if name == "exit_interaction" {
os_log("执行退出交互", log: agentService.logger, type: .info)
agentService.stopRecognition()
}
}
@ -736,6 +791,9 @@ class OpenAIStreamCallback: StreamCallback {
func onFunctionCallResult(_ functionCall: [String: Any], _ functionCallResult: [String: Any]) {
guard let agentService = agentService else { return }
let name = functionCall["name"] as? String ?? ""
os_log("收到函数调用结果: %{public}@", log: agentService.logger, type: .info, name)
agentService.audioPlayer?.stopCallingSound()
agentService.sendEvent(name: "function_call_result", data: [
@ -744,6 +802,7 @@ class OpenAIStreamCallback: StreamCallback {
])
metadata = agentService.autoHandleFunctionCallResult(functionCallResult)
os_log("处理函数调用结果完成", log: agentService.logger, type: .info)
}
}
@ -824,46 +883,66 @@ class AudioPlayer {
private var callingPlayer: AVAudioPlayer?
private let logger = OSLog(subsystem: "com.yunqiinnovation.agent_service", category: "AudioPlayer")
private let audioQueue = DispatchQueue(label: "agent.audio.player", qos: .userInitiated)
private var resourcesBundle: Bundle {
#if SWIFT_PACKAGE
// 在 Swift Package 中使用 Bundle.module
return Bundle.module
#else
// 在其他情况下使用传统方式
let mainBundle = Bundle(for: AudioPlayer.self)
// 查找 agent_service_agent_service.bundle
if let bundleURL = mainBundle.url(forResource: "agent_service_agent_service", withExtension: "bundle"),
let specificBundle = Bundle(url: bundleURL) {
return specificBundle
}
// 如果找不到特定bundle,返回主bundle(用于调试)
return mainBundle
#endif
}
func playStartSound() {
playSound(named: "start", fileType: "mp3")
}
func playStopSound() {
playSound(named: "stop", fileType: "mp3")
}
func playCallingSound() {
playLoopSound(named: "calling", fileType: "mp3")
}
func stopCallingSound() {
callingPlayer?.stop()
callingPlayer = nil
}
private func playSound(named: String, fileType: String = "mp3") {
if let path = Bundle(for: type(of: self)).path(forResource: named, ofType: fileType) {
if let path = resourcesBundle.path(forResource: named, ofType: fileType) {
let url = URL(fileURLWithPath: path)
safePlayAudio(url: url)
return
}
os_log("未找到音频文件: %{public}@.%{public}@", log: logger, type: .error, named, fileType)
os_log("未找到音频文件: %{public}@.%{public}@ in bundle %{public}@", log: logger, type: .error, named, fileType, resourcesBundle.bundlePath)
}
private func playLoopSound(named: String, fileType: String = "mp3") {
stopCallingSound()
if let path = Bundle(for: type(of: self)).path(forResource: named, ofType: fileType) {
if let path = resourcesBundle.path(forResource: named, ofType: fileType) {
let url = URL(fileURLWithPath: path)
safePlayLoopAudio(url: url)
return
}
os_log("未找到循环音频文件: %{public}@.%{public}@", log: logger, type: .error, named, fileType)
os_log("未找到循环音频文件: %{public}@.%{public}@ in bundle %{public}@", log: logger, type: .error, named, fileType, resourcesBundle.bundlePath)
}
private func safePlayAudio(url: URL) {
do {
player?.stop()

0
local_plugins/agent_service/ios/Classes/AgentServicePlugin.swift → local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift

437
local_plugins/agent_service/ios/agent_service/Sources/agent_service/AudioSessionHub.swift

@ -0,0 +1,437 @@
import AVFoundation
import os.log
public enum AudioIntent {
case voice
case playback
}
public class AudioSessionHub {
public static let shared = AudioSessionHub()
private let logger = OSLog(subsystem: "com.yunqiinnovation.agent_service", category: "AudioSessionHub")
private var currentIntent: AudioIntent?
private let audioSession = AVAudioSession.sharedInstance()
private var isInterrupted = false
private init() {
setupNotifications()
}
public func begin(_ intent: AudioIntent) {
if intent == currentIntent && audioSession.isOtherAudioPlaying == false {
os_log("音频意图未变化且无其他音频播放,跳过设置: %{public}@", log: logger, type: .debug, String(describing: intent))
return
}
os_log("开始设置音频会话,意图: %{public}@", log: logger, type: .info, String(describing: intent))
currentIntent = intent
do {
switch intent {
case .voice:
os_log("设置语音模式: category=playAndRecord, mode=voiceChat", log: logger, type: .info)
// 第一步:设置音频类别和模式
try audioSession.setCategory(.playAndRecord,
mode: .voiceChat,
options: [.allowBluetooth, .defaultToSpeaker, .mixWithOthers])
os_log("✓ 音频类别设置成功: playAndRecord + voiceChat", log: logger, type: .info)
// 第二步:检查并设置蓝牙输入
os_log("检查可用输入设备...", log: logger, type: .info)
if let availableInputs = audioSession.availableInputs {
os_log("可用输入设备数量: %d", log: logger, type: .info, availableInputs.count)
for (index, input) in availableInputs.enumerated() {
os_log("输入设备[%d]: %{public}@ (%{public}@)", log: logger, type: .info,
index, input.portName, input.portType.rawValue)
}
// 查找蓝牙HFP设备
if let bluetoothInput = availableInputs.first(where: { $0.portType == .bluetoothHFP }) {
os_log("找到蓝牙HFP设备,尝试设置为首选输入: %{public}@", log: logger, type: .info, bluetoothInput.portName)
try audioSession.setPreferredInput(bluetoothInput)
os_log("✓ 蓝牙HFP输入设置成功: %{public}@", log: logger, type: .info, bluetoothInput.portName)
} else {
os_log("未找到蓝牙HFP设备", log: logger, type: .info)
}
} else {
os_log("⚠️ availableInputs 为 nil", log: logger, type: .default)
}
case .playback:
os_log("设置播放模式: category=playback, mode=default", log: logger, type: .info)
// 检查当前音频会话状态
os_log("设置前状态检查:", log: logger, type: .info)
os_log(" - 当前类别: %{public}@", log: logger, type: .info, audioSession.category.rawValue)
os_log(" - 当前模式: %{public}@", log: logger, type: .info, audioSession.mode.rawValue)
os_log(" - 当前是否激活: %{public}@", log: logger, type: .info, audioSession.isOtherAudioPlaying ? "是" : "否")
os_log(" - 其他音频播放: %{public}@", log: logger, type: .info, audioSession.isOtherAudioPlaying ? "是" : "否")
// 如果当前已经激活,先尝试停用
do {
if audioSession.isOtherAudioPlaying {
os_log("检测到其他音频正在播放,先尝试停用当前会话", log: logger, type: .info)
try audioSession.setActive(false, options: .notifyOthersOnDeactivation)
os_log("✓ 成功停用当前音频会话", log: logger, type: .info)
}
} catch let deactivateError as NSError {
os_log("⚠️ 停用当前音频会话失败: %{public}@ (继续尝试设置)", log: logger, type: .default, deactivateError.localizedDescription)
}
// 尝试渐进式设置:先尝试最简单的设置
var settingSuccess = false
// 策略1: 只设置类别,不设置选项
if !settingSuccess {
do {
os_log("尝试策略1: 仅设置类别 (playback)", log: logger, type: .info)
try audioSession.setCategory(.playback)
os_log("✓ 策略1成功: 音频类别设置为 playback", log: logger, type: .info)
settingSuccess = true
} catch let error as NSError {
os_log("策略1失败: %{public}@ (OSStatus: %d)", log: logger, type: .info, error.localizedDescription, error.code)
}
}
// 策略2: 设置类别和模式,不设置选项
if !settingSuccess {
do {
os_log("尝试策略2: 设置类别和模式 (playback + default)", log: logger, type: .info)
try audioSession.setCategory(.playback, mode: .default)
os_log("✓ 策略2成功: 音频类别和模式设置完成", log: logger, type: .info)
settingSuccess = true
} catch let error as NSError {
os_log("策略2失败: %{public}@ (OSStatus: %d)", log: logger, type: .info, error.localizedDescription, error.code)
}
}
// 策略3: 设置类别、模式和单个选项
if !settingSuccess {
do {
os_log("尝试策略3: 设置类别、模式和混音选项", log: logger, type: .info)
try audioSession.setCategory(.playback, mode: .default, options: [.mixWithOthers])
os_log("✓ 策略3成功: 音频类别、模式和混音选项设置完成", log: logger, type: .info)
settingSuccess = true
} catch let error as NSError {
os_log("策略3失败: %{public}@ (OSStatus: %d)", log: logger, type: .info, error.localizedDescription, error.code)
}
}
// 策略4: 设置类别、模式和蓝牙选项
if !settingSuccess {
do {
os_log("尝试策略4: 设置类别、模式和蓝牙选项", log: logger, type: .info)
try audioSession.setCategory(.playback, mode: .default, options: [.allowBluetoothA2DP])
os_log("✓ 策略4成功: 音频类别、模式和蓝牙选项设置完成", log: logger, type: .info)
settingSuccess = true
} catch let error as NSError {
os_log("策略4失败: %{public}@ (OSStatus: %d)", log: logger, type: .info, error.localizedDescription, error.code)
}
}
// 策略5: 完整设置(原始方案)
if !settingSuccess {
os_log("尝试策略5: 完整设置 (playback + default + 所有选项)", log: logger, type: .info)
try audioSession.setCategory(.playback,
mode: .default,
options: [.allowBluetoothA2DP, .mixWithOthers])
os_log("✓ 策略5成功: 完整音频设置完成", log: logger, type: .info)
settingSuccess = true
}
if !settingSuccess {
os_log("❌ 所有设置策略都失败了", log: logger, type: .error)
throw NSError(domain: "AudioSessionHub", code: -1, userInfo: [NSLocalizedDescriptionKey: "所有音频类别设置策略都失败"])
}
}
// 第三步:激活音频会话
os_log("尝试激活音频会话...", log: logger, type: .info)
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
os_log("✓ 音频会话激活成功", log: logger, type: .info)
os_log("✅ 音频会话完整设置成功:%{public}@", log: logger, type: .info, String(describing: intent))
// 输出当前音频路由信息
let hasBluetoothDevice = hasBluetoothAudioDevice()
let hasBluetoothMic = hasBluetoothMicrophone()
let currentInput = getCurrentInputDevice()
os_log("📊 音频状态总览:", log: logger, type: .info)
os_log(" - 蓝牙音频设备: %{public}@", log: logger, type: .info, hasBluetoothDevice ? "已连接" : "未连接")
os_log(" - 蓝牙麦克风: %{public}@", log: logger, type: .info, hasBluetoothMic ? "已连接" : "未连接")
os_log(" - 当前输入设备: %{public}@", log: logger, type: .info, currentInput)
if hasBluetoothDevice {
os_log("📋 详细路由信息:\n%{public}@", log: logger, type: .debug, getCurrentAudioRoute())
}
} catch let error as NSError {
let osStatusCode = error.code
let domain = error.domain
let description = error.localizedDescription
os_log("❌ 设置音频会话失败", log: logger, type: .error)
os_log(" - 错误域: %{public}@", log: logger, type: .error, domain)
os_log(" - OSStatus代码: %d (0x%X)", log: logger, type: .error, osStatusCode, osStatusCode)
os_log(" - 错误描述: %{public}@", log: logger, type: .error, description)
os_log(" - 当前意图: %{public}@", log: logger, type: .error, String(describing: intent))
// 解析具体的 OSStatus 错误
switch osStatusCode {
case -50:
os_log(" ➤ 错误分析: OSStatus -50 通常表示参数错误 (kAudioSessionInvalidPropertyError)", log: logger, type: .error)
case -560557673: // kAudioSessionNotInitialized
os_log(" ➤ 错误分析: 音频会话未初始化", log: logger, type: .error)
case -560030580: // kAudioSessionBadPropertySizeError
os_log(" ➤ 错误分析: 属性大小错误", log: logger, type: .error)
case -560161140: // kAudioSessionIncompatibleCategory
os_log(" ➤ 错误分析: 音频类别不兼容", log: logger, type: .error)
default:
os_log(" ➤ 错误分析: 未知的OSStatus错误代码", log: logger, type: .error)
}
// 输出当前音频会话状态用于调试
os_log("🔍 当前音频会话状态:", log: logger, type: .error)
os_log(" - 类别: %{public}@", log: logger, type: .error, audioSession.category.rawValue)
os_log(" - 模式: %{public}@", log: logger, type: .error, audioSession.mode.rawValue)
os_log(" - 是否激活: %{public}@", log: logger, type: .error, audioSession.isOtherAudioPlaying ? "是" : "否")
os_log(" - 其他音频播放: %{public}@", log: logger, type: .error, audioSession.isOtherAudioPlaying ? "是" : "否")
}
}
public func appWillEnterForeground() {
os_log("📱 应用即将进入前台", log: logger, type: .info)
if let intent = currentIntent {
os_log("恢复之前的音频意图: %{public}@", log: logger, type: .info, String(describing: intent))
begin(intent)
} else {
os_log("无之前的音频意图需要恢复", log: logger, type: .info)
}
}
public func appDidEnterBackground() {
os_log("📱 应用进入后台,准备释放音频会话", log: logger, type: .info)
do {
try audioSession.setActive(false, options: .notifyOthersOnDeactivation)
os_log("✓ 音频会话已释放(应用进入后台)", log: logger, type: .info)
} catch let error as NSError {
let osStatusCode = error.code
let domain = error.domain
let description = error.localizedDescription
os_log("❌ 释放音频会话失败", log: logger, type: .error)
os_log(" - 错误域: %{public}@", log: logger, type: .error, domain)
os_log(" - OSStatus代码: %d (0x%X)", log: logger, type: .error, osStatusCode, osStatusCode)
os_log(" - 错误描述: %{public}@", log: logger, type: .error, description)
}
}
/// 获取当前音频路由信息
public func getCurrentAudioRoute() -> String {
let currentRoute = audioSession.currentRoute
var routeInfo = "当前音频路由:\n"
// 输出设备
routeInfo += "输出设备:\n"
for output in currentRoute.outputs {
routeInfo += " - \(output.portName) (\(output.portType.rawValue))\n"
}
// 输入设备
routeInfo += "输入设备:\n"
for input in currentRoute.inputs {
routeInfo += " - \(input.portName) (\(input.portType.rawValue))\n"
}
return routeInfo
}
/// 检查是否有蓝牙音频设备连接
public func hasBluetoothAudioDevice() -> Bool {
let currentRoute = audioSession.currentRoute
// 检查输出设备
for output in currentRoute.outputs {
if output.portType == .bluetoothA2DP ||
output.portType == .bluetoothHFP ||
output.portType == .bluetoothLE {
return true
}
}
// 检查输入设备(这是关键!)
for input in currentRoute.inputs {
if input.portType == .bluetoothHFP {
return true
}
}
return false
}
/// 检查是否有蓝牙麦克风作为输入设备
public func hasBluetoothMicrophone() -> Bool {
let currentRoute = audioSession.currentRoute
for input in currentRoute.inputs {
if input.portType == .bluetoothHFP {
return true
}
}
return false
}
/// 获取当前输入设备信息
public func getCurrentInputDevice() -> String {
let currentRoute = audioSession.currentRoute
if let input = currentRoute.inputs.first {
return "\(input.portName) (\(input.portType.rawValue))"
}
return "无输入设备"
}
private func setupNotifications() {
NotificationCenter.default.addObserver(
self,
selector: #selector(handleAudioSessionInterruption),
name: AVAudioSession.interruptionNotification,
object: nil
)
NotificationCenter.default.addObserver(
self,
selector: #selector(handleAudioRouteChange),
name: AVAudioSession.routeChangeNotification,
object: nil
)
}
/// 处理音频中断
@objc private func handleAudioSessionInterruption(notification: Notification) {
os_log("🔊 收到音频会话中断通知", log: logger, type: .info)
guard let userInfo = notification.userInfo,
let typeValue = userInfo[AVAudioSessionInterruptionTypeKey] as? UInt,
let type = AVAudioSession.InterruptionType(rawValue: typeValue) else {
os_log("⚠️ 无法解析音频中断通知", log: logger, type: .default)
return
}
switch type {
case .began:
// 中断开始
isInterrupted = true
os_log("🚫 音频会话中断开始", log: logger, type: .info)
os_log(" - 中断状态: %{public}@", log: logger, type: .info, isInterrupted ? "是" : "否")
case .ended:
// 中断结束
isInterrupted = false
os_log("✅ 音频会话中断结束", log: logger, type: .info)
// 检查是否应该恢复
if let optionsValue = userInfo[AVAudioSessionInterruptionOptionKey] as? UInt {
let options = AVAudioSession.InterruptionOptions(rawValue: optionsValue)
os_log("中断选项: %d, 应该恢复: %{public}@", log: logger, type: .info, optionsValue, options.contains(.shouldResume) ? "是" : "否")
if options.contains(.shouldResume), let intent = currentIntent {
os_log("恢复之前的音频意图: %{public}@", log: logger, type: .info, String(describing: intent))
// 恢复之前的音频意图
begin(intent)
os_log("✓ 音频会话中断结束,已恢复", log: logger, type: .info)
} else {
os_log("不需要恢复音频会话", log: logger, type: .info)
}
} else {
os_log("⚠️ 中断通知中无选项信息", log: logger, type: .default)
}
@unknown default:
os_log("❓ 未知的音频中断类型: %{public}@", log: logger, type: .error, "\(type)")
}
}
/// 处理音频路由变化
@objc private func handleAudioRouteChange(notification: Notification) {
os_log("🔄 收到音频路由变化通知", log: logger, type: .info)
guard let userInfo = notification.userInfo,
let reasonValue = userInfo[AVAudioSessionRouteChangeReasonKey] as? UInt,
let reason = AVAudioSession.RouteChangeReason(rawValue: reasonValue) else {
os_log("⚠️ 无法解析音频路由变化通知", log: logger, type: .default)
return
}
os_log("路由变化原因: %d (%{public}@)", log: logger, type: .info, reasonValue, "\(reason)")
switch reason {
case .newDeviceAvailable:
os_log("📱 新音频设备已连接", log: logger, type: .info)
os_log("📋 当前音频路由:\n%{public}@", log: logger, type: .info, getCurrentAudioRoute())
// 重新应用当前意图以确保正确路由
if let intent = currentIntent {
os_log("重新应用当前音频意图: %{public}@", log: logger, type: .info, String(describing: intent))
begin(intent)
} else {
os_log("无当前音频意图需要重新应用", log: logger, type: .info)
}
case .oldDeviceUnavailable:
os_log("📱 音频设备已断开", log: logger, type: .info)
// 输出之前的路由信息(如果可用)
if let previousRoute = userInfo[AVAudioSessionRouteChangePreviousRouteKey] as? AVAudioSessionRouteDescription {
os_log("之前的音频路由:", log: logger, type: .info)
for output in previousRoute.outputs {
os_log(" - 输出: %{public}@ (%{public}@)", log: logger, type: .info, output.portName, output.portType.rawValue)
}
for input in previousRoute.inputs {
os_log(" - 输入: %{public}@ (%{public}@)", log: logger, type: .info, input.portName, input.portType.rawValue)
}
}
os_log("📋 当前音频路由:\n%{public}@", log: logger, type: .info, getCurrentAudioRoute())
// 重新应用当前意图以确保正确路由
if let intent = currentIntent {
os_log("重新应用当前音频意图: %{public}@", log: logger, type: .info, String(describing: intent))
begin(intent)
} else {
os_log("无当前音频意图需要重新应用", log: logger, type: .info)
}
case .categoryChange:
os_log("🔧 音频类别已变化", log: logger, type: .info)
os_log(" - 当前类别: %{public}@", log: logger, type: .info, audioSession.category.rawValue)
os_log(" - 当前模式: %{public}@", log: logger, type: .info, audioSession.mode.rawValue)
case .override:
os_log("🔀 音频路由被覆盖", log: logger, type: .info)
case .wakeFromSleep:
os_log("😴 从睡眠中唤醒", log: logger, type: .info)
case .noSuitableRouteForCategory:
os_log("❌ 当前类别没有合适的路由", log: logger, type: .default)
case .routeConfigurationChange:
os_log("⚙️ 路由配置发生变化", log: logger, type: .info)
@unknown default:
os_log("❓ 未知的路由变化原因: %d", log: logger, type: .default)
}
}
deinit {
NotificationCenter.default.removeObserver(self)
}
}

BIN
local_plugins/agent_service/ios/agent_service/Sources/agent_service/Resources/calling.mp3

Binary file not shown.

BIN
local_plugins/agent_service/ios/agent_service/Sources/agent_service/Resources/start.mp3

Binary file not shown.

BIN
local_plugins/agent_service/ios/agent_service/Sources/agent_service/Resources/stop.mp3

Binary file not shown.

8
local_plugins/agent_service/pubspec.yaml

@ -1,5 +1,5 @@
name: agent_service
description: 语音代理服务插件,集成了OpenAI对话和Azure语音能力
description: 语音代理服务插件,集成了ChatAPI对话和Azure语音能力
version: 0.0.1
homepage:
@ -11,8 +11,8 @@ dependencies:
flutter:
sdk: flutter
# 本地插件依赖
open_ai_service:
path: ../open_ai_service
chat_api:
path: ../chat_api
azure_speech:
path: ../azure_speech
ble_service:
@ -36,3 +36,5 @@ flutter:
pluginClass: AgentServicePlugin
ios:
pluginClass: AgentServicePlugin
swiftPackage:
path: ios/agent_service

95
local_plugins/azure_speech/android/src/main/kotlin/com/yunqiinnovation/azure_speech/AzureAsrHelper.kt

@ -24,6 +24,10 @@ import com.microsoft.cognitiveservices.speech.audio.AudioStreamFormat
import java.util.concurrent.BlockingQueue
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.TimeUnit
import java.io.File
import java.io.FileOutputStream
import java.io.RandomAccessFile
/**
* Azure语音识别辅助类,支持麦克风和外部音频源的单次和连续语音识别
*
@ -118,7 +122,13 @@ class AzureAsrHelper(private val context: Context) {
// 设置指定的识别语言
speechRecognitionLanguage = currentLanguage
}
// SetProperty(PropertyId.Speech_SegmentationStrategy, "Semantic");
// 设置静音超时时间(毫秒)
setProperty("SpeechServiceConnection_EndSilenceTimeoutMs", "800")
setProperty("Speech_SegmentationSilenceTimeoutMs", "800")
// 设置分段策略为时间模式
setProperty("Speech_SegmentationStrategy", "Time")
}
// 创建识别器
@ -528,7 +538,12 @@ class AzureAsrHelper(private val context: Context) {
private inner class MicrophoneStream : PullAudioInputStreamCallback() {
private var audioRecord: AudioRecord? = null
private var echoCanceler: AcousticEchoCanceler? = null
private var currentAudioFile: File? = null
private var fos: FileOutputStream? = null
// 用于存储音频数据的缓冲区
private val dataBuffer = mutableListOf<ByteArray>()
private var totalBytesWritten = 0
// 音频配置
private val sampleRate = 16000
private val channelConfig = AudioFormat.CHANNEL_IN_MONO
@ -546,6 +561,20 @@ class AzureAsrHelper(private val context: Context) {
*/
private fun initMicrophone() {
try {
// 创建新的音频文件
val timestamp = System.currentTimeMillis()
val filePath = context.getExternalFilesDir(null)?.absolutePath + "/recorded_audio_$timestamp.wav"
currentAudioFile = File(filePath)
currentAudioFile?.createNewFile()
// 仅写入初始文件头
fos = FileOutputStream(currentAudioFile).apply {
write(generateWavHeader(0)) // 初始0长度
close()
}
// 追加音频数据到文件
fos = FileOutputStream(currentAudioFile, true)
// 创建录音对象
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
val format = AudioFormat.Builder()
@ -616,18 +645,80 @@ class AzureAsrHelper(private val context: Context) {
Log.e(tag, "读取音频数据失败: $result")
return 0
}
// 将音频数据保存成wav格式的音频文件
saveAudioDataToWav(buffer, result)
return result
} catch (e: Exception) {
Log.e(tag, "读取音频异常: ${e.message}")
return 0
}
}
/**
* 保存音频数据到 WAV 文件
*/
private fun saveAudioDataToWav(buffer: ByteArray, length: Int) {
// 复制数据到新数组
val copy = ByteArray(length)
System.arraycopy(buffer, 0, copy, 0, length)
// 添加到缓冲区
dataBuffer.add(copy)
totalBytesWritten += length
// 写入文件
try {
fos?.write(copy, 0, length)
} catch (e: Exception) {
Log.e(tag, "写入音频数据失败: ${e.message}")
}
}
// 更新文件头生成(修正RIFF长度计算)
private fun generateWavHeader(dataLength: Int): ByteArray {
val totalLength = 36 + dataLength // RIFF块总长度 = 头部36字节 + 音频数据
val byteRate = sampleRate * 2 * 1 // 采样率 * 字节/样本 * 通道数
return byteArrayOf(
'R'.code.toByte(), 'I'.code.toByte(), 'F'.code.toByte(), 'F'.code.toByte(),
(totalLength and 0xFF).toByte(), ((totalLength shr 8) and 0xFF).toByte(),
((totalLength shr 16) and 0xFF).toByte(), ((totalLength shr 24) and 0xFF).toByte(),
'W'.code.toByte(), 'A'.code.toByte(), 'V'.code.toByte(), 'E'.code.toByte(),
'f'.code.toByte(), 'm'.code.toByte(), 't'.code.toByte(), ' '.code.toByte(),
16, 0, 0, 0, // PCM头长度
1, 0, // PCM格式
1, 0, // 单声道
(sampleRate and 0xFF).toByte(), ((sampleRate shr 8) and 0xFF).toByte(), 0, 0, // 采样率
(byteRate and 0xFF).toByte(), ((byteRate shr 8) and 0xFF).toByte(), 0, 0, // 字节率
2, 0, // 块对齐 (通道数 * 样本位数/8)
16, 0, // 样本位数
'd'.code.toByte(), 'a'.code.toByte(), 't'.code.toByte(), 'a'.code.toByte(),
(dataLength and 0xFF).toByte(), ((dataLength shr 8) and 0xFF).toByte(),
((dataLength shr 16) and 0xFF).toByte(), ((dataLength shr 24) and 0xFF).toByte()
)
}
/**
* 关闭音频资源
*/
override fun close() {
releaseAudioResources()
try {
// 关闭文件流
fos?.close()
// 更新WAV文件头
currentAudioFile?.let { file ->
RandomAccessFile(file, "rw").use { raf ->
raf.seek(0)
raf.write(generateWavHeader(totalBytesWritten))
}
Log.d(tag, "音频文件保存完成: ${file.absolutePath}")
}
} catch (e: Exception) {
Log.e(tag, "更新WAV文件头失败: ${e.message}")
} finally {
fos = null
currentAudioFile = null
}
}
/**

3
local_plugins/azure_speech/android/src/main/kotlin/com/yunqiinnovation/azure_speech/AzureTtsHelper.kt

@ -460,8 +460,9 @@ class AzureTtsHelper(private val context: Context) : ITtsService {
if (!isInitialized) return false
try {
streamBuffer.clear()
synthesizer?.StopSpeakingAsync()
streamBuffer.clear()
isSpeaking = false
return true
} catch (e: Exception) {

29
local_plugins/azure_speech/ios/azure_speech.podspec

@ -1,29 +0,0 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint azure_speech.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'azure_speech'
s.version = '0.0.1'
s.summary = 'Azure Speech SDK Flutter plugin'
s.description = <<-DESC
A Flutter plugin for Azure Speech Services providing speech recognition and text-to-speech capabilities.
DESC
s.homepage = 'https://github.com/yunqiinnovation/azure_speech'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*.{swift}'
s.dependency 'Flutter'
s.dependency 'speech'
s.dependency 'MicrosoftCognitiveServicesSpeech-iOS', '~> 1.37.0'
s.platform = :ios, '11.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
'SWIFT_EMIT_LOC_STRINGS' => 'YES'
}
s.swift_version = '5.0'
end

120
local_plugins/azure_speech/ios/azure_speech/LICENSE.md

@ -0,0 +1,120 @@
# MICROSOFT SOFTWARE LICENSE TERMS
MICROSOFT COGNITIVE SERVICES SPEECH SDK
**IF YOU LIVE IN (OR ARE A BUSINESS WITH A PRINCIPAL PLACE OF BUSINESS IN) THE UNITED STATES, PLEASE READ THE "BINDING ARBITRATION AND CLASS ACTION WAIVER" SECTION BELOW. IT AFFECTS HOW DISPUTES ARE RESOLVED.**
These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft's rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
## 1. INSTALLATION AND USE RIGHTS.
**a) General.** You may install and use any number of copies of the software to develop and test your applications that integrate API(s) used to access and/or use Cognitive Services Speech Services including Embedded Speech Components.
**b) Third Party Components.** The software may include third party components with separate legal notices or governed by other agreements, as may be described in the ThirdPartyNotices file(s) accompanying the software or may be accessible at <http://aka.ms/thirdpartynotices>. Even if such components are governed by other agreements, the disclaimer, limitations on, and exclusions of damages below also apply to the extent allowed by applicable law.
**c) Competitive Benchmarking**. If you are a direct competitor, and you access or use the software for purposes of competitive benchmarking, analysis, or intelligence gathering, you waive as against Microsoft, its subsidiaries, and its affiliated companies (including prospectively) any competitive use, access, and benchmarking test restrictions in the terms governing your software to the extent your terms of use are, or purport to be, more restrictive than Microsoft's terms. If this section applies and you do not waive any such purported restrictions in the terms governing your software, you are not allowed to access or use this software, and will not do so.
## 2. DISTRIBUTABLE CODE. 
The software may contain code you are permitted to distribute (i.e., make available for third parties) in applications you develop, as described in this Section.
**a) Distribution Rights.** The code and test files described below are distributable if included with the software.
i. REDIST.TXT Files. You may copy and distribute the object code form of code listed on the REDIST list in the software, if any; and
ii. Third Party Distribution. You may permit distributors of your applications to copy and distribute any of this distributable code you elect to distribute with your applications.
**b) Distribution Requirements.** For any code you distribute, you must:
i. add significant primary functionality to it in your applications;
ii. require distributors and external end users to agree to terms that protect it and Microsoft at least as much as this agreement; and
iii. indemnify, defend, and hold harmless Microsoft from any claims, including attorneys' fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the unmodified distributable code.
**c) Distribution Restrictions.** You may not:
i. use Microsoft's trademarks or trade dress in your application in any way that suggests your application comes from or is endorsed by Microsoft; or
ii. modify or distribute the source code of any distributable code so that any part of it becomes subject to any license that requires that the distributable code, any other part of the software, or any of Microsoft's other intellectual property be disclosed or distributed in source code form, or that others have the right to modify it.
## 3. CONDITIONAL RIGHTS TO USE AND DISTRIBUTE EMBEDDED SPEECH COMPONENTS.
If you are approved for access to Embedded Speech Components in accordance with the terms for Limited Access Services in the Service-Specific Product Terms for Azure Cognitive Services and Applied AI Services available at https://www.microsoft.com/licensing/terms/welcome/welcomepage, and you are in compliance with these license terms, you may license the additional rights to use and distribute the Embedded Speech Components provided to you by Microsoft. Additional applicable terms and conditions will be made available to you upon approval to access Embedded Speech Components.
**a)** The rights and obligations set forth in this section 3 are in addition to and subject to all other provisions of these SDK license terms except to the extent of any conflict, in which case the provisions of this section 3 will control. To the extent of any conflict between the rights and obligations set forth in this section 3 and the applicable license agreement, the provisions of the applicable license agreement will control.
## 4. SCOPE OF LICENSE.
The software is licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to):
**a)** work around any technical limitations in the software that only allow you to use it in certain ways;
**b)** reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software;
**c)** remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software;
**d)** use the software in any way that is against the law or to create or propagate malware; or
**e)** share, publish, distribute, or lease the software (including as part of an application and except for any distributable code, subject to the terms above), provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party.
## 5. DATA.
**a) Data Collection.** The software may collect information about you and your use of the software, and send that to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may opt-out of many of these scenarios, but not all, as described in the product documentation. There are also some features in the software that may enable you to collect data from users of your applications. If you use these features to enable data collection in your applications, you must comply with applicable law, including providing appropriate notices to users of your applications. You can learn more about data collection and use in the help documentation and the privacy statement at <https://aka.ms/privacy>. Your use of the software operates as your consent to these practices.
**b) Processing of Personal Data**. To the extent Microsoft is a processor or subprocessor of personal data in connection with the software, Microsoft makes the commitments in the European Union General Data Protection Regulation Terms of the Online Services Terms to all customers effective May 25, 2018, at <https://docs.microsoft.com/legal/gdpr>.
## 6. EXPORT RESTRICTIONS.
You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit <https://aka.ms/exporting>.
## 7. SUPPORT SERVICES.
Microsoft is not obligated under this agreement to provide any support services for the software. Any support provided is "as is", "with all faults", and without warranty of any kind.
## 8. UPDATES.
The software may periodically check for updates, and download and install them for you. You may obtain updates only from Microsoft or authorized sources. Microsoft may need to update your system to provide you with updates. You agree to receive these automatic updates without any additional notice. Updates may not include or support all existing software features, services, or peripheral devices.
## 9. BINDING ARBITRATION AND CLASS ACTION WAIVER.
This Section applies if you live in (or, if a business, your principal place of business is in) the United States.** If you and Microsoft have a dispute, you and Microsoft agree to try for 60 days to resolve it informally. If you and Microsoft can't, you and Microsoft **agree to binding individual arbitration before the American Arbitration Association under the Federal Arbitration Act ("FAA"), and not to sue in court in front of a judge or jury**. Instead, a neutral arbitrator will decide. **Class action lawsuits, class-wide arbitrations, private attorney-general actions, and any other proceeding where someone acts in a representative capacity are not allowed; nor is combining individual proceedings without the consent of all parties.** The complete Arbitration Agreement contains more terms and is at <https://aka.ms/arb-agreement-4>. You and Microsoft agree to these terms.
## 10. TERMINATION.
Without prejudice to any other rights, Microsoft may terminate this agreement if you fail to comply with any of its terms or conditions. In such event, you must destroy all copies of the software and all of its component parts.
## 11. ENTIRE AGREEMENT.
This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the software.
## 12. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES.
If you acquired the software in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles, except that the FAA governs everything related to arbitration. If you acquired the software in any other country, its laws apply, except that the FAA governs everything related to arbitration. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court (excluding arbitration). If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court (excluding arbitration).
## 13. CONSUMER RIGHTS; REGIONAL VARIATIONS.
This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state, province, or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state, province, or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
**a) Australia.** You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
**b) Canada.** If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
**c) Germany and Austria**.
**i. Warranty.** The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.
**ii. Limitation of Liability.** In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
Subject to the foregoing clause ii., Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called \"cardinal obligations\"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
## 14. DISCLAIMER OF WARRANTY.
THE SOFTWARE IS LICENSED "AS IS." YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.**
## 15. LIMITATION ON AND EXCLUSION OF DAMAGES.
IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. \$5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.**
This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.
**Please note: As this software is distributed in Canada, some of the clauses in this agreement are provided below in French.
**Remarque: Ce logiciel étant distribué au Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
**EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
**LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
**Cette limitation concerne:
** - tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers; et
** - les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
**Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
**EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.

53
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/Info.plist

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>MicrosoftCognitiveServicesSpeech.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>MicrosoftCognitiveServicesSpeech.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>MicrosoftCognitiveServicesSpeech.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

201
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioConfiguration.h

@ -0,0 +1,201 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXAudioStream.h"
#import "SPXAudioProcessingOptions.h"
/**
* Represents audio input or output configuration. Audio input can be from a microphone, file, or input stream.
* Audio output can be to a speaker, audio file output in WAV format, or output stream.
*/
SPX_EXPORT
@interface SPXAudioConfiguration : NSObject
/**
* Initializes an SPXAudioConfiguration object using the default microphone on the system.
*
* @return an instance of audio input configuration.
*/
- (nonnull instancetype)init;
/**
* Initializes an SPXAudioConfiguration object using the default microphone on the system and audio processing options.
*
* @param audioProcessingOptions the audio processing options.
* @return an instance of audio input configuration.
*/
- (nonnull instancetype)init:(nonnull SPXAudioProcessingOptions *)audioProcessingOptions;
/**
* Initializes an SPXAudioConfiguration object using the specified audio input of the system.
*
* Added in version 1.3.0.
*
* @param deviceName the unique ID of the input device to be used. If this is nil, the default is used. Please refer to <a href="https://aka.ms/csspeech/microphone-selection">this page</a> on how to retrieve platform-specific microphone names.
* @note Specifying a non-default device name is not supported in iOS.
* @note If the specified device is not available, a failure will occur when starting recognition using this SPXAudioConfiguration object.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithMicrophone:(nullable NSString *)deviceName;
/**
* Initializes an SPXAudioConfiguration object using the specified audio input of the system and audio processing options.
*
* @param deviceName the unique ID of the input device to be used. If this is nil, the default is used. Please refer to <a href="https://aka.ms/csspeech/microphone-selection">this page</a> on how to retrieve platform-specific microphone names.
* @param audioProcessingOptions the audio processing options.
* @note Specifying a non-default device name is not supported in iOS.
* @note If the specified device is not available, a failure will occur when starting recognition using this SPXAudioConfiguration object.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithMicrophone:(nullable NSString *)deviceName audioProcessingOptions:(nonnull SPXAudioProcessingOptions *)audioProcessingOptions;
/**
* Initializes an SPXAudioConfiguration object using the specified file as input.
*
* @param path path of the audio input file.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithWavFileInput:(nonnull NSString *)path;
/**
* Initializes an SPXAudioConfiguration object using the specified file as input and audio processing options.
*
* @param path path of the audio input file.
* @param audioProcessingOptions the audio processing options.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithWavFileInput:(nonnull NSString *)path audioProcessingOptions:(nonnull SPXAudioProcessingOptions *)audioProcessingOptions;
/**
* Initializes an SPXAudioConfiguration object using the default audio output device (speaker) on the system as output.
* @note Please ensure that the speaker is available before using this method.
*
* Added in version 1.7.0
*
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithDefaultSpeakerOutput
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXAudioConfiguration object using the default audio output device (speaker) on the system as output.
* @note Please ensure that the speaker is available before using this method.
*
* Added in version 1.7.0
*
* @param outError error information.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithDefaultSpeakerOutput:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an SPXAudioConfiguration object using a given audio output device (speaker) on the system as output.
* @param deviceName the unique ID of the input device to be used.
* @return an instance of audio input configuration.
* @note Specifying a non-default device name is not supported in iOS.
* @note Please ensure that the speaker is available before using this method.
*
* Added in version 1.17.0
*/
- (nullable instancetype)initWithSpeakerOutput:(nonnull NSString *)deviceName
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXAudioConfiguration object using a given audio output device (speaker) on the system as output.
* @param deviceName the unique ID of the input device to be used.
* @param outError error information.
* @return an instance of audio input configuration.
* @note Specifying a non-default device name is not supported in iOS.
* @note Please ensure that the speaker is available before using this method.
*
* Added in version 1.17.0
*/
- (nullable instancetype)initWithSpeakerOutput:(nonnull NSString *)deviceName error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an SPXAudioConfiguration object using the specified file as output.
*
* Added in version 1.7.0
*
* @param path path of the audio output file. The parent directory must already exist.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithWavFileOutput:(nonnull NSString *)path
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXAudioConfiguration object using the specified file as output.
*
* Added in version 1.7.0
*
* @param path path of the audio output file. The parent directory must already exist.
* @param outError error information.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithWavFileOutput:(nonnull NSString *)path error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an SPXAudioConfiguration object using the specified stream as input.
*
* @param stream the custom audio input stream.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithStreamInput:(nonnull SPXAudioInputStream *)stream;
/**
* Initializes an SPXAudioConfiguration object using the specified stream as input.
*
* @param stream the custom audio input stream.
* @param audioProcessingOptions the audio processing options.
* @return an instance of audio input configuration.
*/
- (nullable instancetype)initWithStreamInput:(nonnull SPXAudioInputStream *)stream audioProcessingOptions:(nonnull SPXAudioProcessingOptions *)audioProcessingOptions;
/**
* Initializes an SPXAudioConfiguration object using the specified stream as output.
*
* Added in version 1.7.0
*
* @param stream the custom audio output stream.
* @return an instance of audio output configuration.
*/
- (nullable instancetype)initWithStreamOutput:(nonnull SPXAudioOutputStream *)stream
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXAudioConfiguration object using the specified stream as output.
*
* Added in version 1.7.0
*
* @param stream the custom audio output stream.
* @param outError error information.
* @return an instance of audio output configuration.
*/
- (nullable instancetype)initWithStreamOutput:(nonnull SPXAudioOutputStream *)stream error:(NSError * _Nullable * _Nullable)outError;
/**
* Returns the property value.
* If the name is not available, it returns an empty string.
*
* @param name property name.
* @return value of the property.
*/
-(nullable NSString *)getPropertyByName:(nonnull NSString *)name;
/**
* Sets the property value by name.
*
* @param name property name.
* @param value value of the property.
*/
-(void)setPropertyTo:(nonnull NSString *)value byName:(nonnull NSString *)name;
/**
* The audio processing options.
*/
@property (readonly, nullable)SPXAudioProcessingOptions *audioProcessingOptions;
@end

133
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioDataStream.h

@ -0,0 +1,133 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
#import "SPXSpeechSynthesisResult.h"
#import "SPXKeywordRecognitionResult.h"
/**
* Represents audio data stream used for operating audio data as a stream.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXAudioDataStream : NSObject
/**
* Initializes an audio data stream from given speech synthesis result.
*
* @param result the speech synthesis result.
* @return an instance of audio data stream.
*/
- (nullable instancetype)initFromSynthesisResult:(nonnull SPXSpeechSynthesisResult *)result
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an audio data stream from given speech synthesis result.
*
* @param result the speech synthesis result.
* @param outError error information.
* @return an instance of audio data stream.
*/
- (nullable instancetype)initFromSynthesisResult:(nonnull SPXSpeechSynthesisResult *)result error:(NSError * _Nullable * _Nullable)outError;
/**
* Obtains the memory backed AudioDataStream associated with a given KeywordRecognition result.
*
* @param result the keyword recognition result.
* @return An audio stream with the input to the KeywordRecognizer starting from right before the Keyword.
*/
- (nullable instancetype)initFromKeywordRecognitionResult:(nonnull SPXKeywordRecognitionResult *)result
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Obtains the memory backed AudioDataStream associated with a given KeywordRecognition result.
*
* @param result the keyword recognition result.
* @param outError error information.
* @return An audio stream with the input to the KeywordRecognizer starting from right before the Keyword.
*/
- (nullable instancetype)initFromKeywordRecognitionResult:(nonnull SPXKeywordRecognitionResult *)result error:(NSError * _Nullable * _Nullable)outError;
/**
* Get current status of the audio data stream.
*
* @return current status.
*/
- (SPXStreamStatus)getStatus;
/**
* Check wheather the stream has enough data to be read.
*
* @param bytesRequested the request data size in bytes.
* @return a bool indicating whether the stream has enough data to be read.
*/
- (BOOL)canReadData:(NSUInteger)bytesRequested;
/**
* Check whether the stream has enough data to be read, starting from the specified position.
*
* @param pos the position counting from start of the stream.
* @param bytesRequested the request data size in bytes.
* @return a bool indicating whether the stream has enough data to be read.
*/
- (BOOL)canReadDataFromPosition:(NSUInteger)pos bytesRequested:(NSUInteger)bytesRequested;
/**
* Reads a chunk of the audio data and fill it to given buffer.
*
* @param data a buffer to receive read data.
* @param length length of the data to be received.
* @return length of data filled to the buffer, 0 means end of stream.
*/
- (NSUInteger)readData:(nonnull NSMutableData *)data length:(NSUInteger)length;
/**
* Reads a chunk of the audio data and fill it to given buffer, starting from the specified position.
*
* @param pos the position counting from start of the stream.
* @param data a buffer to receive read data.
* @param length length of the data to be received.
* @return length of data filled to the buffer, 0 means end of stream.
*/
- (NSUInteger)readDataFromPosition:(NSUInteger)pos data:(nonnull NSMutableData *)data length:(NSUInteger)length;
/**
* Save the audio data to a file.
*
* @param fileName the file name with full path.
*/
- (void)saveToWavFile:(nonnull NSString *)fileName;
/**
* Get current position of the audio data stream.
*
* @return current position
*/
- (NSUInteger)getPosition;
/**
* Set current position of the audio data stream.
*
* @param pos position to be set.
*/
- (void)setPosition:(NSUInteger)pos;
/**
* Stops any more data from getting to the stream.
*
*/
- (void)detachInput
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops any more data from getting to the stream.
*
* @param outError error information.
*/
- (void)detachInput:(NSError * _Nullable * _Nullable)outError;
@end

43
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioProcessingOptions.h

@ -0,0 +1,43 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license201809 for the full license information.
//
#include "SPXFoundation.h"
/**
* Represents audio processing constants used for specifying the processing in AudioProcessingOptions.
*/
typedef NS_OPTIONS(NSUInteger, SPXAudioProcessingConstants)
{
/**
* Disables built-in input audio processing.
*/
SPX_AUDIO_INPUT_PROCESSING_NONE = 0x00000000,
/**
* Enable voice activity detection in input audio processing.
*/
SPX_AUDIO_INPUT_PROCESSING_ENABLE_VOICE_ACTIVITY_DETECTION = 0x00000020
};
/**
* Represents audio processing options used with audio config class.
*/
SPX_EXPORT
@interface SPXAudioProcessingOptions : NSObject
/**
* Initializes an SPXAudioProcessingOptions object using audio processing flags.
*
* @param audioProcessingFlags the flags to control the audio processing performed by Speech SDK. It is bitwise OR of SPX_AUDIO_INPUT_PROCESSING_XXX constants from SPXAudioProcessingConstants enum.
* @return an instance of audio processing options.
*/
- (nonnull instancetype)init:(SPXAudioProcessingConstants)audioProcessingFlags;
/**
* The type of audio processing performed by Speech SDK.
* Bitwise OR of SPX_AUDIO_INPUT_PROCESSING_XXX constant flags from SPXAudioProcessingConstants enum indicating the input audio processing performed by Speech SDK.
*/
@property (readonly)SPXAudioProcessingConstants audioProcessingFlags;
@end

168
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioStream.h

@ -0,0 +1,168 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXAudioStreamFormat.h"
#import "SPXSpeechEnums.h"
typedef NSInteger (^SPXPullAudioInputStreamReadHandler)(NSMutableData * _Nonnull, NSUInteger);
typedef void (^SPXPullAudioInputStreamCloseHandler)(void);
typedef NSString * _Nonnull (^SPXPullAudioInputStreamGetPropertyHandler)(SPXPropertyId);
typedef NSUInteger (^SPXPushAudioOutputStreamWriteHandler)(NSData * _Nonnull);
typedef void (^SPXPushAudioOutputStreamCloseHandler)(void);
/**
* Base class representing the audio input stream used for custom audio input configurations.
* Currently no property and methods defined in the base class.
*/
SPX_EXPORT
@interface SPXAudioInputStream : NSObject
@end
/**
* Represents memory backed push audio input stream used for custom audio input configurations.
*/
SPX_EXPORT
@interface SPXPushAudioInputStream : SPXAudioInputStream
/**
* Initializes a memory-backed SPXPushAudioInputStream using the default format (16 kHz, 16 bit, mono PCM).
* @return an instance of push audio input stream.
*/
- (nonnull instancetype)init;
/**
* Initializes a memory-backed SPXPushAudioInputStream with the specified audio format.
*
* @param format The audio data format in which audio will be written to the push audio stream's write() method.
* @return an instance of push audio input stream.
*/
- (nullable instancetype)initWithAudioFormat:(nonnull SPXAudioStreamFormat *)format;
/**
* Writes the specified audio data by making an internal copy of the data.
* Note: The data should not contain any audio header.
*
* @param data The audio buffer of which this function will make a copy.
*/
- (void)write:(nonnull NSData *)data;
/**
* Closes the stream.
*/
- (void)close;
@end
/**
* Represents an audio input stream used for custom audio input configurations.
*/
SPX_EXPORT
@interface SPXPullAudioInputStream : SPXAudioInputStream
/**
* Initializes an SPXPullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz, 16 bit, mono PCM).
*
* @param readHandler handler which will be called in order to read data from the audio input stream. If no data is currently available in the stream, the readHandler should wait until data is available. It returns the number of bytes that have been read. It returns 0 when the stream should be closed. The data returned by read() should not contain any audio header.
* @param closeHandler handler which will be called in order to close the audio input stream.
* @return an instance of pull audio input stream.
*/
- (nullable instancetype)initWithReadHandler:(nonnull SPXPullAudioInputStreamReadHandler)readHandler closeHandler:(nonnull SPXPullAudioInputStreamCloseHandler)closeHandler;
/**
* Initializes an SPXPullAudioInputStream that delegates to the specified callback functions for read() and close() methods, with the specified audio format.
*
* @param format The audio data format in which audio will be written to the push audio stream's write() method.
* @param readHandler handler which will be called in order to read data from the audio input stream. If no data is currently available in the stream, the readHandler should wait until data is available. It returns the number of bytes that have been read. It returns 0 when stream should be closed. The data returned by read() should not contain any audio header.
* @param closeHandler handler which will be called in order to close the audio input stream.
* @return The audio input stream being created.
*/
- (nullable instancetype)initWithAudioFormat:(nonnull SPXAudioStreamFormat *)format readHandler:(nonnull SPXPullAudioInputStreamReadHandler)readHandler closeHandler:(nonnull SPXPullAudioInputStreamCloseHandler)closeHandler;
/**
* Initializes an SPXPullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz, 16 bit, mono PCM).
*
* @param readHandler handler which will be called in order to read data from the audio input stream. If no data is currently available in the stream, the readHandler should wait until data is available. It returns the number of bytes that have been read. It returns 0 when the stream should be closed. The data returned by read() should not contain any audio header.
* @param getPropertyHandler handler which will be called in order to get string information associated to given SPXPropertyId.
* @param closeHandler handler which will be called in order to close the audio input stream.
* @return an instance of pull audio input stream.
*/
- (nullable instancetype)initWithReadHandler:(nonnull SPXPullAudioInputStreamReadHandler)readHandler getPropertyHandler:(nonnull SPXPullAudioInputStreamGetPropertyHandler)getPropertyHandler closeHandler:(nonnull SPXPullAudioInputStreamCloseHandler)closeHandler;
/**
* Initializes an SPXPullAudioInputStream that delegates to the specified callback functions for read() and close() methods, with the specified audio format.
*
* @param format The audio data format in which audio will be written to the push audio stream's write() method.
* @param readHandler handler which will be called in order to read data from the audio input stream. If no data is currently available in the stream, the readHandler should wait until data is available. It returns the number of bytes that have been read. It returns 0 when stream should be closed. The data returned by read() should not contain any audio header.
* @param getPropertyHandler handler which will be called in order to get string information associated to given SPXPropertyId.
* @param closeHandler handler which will be called in order to close the audio input stream.
* @return The audio input stream being created.
*/
- (nullable instancetype)initWithAudioFormat:(nonnull SPXAudioStreamFormat *)format readHandler:(nonnull SPXPullAudioInputStreamReadHandler)readHandler
getPropertyHandler:(nonnull SPXPullAudioInputStreamGetPropertyHandler)getPropertyHandler
closeHandler:(nonnull SPXPullAudioInputStreamCloseHandler)closeHandler;
@end
/**
* Base class representing the audio output stream used for custom audio output configurations.
* Currently no property and methods defined in the base class.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXAudioOutputStream : NSObject
@end
/**
* Represents memory backed pull audio output stream used for custom audio output.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXPullAudioOutputStream : SPXAudioOutputStream
/**
* Creates a memory backed PullAudioOutputStream with the specified audio format.
*
* @return An instance of pull audio output stream
*/
- (nonnull instancetype)init;
/**
* Reads a chunk of the audio data and fill it to given buffer
*
* @param data a buffer to receive read data.
* @param length the length of data to receive.
* @return size of data filled to the buffer, 0 means end of stream
*/
- (NSUInteger)read:(nonnull NSMutableData *)data length:(NSUInteger) length;
@end
/**
* Represents a push audio output stream used for custom audio output configurations.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXPushAudioOutputStream : SPXAudioOutputStream
/**
* Initializes an SPXPushAudioOutputStream that delegates to the specified callback interface for write() and close() methods.
*
* @param writeHandler Handler which will be called in order to write data synchronously to the data stream.
* @param closeHandler Handler which will be called to close the audio stream.
*
* @return an instance of push audio output stream.
*/
- (nullable instancetype)initWithWriteHandler:(nonnull SPXPushAudioOutputStreamWriteHandler)writeHandler closeHandler:(nonnull SPXPushAudioOutputStreamCloseHandler)closeHandler;
@end

90
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAudioStreamFormat.h

@ -0,0 +1,90 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXAudioStreamFormat.h"
/**
* Defines supported audio stream container format.
* Added in version 1.7.0.
* Note: Compressed input is only supported on iOS.
*/
typedef NS_ENUM(NSUInteger, SPXAudioStreamContainerFormat)
{
/**
* Stream ContainerFormat definition for OGG OPUS.
*/
SPXAudioStreamContainerFormat_OGG_OPUS = 0x101,
/**
* Stream ContainerFormat definition for MP3.
*/
SPXAudioStreamContainerFormat_MP3 = 0x102,
/**
* Stream ContainerFormat definition for FLAC. Added in version 1.7.0.
*/
SPXAudioStreamContainerFormat_FLAC = 0x103,
/**
* Stream ContainerFormat definition for ALAW. Added in version 1.7.0.
*/
SPXAudioStreamContainerFormat_ALAW = 0x104,
/**
* Stream ContainerFormat definition for MULAW. Added in version 1.7.0.
*/
SPXAudioStreamContainerFormat_MULAW = 0x105,
/**
* Stream ContainerFormat definition for AMRNB. Currently not supported.
*/
SPXAudioStreamContainerFormat_AMRNB = 0x106,
/**
* Stream ContainerFormat definition for AMRWB. Currently not supported.
*/
SPXAudioStreamContainerFormat_AMRWB = 0x107,
/**
* Stream ContainerFormat definition for any other or unknown format.
*/
SPXAudioStreamContainerFormat_ANY = 0x108
};
/**
* Represents the audio stream format used for custom audio input configurations.
*/
SPX_EXPORT
@interface SPXAudioStreamFormat : NSObject
/**
* Initializes the audio stream format object with the default audio stream format (16 kHz, 16 bit, mono PCM).
*
* @return an instance of audio stream format.
*/
- (nonnull instancetype)init;
/**
* Initialize the audio stream format object with the specified PCM waveformat characteristics.
*
* @param samplesPerSecond sample rate, in samples per second (Hertz).
* @param bitsPerSample bits per sample.
* @param channels number of channels in the waveform-audio data.
* @return an instance of audio stream format.
*/
- (nullable instancetype)initUsingPCMWithSampleRate:(NSUInteger)samplesPerSecond bitsPerSample:(NSUInteger)bitsPerSample channels:(NSUInteger)channels;
/**
* Creates an audio stream format object with the specified compressed audio container format, to be used as input format.
* Support added in 1.5.0.
* Note: Compressed input is only supported on iOS.
* @param audioStreamContainerFormat compressed format type.
* @return an instance of audio stream format.
*/
- (nullable instancetype)initUsingCompressedFormat:(SPXAudioStreamContainerFormat)audioStreamContainerFormat;
@end

84
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAutoDetectSourceLanguageConfiguration.h

@ -0,0 +1,84 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSourceLanguageConfiguration.h"
/**
* Represents auto detection source language configuration
* Updated in version 1.13.0
*/
SPX_EXPORT
@interface SPXAutoDetectSourceLanguageConfiguration : NSObject
/**
* Initializes an SPXAutoDetectSourceLanguageConfiguration object with open range.
*
* Note: only SPXSpeechSynthesizer and multilingual SPXTranslationRecognizer support source language auto detection from open range,
* for SPXRecognizer, please use SPXAutoDetectSourceLanguageConfig with specific source languages.
*
* Added in version 1.13.0
*
* @return an instance of auto detection source language configuration.
*/
- (nullable instancetype)initWithOpenRange
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXAutoDetectSourceLanguageConfiguration object with open range
*
* Note: only SPXSpeechSynthesizer and multilingual SPXTranslationRecognizer support source language auto detection from open range,
* for SPXRecognizer, please use SPXAutoDetectSourceLanguageConfig with specific source languages.
*
* Added in version 1.13.0
*
* @param outError error information.
*
* @return an instance of auto detection source language configuration.
*/
- (nullable instancetype)initWithOpenRange:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an SPXAutoDetectSourceLanguageConfiguration object using languages.
*
* @param languages the candidate languages.
*
* @return an instance of auto detection source language configuration.
*/
- (nullable instancetype)init:(nonnull NSArray<NSString *> *)languages
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXAutoDetectSourceLanguageConfiguration object using languages.
*
* @param languages the candidate languages.
* @param outError error information.
*
* @return an instance of auto detection source language configuration.
*/
- (nullable instancetype)init:(nonnull NSArray<NSString *> *)languages error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an SPXAutoDetectSourceLanguageConfiguration object using source language configurations.
*
* @param sourceLanguageConfigurations the candidate source languages' configurations.
*
* @return an instance of auto detection source language configuration.
*/
- (nullable instancetype)initWithSourceLanguageConfigurations:(nonnull NSArray<SPXSourceLanguageConfiguration *> *)sourceLanguageConfigurations
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXAutoDetectSourceLanguageConfiguration object using source language configurations.
*
* @param sourceLanguageConfigurations the candidate source languages' configurations.
* @param outError error information.
*
* @return an instance of auto detection source language configuration.
*/
- (nullable instancetype)initWithSourceLanguageConfigurations:(nonnull NSArray<SPXSourceLanguageConfiguration *> *)sourceLanguageConfigurations
error:(NSError * _Nullable * _Nullable)outError;
@end

32
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXAutoDetectSourceLanguageResult.h

@ -0,0 +1,32 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechRecognitionResult.h"
/**
* Represents auto detection source language result
* Added in version 1.12.0
*/
SPX_EXPORT
@interface SPXAutoDetectSourceLanguageResult : NSObject
/**
* The language result. It is empty if the service cannot detect the language.
*/
@property (copy, readonly, nullable)NSString *language;
/**
* Initializes an SPXAutoDetectSourceLanguageResult object using SPXSpeechRecognitionResult.
*
* @param speechRecognitionResult the speech recognition result
*
* @return an instance of auto detection source language result.
*/
- (nonnull instancetype)init:(nonnull SPXRecognitionResult *)speechRecognitionResult;
@end

201
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnection.h

@ -0,0 +1,201 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognizer.h"
#import "SPXConversationTranslator.h"
#import "SPXSpeechSynthesizer.h"
#import "SPXDialogServiceConnector.h"
#import "SPXConnectionEventArgs.h"
#import "SPXConnectionMessageEventArgs.h"
/**
* Connection is a proxy class for managing connection to the speech service of the specified Recognizer.
* By default, a Recognizer autonomously manages connection to service when needed.
* The Connection class provides additional methods for users to explicitly open or close a connection and
* to subscribe to connection status changes.
* The use of Connection is optional. It is intended for scenarios where fine tuning of application
* behavior based on connection status is needed. Users can optionally call Open() to manually
* initiate a service connection before starting recognition on the Recognizer associated with this Connection.
* After starting a recognition, calling Open() or Close() might fail. This will not impact
* the Recognizer or the ongoing recognition. Connection might drop for various reasons, the Recognizer will
* always try to reinstitute the connection as required to guarantee ongoing operations. In all these cases
* Connected/Disconnected events will indicate the change of the connection status.
*
* Added in version 1.2.0.
*/
SPX_EXPORT
@interface SPXConnection : NSObject
typedef void (^SPXConnectionEventHandler)(SPXConnection* _Nonnull, SPXConnectionEventArgs * _Nonnull);
typedef void (^SPXConnectionMessageEventHandler)(SPXConnection* _Nonnull, SPXConnectionMessageEventArgs * _Nonnull);
/**
* Gets the Connection instance from the specified recognizer.
*
* @param recognizer The recognizer associated with the connection.
* @return The Connection instance of the recognizer.
*/
- (nullable instancetype)initFromRecognizer:(nonnull SPXRecognizer *)recognizer
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Gets the Connection instance from the specified recognizer.
*
* Added in version 1.6.0.
*
* @param recognizer The recognizer associated with the connection.
* @return The Connection instance of the recognizer.
* @param outError error information.
*/
- (nullable instancetype)initFromRecognizer:(nonnull SPXRecognizer *)recognizer error:(NSError * _Nullable * _Nullable)outError;
/**
* Gets the Connection instance from the specified conversation translator.
*
* @param translator The conversation translator associated with the connection.
* @return The Connection instance of the conversation translator.
*/
- (nullable instancetype)initFromConversationTranslator:(nonnull SPXConversationTranslator *)translator
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Gets the Connection instance from the specified conversation translator.
*
* Added in version 1.13.0.
*
* @param translator The conversation translator associated with the connection.
* @return The Connection instance of the conversation translator.
* @param outError error information.
*/
- (nullable instancetype)initFromConversationTranslator:(nonnull SPXConversationTranslator *)translator error:(NSError * _Nullable * _Nullable)outError;
/**
* Gets the Connection instance from the specified speech synthesizer.
*
* Added in version 1.17.0
*
* @param synthesizer The speech synthesizer associated with the connection.
* @return The Connection instance of the speech synthesizer.
*/
- (nullable instancetype)initFromSpeechSynthesizer:(nonnull SPXSpeechSynthesizer *)synthesizer
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Gets the Connection instance from the specified speech synthesizer.
*
* Added in version 1.17.0
*
* @param synthesizer The speech synthesizer associated with the connection.
* @return The Connection instance of the speech synthesizer.
* @param outError error information.
*/
- (nullable instancetype)initFromSpeechSynthesizer:(nonnull SPXSpeechSynthesizer *)synthesizer error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a Connection instance from the specified DialogServiceConnector.
*
* @param dialogServiceConnector the DialogServiceConnector instance associated with the connection.
* @return a Connection instance associated with the provided DialogServiceConnector.
*/
- (nonnull instancetype)initFromDialogServiceConnector:(nonnull SPXDialogServiceConnector *)dialogServiceConnector
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a Connection instance from the specified DialogServiceConnector.
*
* @param dialogServiceConnector the DialogServiceConnector instance associated with the connection.
* @param outError error information.
* @return a Connection instance associated with the provided DialogServiceConnector.
*/
- (nullable instancetype)initFromDialogServiceConnector:(nonnull SPXDialogServiceConnector *)dialogServiceConnector error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts to set up connection to the service.
* Users can optionally call Open() to manually set up a connection in advance before starting recognition on the
* Recognizer associated with this Connection. After starting recognition, calling Open() might fail, depending on
* the process state of the Recognizer. But the failure does not affect the state of the associated Recognizer.
*
* Note: On return, the connection might not be ready yet. Please subscribe to the Connected event to
* be notified when the connection is established.
*
* @param forContinuousRecognition indicates whether the connection is used for continuous recognition or single-shot recognition.
*/
- (void)open:(BOOL)forContinuousRecognition;
/**
* Closes the connection the service.
* Users can optionally call Close() to manually shutdown the connection of the associated Recognizer. The call
* might fail, depending on the process state of the Recognizer. But the failure does not affect the state of the
* associated Recognizer.
*/
- (void)close;
/**
* Subscribes to the Connected event which indicates that the recognizer is connected to service.
* In order to receive the Connected event after subscribing to it, the Connection object itself needs to be alive.
* If the Connection object owning this event is out of its life time, all subscribed events won't be delivered.
*/
- (void)addConnectedEventHandler:(nonnull SPXConnectionEventHandler)eventHandler;
/**
* Subscribe to the Disconnected event which indicates that the recognizer is disconnected from service.
* In order to receive the Disconnected event after subscribing to it, the Connection object itself needs to be alive.
* If the Connection object owning this event is out of its life time, all subscribed events won't be delivered.
*/
- (void)addDisconnectedEventHandler:(nonnull SPXConnectionEventHandler)eventHandler;
/**
* Subscribes to the ConnectionMessageReceived event which indicates that a message is received from the service.
* In order to receive the ConnectionMessageReceived event after subscribing to it, the Connection object itself
* needs to be alive. If the Connection object owning this event is out of its life time, all subscribed events
* won't be delivered.
*/
- (void)addMessageReceivedEventHandler:(nonnull SPXConnectionMessageEventHandler)eventHandler;
/**
* Appends a parameter in a message to service.
* Added in version 1.9.0.
*
* @param path The path of the message.
* @param propertyName The propertyName of the message.
* @param propertyValue The propertyValue of the message as a json string.
*/
- (void)setMessageProperty:(nonnull NSString *)path propertyName:(nonnull NSString *)propertyName propertyValue:(nonnull NSString *)propertyValue
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Appends a parameter in a message to service.
* Added in version 1.17.0.
*
* @param path The path of the message.
* @param propertyName The propertyName of the message.
* @param propertyValue The propertyValue of the message as a json string.
* @param outError error information.
*/
- (BOOL)setMessageProperty:(nonnull NSString *)path propertyName:(nonnull NSString *)propertyName propertyValue:(nonnull NSString *)propertyValue error:(NSError * _Nullable * _Nullable)outError;
/**
* Send message to service.
* Added in version 1.9.0.
*
* @param path The path of the message.
* @param payload The payload of the message as a json string.
*/
- (void)sendMessage:(nonnull NSString *)path payload:(nonnull NSString *)payload
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Send message to service.
* Added in version 1.9.0.
*
* @param path The path of the message.
* @param payload The payload of the message as a json string.
* @return The boolean value indicating successful operation.
* @param outError error information.
*/
- (BOOL)sendMessage:(nonnull NSString *)path payload:(nonnull NSString *)payload error:(NSError * _Nullable * _Nullable)outError;
@end

17
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnectionEventArgs.h

@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSessionEventArgs.h"
/**
* Defines the payload for Connected/Disconnected events.
*
* Added in version 1.2.0.
*/
SPX_EXPORT
@interface SPXConnectionEventArgs : SPXSessionEventArgs
@end

51
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnectionMessage.h

@ -0,0 +1,51 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXPropertyCollection.h"
/**
* ConnectionMessage represents implementation specific messages sent to and received from
* the speech service. These messages are provided for debugging purposes and should not
* be used for production use cases with the Azure Cognitive Services Speech Service.
* Messages sent to and received from the Speech Service are subject to change without
* notice. This includes message contents, headers, payloads, ordering, etc.
*/
SPX_EXPORT
@interface SPXConnectionMessage : NSObject
/**
* Gets the path associated with SPXConnectionMessage.
*/
@property (copy, readonly, nonnull)NSString *path;
/**
* Checks to see if the ConnectionMessage is a text message.
*/
@property (readonly)bool isTextMessage;
/**
* Checks to see if the ConnectionMessage is a binary message.
*/
@property (readonly)bool isBinaryMessage;
/**
* Gets the text message payload. Typically the text message content-type is
* application/json. To determine other content-types use Properties.GetProperty("Content-Type").
*/
@property (copy, readonly, nullable)NSString *textMessage;
/**
* Gets the binary message payload.
*/
@property (copy, readonly, nullable)NSData *binaryMessage;
/**
* Gets the collection of properties and their values defined for SPXConnectionMessage.
* Message headers can be accessed via this collection (e.g. "Content-Type").
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
@end

21
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConnectionMessageEventArgs.h

@ -0,0 +1,21 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXConnectionMessage.h"
/**
* Defines the payload for Connection's message events.
*
*/
SPX_EXPORT
@interface SPXConnectionMessageEventArgs : NSObject
/**
* The SPXConnectionMessage instance associated with SPXConnectionMessageEventArgs.
*/
@property (copy, readonly, nonnull)SPXConnectionMessage *message;
@end

338
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversation.h

@ -0,0 +1,338 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXUser.h"
#import "SPXParticipant.h"
#import "SPXPropertyCollection.h"
#import "SPXSpeechConfiguration.h"
/**
* Performs conversation management including add and remove participants.
*
* Added in version 1.13.0.
*/
SPX_EXPORT
@interface SPXConversation : NSObject
/**
* The collection of properties and their values defined for this SPXConversation.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
/**
* The unique identifier for the conversation.
*/
@property (nonatomic, copy, nullable)NSString *conversationId;
/**
* The authorization token used to communicate with the service.
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token. Otherwise, the recognizer will
* encounter errors during recognition.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Initializes a new instance of conversation using the specified speech configuration.
*
* @param speechConfiguration speech configuration.
* @return a conversation instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation using the specified speech configuration.
*
* @param speechConfiguration speech configuration.
* @param outError error information.
* @return a conversation instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of conversation using the specified speech configuration and conversation id.
*
* @param speechConfiguration speech configuration.
* @param conversationId a unqiue identification of your conversation.
* @return a conversation instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration conversationId:(nonnull NSString *)conversationId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation using the specified speech configuration and conversation id.
*
* @param speechConfiguration speech configuration.
* @param conversationId a unqiue identification of your conversation.
* @param outError error information.
* @return a conversation instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration conversationId:(nonnull NSString *)conversationId error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts a conversation, and provides asynchronous callback with the information is conversation started successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)startConversationAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts a conversation, and provides asynchronous callback with the information is conversation started successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)startConversationAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Ends a conversation, and provides asynchronous callback with the information is conversation ended successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)endConversationAsync:(nonnull void (^)(BOOL ended, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Ends a conversation, and provides asynchronous callback with the information is conversation ended successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)endConversationAsync:(nonnull void (^)(BOOL ended, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Deletes a conversation, and provides asynchronous callback with the information is conversation deletion completed.
* After deleted, no one will be able to join the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)deleteConversationAsync:(nonnull void (^)(BOOL deleted, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Deletes a conversation, and provides asynchronous callback with the information is conversation deletion completed.
* After deleted, no one will be able to join the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)deleteConversationAsync:(nonnull void (^)(BOOL deleted, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Locks a conversation, and provides asynchronous callback with the information is conversation locking completed.
* After locked, new participants are prevented from joining the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)lockConversationAsync:(nonnull void (^)(BOOL locked, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Locks a conversation, and provides asynchronous callback with the information is conversation locking completed.
* After locked, new participants are prevented from joining the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)lockConversationAsync:(nonnull void (^)(BOOL locked, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Unlocks a conversation, and provides asynchronous callback with the information is conversation unlocking completed.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)unlockConversationAsync:(nonnull void (^)(BOOL unlocked, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Unlocks a conversation, and provides asynchronous callback with the information is conversation unlocking completed.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)unlockConversationAsync:(nonnull void (^)(BOOL unlocked, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Mute all other participants in the conversation. After this no other participants will have their speech recognitions broadcast,
* nor be able to send text messages.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)muteAllParticipantsAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Mute all other participants in the conversation. After this no other participants will have their speech recognitions broadcast,
* nor be able to send text messages.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)muteAllParticipantsAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Unmute all other participants in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)unmuteAllParticipantsAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Unmute all other participants in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)unmuteAllParticipantsAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Mute participant with a given userId in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)muteParticipantAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Mute participant with a given userId in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)muteParticipantAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Unmute participant with a given userId in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)unmuteParticipantAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Unmute participant with a given userId in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)unmuteParticipantAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a participant from a conversation using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Adds a participant from a conversation using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a participant from a conversation using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
*/
- (void)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Adds a participant from a conversation using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
* @param outError error information.
*/
- (BOOL)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a participant from a conversation using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
*/
- (void)addParticipantAsync:(nonnull void (^)(SPXUser * _Nullable, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Adds a participant from a conversation using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
* @param outError error information.
*/
- (BOOL)addParticipantAsync:(nonnull void (^)(SPXUser * _Nullable, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user error:(NSError * _Nullable * _Nullable)outError;
/**
* Remove a participant from a conversation using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Remove a participant from a conversation using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Remove a participant from a conversation using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
*/
- (void)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Remove a participant from a conversation using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
* @param outError error information.
*/
- (BOOL)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant error:(NSError * _Nullable * _Nullable)outError;
/**
* Remove a participant from a conversation using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
*/
- (void)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Remove a participant from a conversation using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
* @param outError error information.
*/
- (BOOL)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user error:(NSError * _Nullable * _Nullable)outError;
@end

40
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationEventArgs.h

@ -0,0 +1,40 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSessionEventArgs.h"
/**
* Defines the payload for conversation expiration event.
*
*/
SPX_EXPORT
@interface SPXConversationExpirationEventArgs : SPXSessionEventArgs
/**
* Represents the time left until the conversation expires.
*/
@property (readonly)NSUInteger expirationTime;
@end
/**
* Defines the payload for conversation participant changed event.
*
*/
SPX_EXPORT
@interface SPXConversationParticipantsChangedEventArgs : SPXSessionEventArgs
/**
* The reason why the participant changed event was raised (e.g. a participant joined).
*/
@property (readonly)SPXParticipantChangedReason reason;
/**
* Represents the list of participant(s) that joined, left, or were updated.
*/
@property (nonatomic, copy, readonly, nonnull)NSArray *participants;
@end

258
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranscriber.h

@ -0,0 +1,258 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechConfiguration.h"
#import "SPXAudioConfiguration.h"
#import "SPXPropertyCollection.h"
#import "SPXRecognizer.h"
#import "SPXConversation.h"
#import "SPXConversationTranscriptionResult.h"
#import "SPXConversationTranscriptionEventArgs.h"
/**
* Performs conversation transcribing for audio input streams, and gets transcribed text and user id as a result.
*/
SPX_EXPORT
@interface SPXConversationTranscriber : SPXRecognizer
typedef void (^SPXConversationTranscriptionEventHandler)(SPXConversationTranscriber * _Nonnull, SPXConversationTranscriptionEventArgs * _Nonnull);
typedef void (^SPXConversationTranscriptionCanceledEventHandler)(SPXConversationTranscriber * _Nonnull, SPXConversationTranscriptionCanceledEventArgs * _Nonnull);
/**
* The authorization token used to communicate with the conversation transcription service.
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token.
* Otherwise, the recognizer will encounter errors during recognition.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Initializes a new instance of a conversation transcriber.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified audio config.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param audioConfiguration audio configuration.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified audio config.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of conversation transcriber using the specified source language.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param language source language.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration language:(nonnull NSString *)language
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified source language.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param language source language.
* @param outError error information.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
language:(nonnull NSString *)language
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of conversation transcriber using the specified source language and audio configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param language source language.
* @param audioConfiguration audio configuration.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
language:(nonnull NSString *)language
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified source language and audio configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param language source language.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
language:(nonnull NSString *)language
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of conversation transcriber using the specified source language configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param sourceLanguageConfiguration the source language configuration.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified source language configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param sourceLanguageConfiguration the source language configuration.
* @param outError error information.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of conversation transcriber using the specified source language configuration and audio configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param sourceLanguageConfiguration the source language configuration.
* @param audioConfiguration audio configuration.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified source language configuration and audio configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param sourceLanguageConfiguration the source language configuration.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of conversation transcriber using the specified configuration for auto language detection.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @return a conversation transcriber instance..
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified configuration for auto language detection.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param outError error information.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of conversation transcriber using the specified configuration for auto language detection and audio configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of conversation transcriber using the specified configuration for auto language detection and audio configuration.
*
* @param speechConfiguration speech configuration for conversation transcription.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return a conversation transcriber instance.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts conversation transcribing on a continuous audio stream, until stopTranscribingAsync() is called.
* User must subscribe to events to receive transcription results.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)startTranscribingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts conversation transcribing on a continuous audio stream, until stopTranscribingAsync() is called.
* User must subscribe to events to receive transcription results.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)startTranscribingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Stops conversation transcribing.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)stopTranscribingAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops conversation transcribing.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)stopTranscribingAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Subscribes to the Transcribed event which indicates that a final result has been transcribed.
*/
- (void)addTranscribedEventHandler:(nonnull SPXConversationTranscriptionEventHandler)eventHandler;
/**
* Subscribes to the Transcribing event which indicates an that intermediate result has been transcribed.
*/
- (void)addTranscribingEventHandler:(nonnull SPXConversationTranscriptionEventHandler)eventHandler;
/**
* Subscribes to the Canceled event which indicates that an error occurred during transcription.
*/
- (void)addCanceledEventHandler:(nonnull SPXConversationTranscriptionCanceledEventHandler)eventHandler;
@end

46
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranscriptionEventArgs.h

@ -0,0 +1,46 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXConversationTranscriptionResult.h"
/**
* Defines the payload for conversation transcription events.
*
*/
SPX_EXPORT
@interface SPXConversationTranscriptionEventArgs : SPXRecognitionEventArgs
/**
* Represents the conversation transcription result.
*/
@property (readonly, nullable)SPXConversationTranscriptionResult *result;
@end
/**
* Defines the payload of conversation transcription canceled result events.
*/
SPX_EXPORT
@interface SPXConversationTranscriptionCanceledEventArgs : SPXConversationTranscriptionEventArgs
/**
* The reason the trancription was canceled.
*/
@property (readonly)SPXCancellationReason reason;
/**
* The error code in case of an unsuccessful transcription (reason is set to Error).
*
*/
@property (readonly)SPXCancellationErrorCode errorCode;
/**
* The error message in case of an unsuccessful transcription (reason is set to Error).
*/
@property (copy, readonly, nullable)NSString *errorDetails;
@end

20
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranscriptionResult.h

@ -0,0 +1,20 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionResult.h"
/**
* Defines the result of conversation transcription.
*/
SPX_EXPORT
@interface SPXConversationTranscriptionResult : SPXRecognitionResult
/**
* A string that represents a speaker identifier in the conversation.
*/
@property (copy, readonly, nullable)NSString *speakerId;
@end

31
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranslationEventArgs.h

@ -0,0 +1,31 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXConversationTranscriptionEventArgs.h"
#import "SPXConversationTranslationResult.h"
/**
* Defines the payload for conversation translation events.
*
*/
SPX_EXPORT
@interface SPXConversationTranslationEventArgs : SPXRecognitionEventArgs
/**
* Represents the conversation translation result.
*/
@property (readonly, nullable)SPXConversationTranslationResult *result;
@end
/**
* Defines the payload of conversation translation canceled result events.
*/
SPX_EXPORT
@interface SPXConversationTranslationCanceledEventArgs : SPXConversationTranscriptionCanceledEventArgs
@end

25
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranslationResult.h

@ -0,0 +1,25 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXTranslationRecognitionResult.h"
/**
* Defines the result of conversation translation.
*/
SPX_EXPORT
@interface SPXConversationTranslationResult : SPXTranslationRecognitionResult
/**
* A string that represents the original language this result was in.
*/
@property (copy, readonly, nullable)NSString *originalLang;
/**
* A string that represents the unique identifier for the participant this result is for.
*/
@property (copy, readonly, nullable)NSString *participantId;
@end

255
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXConversationTranslator.h

@ -0,0 +1,255 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechConfiguration.h"
#import "SPXAudioConfiguration.h"
#import "SPXPropertyCollection.h"
#import "SPXConversation.h"
#import "SPXConversationEventArgs.h"
#import "SPXConversationTranslationResult.h"
#import "SPXConversationTranslationEventArgs.h"
/**
* A conversation translator that enables a connected experience where participants can use their
* own devices to see everyone else's recognitions and IMs in their own languages. Participants can
* also speak and send IMs to others.
*/
SPX_EXPORT
@interface SPXConversationTranslator : NSObject
typedef void (^SPXConversationTranslationEventHandler)(SPXConversationTranslator * _Nonnull, SPXConversationTranslationEventArgs * _Nonnull);
typedef void (^SPXConversationTranslationCanceledEventHandler)(SPXConversationTranslator * _Nonnull, SPXConversationTranslationCanceledEventArgs * _Nonnull);
typedef void (^SPXConversationParticipantsChangedEventHandler)(SPXConversationTranslator * _Nonnull, SPXConversationParticipantsChangedEventArgs * _Nonnull);
typedef void (^SPXConversationExpirationEventHandler)(SPXConversationTranslator * _Nonnull, SPXConversationExpirationEventArgs * _Nonnull);
typedef void (^SPXConversationSessionEventHandler)(SPXConversationTranslator * _Nonnull, SPXSessionEventArgs * _Nonnull);
/**
* Authorization token used to communicate with the conversation translation service.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token.
* Otherwise, the recognizer will encounter errors during recognition.
*/
@property (nonatomic, copy, readonly, nullable)NSString *authorizationToken;
/**
* Participant identifier used for conversation translation.
*/
@property (nonatomic, copy, readonly, nullable)NSString *participantId;
/**
* Initializes a new instance of a conversation translator using the default configuration.
* @return a conversation translator instance.
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability"
- (nullable instancetype)init
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
#pragma clang diagnostic pop
/**
* Initializes a new instance of a conversation translator using the default configuration.
*
* @param outError error information.
* @return a conversation translator instance.
*/
- (nullable instancetype)init:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of a conversation translator using the specified audio configuration.
*
* @param audioConfiguration audio configuration.
* @return a conversation translator instance.
*/
- (nullable instancetype)initWithAudioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of a conversation translator using the specified audio configuration.
*
* @param audioConfiguration audio configuration.
* @return a conversation translator instance.
*/
- (nullable instancetype)initWithAudioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Joins an existing conversation. You should use this method if you have created a conversation
* using createConversationAsync.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param conversation conversation instance.
* @param nickname The display name to use for the current participant.
*/
- (void)joinConversationAsync:(nonnull void (^)(BOOL joined, NSError * _Nullable))completedHandler conversation:(nonnull SPXConversation *)conversation nickname:(nonnull NSString *)nickname
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Joins an existing conversation. You should use this method if you have created a conversation
* using createConversationAsync.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param conversation conversation instance.
* @param nickname The display name to use for the current participant.
* @param outError error information.
*/
- (BOOL)joinConversationAsync:(nonnull void (^)(BOOL joined, NSError * _Nullable))completedHandler conversation:(nonnull SPXConversation *)conversation nickname:(nonnull NSString *)nickname error:(NSError * _Nullable * _Nullable)outError;
/**
* Joins an existing conversation. You should use this method if you have created a conversation
* using createConversationAsync.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param conversationId conversation id.
* @param nickname The display name to use for the current participant.
* @param language The speech language to use for the current participant.
*/
- (void)joinConversationAsync:(nonnull void (^)(BOOL joined, NSError * _Nullable))completedHandler conversationId:(nonnull NSString *)conversationId nickname:(nonnull NSString *)nickname language:(nonnull NSString *)language
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Joins an existing conversation. You should use this method if you have created a conversation
* using createConversationAsync.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param conversationId conversation id.
* @param nickname The display name to use for the current participant.
* @param language The speech language to use for the current participant.
* @param outError error information.
*/
- (BOOL)joinConversationAsync:(nonnull void (^)(BOOL joined, NSError * _Nullable))completedHandler conversationId:(nonnull NSString *)conversationId nickname:(nonnull NSString *)nickname language:(nonnull NSString *)language error:(NSError * _Nullable * _Nullable)outError;
/**
* Leave the current conversation. After this is called, you will no longer receive any events.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)leaveConversationAsync:(nonnull void (^)(BOOL left, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Leave the current conversation. After this is called, you will no longer receive any events.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)leaveConversationAsync:(nonnull void (^)(BOOL left, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Sends an instant message to all participants in the conversation. This instant message will
* be translated into each participant's text language.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param message The message to send.
*/
- (void)sendTextMessageAsync:(nonnull void (^)(BOOL sent, NSError * _Nullable))completedHandler message:(nonnull NSString *)message
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sends an instant message to all participants in the conversation. This instant message will
* be translated into each participant's text language.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param message The message to send.
* @param outError error information.
*/
- (BOOL)sendTextMessageAsync:(nonnull void (^)(BOOL sent, NSError * _Nullable))completedHandler message:(nonnull NSString *)message error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts sending audio to the conversation service for speech recognition and translation. You
* should subscribe to the Transcribing, and Transcribed events to receive conversation
* translation results for yourself, and other participants in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)startTranscribingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts sending audio to the conversation service for speech recognition and translation. You
* should subscribe to the Transcribing, and Transcribed events to receive conversation
* translation results for yourself, and other participants in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)startTranscribingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Stops sending audio to the conversation service. You will still receive Transcribing, and
* Transcribed events for other participants in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)stopTranscribingAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops sending audio to the conversation service. You will still receive Transcribing, and
* Transcribed events for other participants in the conversation.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)stopTranscribingAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Sets the Cognitive Speech authorization token that will be used for connecting to the server.
*
* @param authToken The authorization token.
* @param region The Azure region for this token.
*/
- (void)setAuthorizationToken:(nonnull NSString *)authToken region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sets the Cognitive Speech authorization token that will be used for connecting to the server.
*
* @param authToken The authorization token.
* @param region The Azure region for this token.
*/
- (BOOL)setAuthorizationToken:(nonnull NSString *)authToken region:(nonnull NSString *)region error:(NSError * _Nullable * _Nullable)outError;
/**
* Subscribes to the Transcribed event which indicates that a final result has been transcribed.
*/
- (void)addTranscribedEventHandler:(nonnull SPXConversationTranslationEventHandler)eventHandler;
/**
* Subscribes to the Transcribing event which indicates an that intermediate result has been transcribed.
*/
- (void)addTranscribingEventHandler:(nonnull SPXConversationTranslationEventHandler)eventHandler;
/**
* Subscribes to the TextMessageReceived event that signals a translated text message from a conversation participant.
*/
- (void)addTextMessageReceivedEventHandler:(nonnull SPXConversationTranslationEventHandler)eventHandler;
/**
* Subscribes to the Canceled event which indicates that an error occurred during transcription.
*/
- (void)addCanceledEventHandler:(nonnull SPXConversationTranslationCanceledEventHandler)eventHandler;
/**
* Subscribes to the ConversationParticipantsChanged event that signals participants in the room have changed (e.g. a new participant joined).
*/
- (void)addConversationParticipantsChangedEventHandler:(nonnull SPXConversationParticipantsChangedEventHandler)eventHandler;
/**
* Subscribes to the ConversationExpiration event that signals how many more minutes are left before the conversation expires.
*/
- (void)addConversationExpirationEventHandler:(nonnull SPXConversationExpirationEventHandler)eventHandler;
/**
* Subscribes to the SessionStarted event using the specified handler.
*/
- (void)addSessionStartedEventHandler:(nonnull SPXConversationSessionEventHandler)eventHandler;
/**
* Subscribes to the SessionStopped event using the specified handler.
*/
- (void)addSessionStoppedEventHandler:(nonnull SPXConversationSessionEventHandler)eventHandler;
@end

320
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConfiguration.h

@ -0,0 +1,320 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXPropertyCollection.h"
/**
* The base configuration type used to create a DialogServiceConnector that can communicate with a voice assistant.
*
* SPXDialogServiceConfiguration objects should be initialized directly. Derived objects like
* SPXDialogBotFrameworkConfiguration should be instantiated, instead.
*/
SPX_EXPORT
@interface SPXDialogServiceConfiguration : NSObject
/**
* The language identifier used for speech-to-text, expressed in BCP-47 format.
*/
@property (nonatomic, copy, nullable)NSString *language;
/**
* Returns the value of a configuration property using an explicit string literal as a key.
* If a property with the provided key is not available, an empty string is returned.
*
* @param name the name of the configuration property used as a key to the desired value.
* @return the value of the indexed configuration property or an empty string if the key is not found.
*/
- (nullable NSString *)getPropertyByName:(nonnull NSString *)name;
/**
* Returns the value of a configuration property using a known property ID as a key.
* If a property with the provided key is not available, an empty string is returned.
*
* @param propertyId the property ID for the configuration property.
* @return the value of the configuration property or an empty string if the key is not found.
*/
- (nullable NSString *)getPropertyById:(SPXPropertyId)propertyId;
/**
* Sets the value of a configuration property using a provided string literal as the key.
*
* @param value the value to set for the configuration property.
* @param name the name of the configuration property to use as a key for its value.
*/
- (void)setPropertyTo:(nonnull NSString *)value byName:(nonnull NSString *)name;
/**
* Sets the value of a configuration property using a known property ID as the key.
*
* @param value the value to set for the configuration property.
* @param id the property ID for the configuration property.
*/
- (void)setPropertyTo:(nonnull NSString *)value byId:(SPXPropertyId)id;
/**
* Sets an advanced configuration property that's encoded into the speech service request upon connection.
* This is typically used for preview features not available via a well-supported property ID.
*
* @param value the property value.
* @param name the property name.
* @param channel the channel used to pass the specified property to service.
*/
- (void)setServicePropertyTo
:(nonnull NSString *)value
byName:(nonnull NSString *)name
usingChannel:(SPXServicePropertyChannel)channel;
@end
/**
* The specialized configuration type used to initialize a DialogServiceConnector that will connect to a Bot Framework
* bot using the Direct Line Speech channel.
*
* See also: [What is Direct Line Speech?](/azure/cognitive-services/speech-service/direct-line-speech).
*/
SPX_EXPORT
@interface SPXDialogBotFrameworkConfiguration : SPXDialogServiceConfiguration
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot via the Direct Line Speech channel.
*
* @param subscriptionKey the subscription key to be used.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param botId the identifier of a specific bot resource to request, even if it's not the default for this
* subscription.
* @param outError error information.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nullable instancetype)initWithSubscription
:(nonnull NSString *)subscriptionKey
region:(nonnull NSString *)region
botId:(NSString * _Nullable)botId
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot.
*
* @param subscriptionKey the subscription key to be used.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param botId the identifier of a specific bot resource to request, even if it's not the default for this
* subscription.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nonnull instancetype)initWithSubscription
:(nonnull NSString *)subscriptionKey
region:(nonnull NSString *)region
botId:(NSString * _Nullable)botId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot.
* This will connect to the default bot associated with the Direct Line Speech channel for the speech service resource.
*
* @param subscriptionKey the subscription key to be used.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param outError error information.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nullable instancetype)initWithSubscription
:(nonnull NSString *)subscriptionKey
region:(nonnull NSString *)region
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot.
* This will connect to the default bot associated with the Direct Line Speech channel for the speech service resource.
*
* @param subscriptionKey the subscription key to be used.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nonnull instancetype)initWithSubscription:(nonnull NSString *)subscriptionKey region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot.
*
* Note: An authorization token must be obtained before this call and checked for validity. Before an authorization
* token expires, it must be refreshed by assigning a new token on the corresponding property present on the
* DialogServiceConnector created with the configuration object created with this call.
*
* @param authorizationToken the authorization token.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param botId the identifier of a specific bot resource to request, even if it's not the default for this
* subscription.
* @param outError error information.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nullable instancetype)initWithAuthorizationToken
:(nonnull NSString *)authorizationToken
region:(nonnull NSString *)region
botId:(NSString * _Nullable)botId
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot.
*
* Note: An authorization token must be obtained before this call and checked for validity. Before an authorization
* token expires, it must be refreshed by assigning a new token on the corresponding property present on the
* DialogServiceConnector created with the configuration object created with this call.
*
* @param authorizationToken the authorization token.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param botId the identifier of a specific bot resource to request, even if it's not the default for this
* subscription.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nonnull instancetype)initWithAuthorizationToken
:(nonnull NSString *)authorizationToken
region:(nonnull NSString *)region
botId:(NSString * _Nullable)botId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot.
* This will connect to the default bot associated with the Direct Line Speech channel for the speech service resource.
*
* Note: An authorization token must be obtained before this call and checked for validity. Before an authorization
* token expires, it must be refreshed by assigning a new token on the corresponding property present on the
* DialogServiceConnector created with the configuration object created with this call.
*
* @param authorizationToken the authorization token.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param outError error information.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nullable instancetype)initWithAuthorizationToken
:(nonnull NSString *)authorizationToken
region:(nonnull NSString *)region
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a Bot
* Framework bot.
* This will connect to the default bot associated with the Direct Line Speech channel for the speech service resource.
*
* Note: An authorization token must be obtained before this call and checked for validity. Before an authorization
* token expires, it must be refreshed by assigning a new token on the corresponding property present on the
* DialogServiceConnector created with the configuration object created with this call.
*
* @param authorizationToken the authorization token.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nonnull instancetype)initWithAuthorizationToken
:(nonnull NSString *)authorizationToken
region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
@end
/**
* The instance interface type used to initialize a DialogServiceConnector that will connect to a Custom Commands
* application as published from Speech Studio for a speech service resource.
*
* See also: [What is Custom Commands?](/azure/cognitive-services/speech-service/custom-commands).
*/
SPX_EXPORT
@interface SPXDialogCustomCommandsConfiguration : SPXDialogServiceConfiguration
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a
* Custom Commands application.
* Requires an identifier for a published Custom Commands application associated with the referenced speech service
* resource.
*
* @param subscriptionKey the subscription key to be used.
* @param appId the identifier for the Custom Commands application to use, as selected from the subscription.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param outError error information.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nullable instancetype)initWithSubscription
:(nonnull NSString *)subscriptionKey
appId:(nonnull NSString *)appId
region:(nonnull NSString *)region
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a
* Custom Commands application.
* Requires an identifier for a published Custom Commands application associated with the referenced speech service
* resource.
*
* @param subscriptionKey the subscription key to be used.
* @param appId the identifier for the Custom Commands application to use, as selected from the subscription.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nonnull instancetype)initWithSubscription
:(nonnull NSString *)subscriptionKey
appId:(nonnull NSString *)appId
region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a
* Custom Commands application.
* Requires an identifier for a published Custom Commands application associated with the referenced speech service
* resource.
*
* Note: An authorization token must be obtained before this call and checked for validity. Before an authorization
* token expires, it must be refreshed by assigning a new token on the corresponding property present on the
* DialogServiceConnector created with the configuration object created with this call.
*
* @param authorizationToken the authorization token.
* @param appId the identifier for the Custom Commands application to use, as selected from the subscription.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @param outError error information.
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nullable instancetype)initWithAuthorizationToken
:(nonnull NSString *)authorizationToken
appId:(nonnull NSString *)appId
region:(nonnull NSString *)region
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a dialog configuration object used to create a DialogServiceConnector that will communicate with a
* Custom Commands application.
* Requires an identifier for a published Custom Commands application associated with the referenced speech service
* resource.
*
* Note: An authorization token must be obtained before this call and checked for validity. Before an authorization
* token expires, it must be refreshed by assigning a new token on the corresponding property present on the
* DialogServiceConnector created with the configuration object created with this call.
*
* @param authorizationToken the authorization token.
* @param appId the identifier for the Custom Commands application to use, as selected from the subscription.
* @param region the region name for the subscription (see the <a href="https://aka.ms/csspeech/region">region
* page</a>).
* @return a configuration object used to initialize a DialogServiceConnector.
*/
- (nonnull instancetype)initWithAuthorizationToken
:(nonnull NSString *)authorizationToken
appId:(nonnull NSString *)appId
region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
@end

592
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConnector.h

@ -0,0 +1,592 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXDialogServiceConnectorActivityReceivedEventArgs.h"
#import "SPXAudioConfiguration.h"
#import "SPXAutoDetectSourceLanguageConfiguration.h"
#import "SPXKeywordRecognitionModel.h"
#import "SPXSourceLanguageConfiguration.h"
#import "SPXDialogServiceConfiguration.h"
#import "SPXDialogServiceConnector.h"
#import "SPXDialogServiceConnectorTurnStatusReceivedEventArgs.h"
#import "SPXSpeechRecognitionResult.h"
#import "SPXSpeechRecognitionEventArgs.h"
#import "SPXSessionEventArgs.h"
/**
* An object that communicates with a speech-enabled dialog system using either the Bot Framework or Custom Commands.
* This type receives speech-to-text results and also facilitates the asynchronous sending and receiving of non-speech
* dialog activity data.
*
* See also:
* [Integrate with a client application using Speech SDK](/azure/cognitive-services/speech-service/how-to-custom-commands-setup-speech-sdk),
* [Voice assistants frequently asked questions](/azure/cognitive-services/speech-service/faq-voice-assistants),
* [What is Custom Commands?](/azure/cognitive-services/speech-service/custom-commands)
*/
SPX_EXPORT
@interface SPXDialogServiceConnector : SPXRecognizer
/**
* Handler type provided to listenOnceAsync that receives speech-to-text results upon completion.
*/
typedef void (^SPXDialogServiceConnectorRecognitionResultHandler)(SPXSpeechRecognitionResult * _Nonnull);
/**
* Handler type provided to sendActivityAsync that receives interaction identifiers, as strings, upon completion.
*/
typedef void (^SPXDialogServiceConnectorInteractionIdHandler)(NSString * _Nonnull);
/**
* Handler type provided to async methods without async result data that is invoked when an asynchronous stop operation
* completes.
*/
typedef void (^SPXDialogServiceConnectorAsyncCompletionHandler)(void);
/**
* Handler type provided to receieve event information for intermediate and final speech-to-text results.
*/
typedef void (^SPXDialogServiceConnectorRecognitionEventHandler)(SPXDialogServiceConnector * _Nonnull, SPXSpeechRecognitionEventArgs * _Nonnull);
/**
* Handler type provided to receive event information for cancellation events as raised when errors or end of input
* occurs.
*/
typedef void (^SPXDialogServiceConnectorCanceledEventHandler)(SPXDialogServiceConnector * _Nonnull, SPXSpeechRecognitionCanceledEventArgs * _Nonnull);
/**
* Handler type provided to receive turn status information from the connected dialog implementation.
*/
typedef void (^SPXDialogServiceConnectorTurnStatusReceivedEventHandler)(SPXDialogServiceConnector * _Nonnull, SPXDialogServiceConnectorTurnStatusReceivedEventArgs * _Nonnull);
/**
* Handler type provided to receive activity events from connected dialog implementation.
*/
typedef void (^SPXDialogServiceConnectorActivityReceivedEventHandler)(SPXDialogServiceConnector * _Nonnull, SPXDialogServiceConnectorActivityReceivedEventArgs * _Nonnull);
/**
* The authorization token used to communicate with the speech service.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* A JSON template for activity payload data that will be provided to the speech service for the next conversation.
* The service will attempt to merge this template into all activities sent to the dialog backend, whether originated
* by the client with SendActivityAsync or generated by the service, as is the case with speech-to-text results. This
* allows a client to ensure consistent metadata information is provided to the dialog implementation across
* interactions.
*/
@property (nonatomic, copy, nullable)NSString *speechActivityTemplate;
/**
* Initializes a new instance of dialog service connector that will use the default audio input device for any
* speech-to-text interactions.
*
* @param dialogServiceConfiguration the configuration object that includes information about the selected dialog
* system.
* @param outError error information.
* @return an instance of a dialog service connector.
*/
- (nullable instancetype)initWithDialogServiceConfiguration
:(nonnull SPXDialogServiceConfiguration *)dialogServiceConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of dialog service connector that will use the default audio input device for any
* speech-to-text interactions.
*
* @param dialogServiceConfiguration the configuration object that includes information about the selected dialog
* system.
* @return an instance of a dialog service connector.
*/
- (nonnull instancetype)initWithDialogServiceConfiguration
:(nonnull SPXDialogServiceConfiguration *)dialogServiceConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of dialog service connector using the specified audio configuration.
*
* @param dialogServiceConfiguration the configuration object that includes information about the selected dialog
* system.
* @param audioConfiguration the configuration object for input audio as used by speech-to-text interactions.
* @param outError error information.
* @return an instance of a dialog service connector.
*/
- (nullable instancetype)initWithDialogServiceConfiguration
:(nonnull SPXDialogServiceConfiguration *)dialogServiceConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of dialog service connector using the specified audio configuration.
*
* @param dialogServiceConfiguration the configuration object that includes information about the selected dialog
* system.
* @param audioConfiguration the configuration object for input audio as used by speech-to-text interactions.
* @return an instance of a dialog service connector.
*/
- (nonnull instancetype)initWithDialogServiceConfiguration
:(nonnull SPXDialogServiceConfiguration *)dialogServiceConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Begins a speech-to-text interaction with this connector and blocks until a single speech-to-text final result is
* received. The speech-to-text result received is also provided to the configured dialog implementation and that dialog
* system may produce any number of activity payloads in response to the speech interaction. Speech interactions may be
* correlated with activities via dialog-specific data in the activity payload.
*
* @param outError error information.
* @return the speech-to-text result from the single-shot speech interaction.
*/
- (nullable SPXSpeechRecognitionResult *)listenOnce:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Begins a speech-to-text interaction with this connector and blocks until a single speech-to-text final result is
* received. The speech-to-text result received is also provided to the configured dialog implementation and that dialog
* system may produce any number of activity payloads in response to the speech interaction. Speech interactions may be
* correlated with activities via dialog-specific data in the activity payload.
*
* @return the speech-to-text result from the single-shot speech interaction.
*/
- (nonnull SPXSpeechRecognitionResult *)listenOnce
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.") NS_RETURNS_RETAINED;
/**
* Asynchronously begins a speech-to-text interaction with this connector and immediately returns execution to the
* calling thread. When received, speech-to-text results may be processed by the provided result handler or retrieved
* via a subscription to the recognized event. The speech-to-text result produced by this operation is also provided to
* the configured dialog implementation and that dialog system may produce any number of activity payloads in response
* to the speech interaction. Speech interactions may be correlated with activities via dialog-specific data in the
* activity payload.
*
* @param resultReceivedHandler the handler function called when a final speech-to-text result is received.
* @param outError error information.
* @return a value indicating whether the request to listen started successfully. If NO, additional detail may be
* available in outError.
*/
- (BOOL)listenOnceAsync
:(nonnull SPXDialogServiceConnectorRecognitionResultHandler)resultReceivedHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Asynchronously begins a speech-to-text interaction with this connector and immediately returns execution to the
* calling thread. When received, speech-to-text results may be processed by the provided result handler or retrieved
* via a subscription to the recognized event. The speech-to-text result produced by this operation is also provided to
* the configured dialog implementation and that dialog system may produce any number of activity payloads in response
* to the speech interaction. Speech interactions may be correlated with activities via dialog-specific data in the
* activity payload.
*
* @param resultReceivedHandler the handler function called when a final speech-to-text result is received.
*/
- (void)listenOnceAsync:(nonnull SPXDialogServiceConnectorRecognitionResultHandler)resultReceivedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Requests an immediate stop to any active listening operation. This may interrupt a speech-to-text interaction in
* progress and any speech-to-text result received may represent an incomplete speech input.
*
* Synchronous methods should not be called when handling an event. Use stopListeningAsync if a stop is desired in
* response to an event.
*
* @param outError error information.
* @return a value indicating whether a request to stop was received successfully. If NO, additional information may be
* available in outError.
*/
- (BOOL)stopListening:(NSError * _Nullable * _Nullable)outError;
/**
* Requests an immediate stop to any active listening operation. This may interrupt a speech-to-text interaction in
* progress and any speech-to-text result received may represent an incomplete speech input.
*
* Synchronous methods should not be called when handling an event. Use stopListeningAsync if a stop is desired in
* response to an event.
*/
- (void)stopListening
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Requests an immediate stop to any active listening operation. This may interrupt a speech-to-text interaction in
* progress and any speech-to-text result received may represent an incomplete speech input.
*
* @param completionHandler the handler function called when the stop request has completed.
* @param outError error information.
* @return a value indicating whether a request to stop was received successfully. If NO, additional information may be
* available in outError.
*/
- (BOOL)stopListeningAsync
:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Requests an immediate stop to any active listening operation. This may interrupt a speech-to-text interaction in
* progress and any speech-to-text result received may represent an incomplete speech input.
*
* @param completionHandler the handler function called when the stop request has completed.
*/
- (void)stopListeningAsync:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sends a data payload to dialog implementation that this DialogServiceConnector instance is connected to. This is
* usually a JSON document with its schema determined by the dialog implementation and the contents of a sent activity
* should be populated with knowledge about the format and content expectations of the dialog system.
*
* Sent activities are not associated with any other interaction and will generate their own standalone interaction
* identifier when processed by the service. Correlation of conversations and other interactions should be
* accomplished via the activity payload itself using the capabilities of the dialog implementation used.
*
* See also:
* <a href="https://github.com/microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md">Bot Framework -- Activity schema</a>,
* [Quickstart: Create a custom voice assistant](/azure/cognitive-services/speech-service/quickstarts/voice-assistants) (with sendActivity example)</a>
*
* @param activity the serialized payload of an activity to send.
* @param outError error information.
* @return an interaction identifier acquired when the activity is sent to the service. This may occur before the
* activity is processed and evaluated by the dialog implementation and the receipt of an interaction identifier does
* not indicate any success or failure in processing the activity. Information about success or failure may be obtained
* via response activities with correlation data or with TurnStatusReceived events that correlate to this interaction
* identifier.
*/
- (nullable NSString *)sendActivity
:(nonnull NSString *)activity
error:(NSError * _Nullable * _Nullable)outError;
/**
* Sends a data payload to dialog implementation that this DialogServiceConnector instance is connected to. This is
* usually a JSON document with its schema determined by the dialog implementation and the contents of a sent activity
* should be populated with knowledge about the format and content expectations of the dialog system.
*
* Sent activities are not associated with any other interaction and will generate their own standalone interaction
* identifier when processed by the service. Correlation of conversations and other interactions should be
* accomplished via the activity payload itself using the capabilities of the dialog implementation used.
*
* See also:
* <a href="https://github.com/microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md">Bot Framework -- Activity schema</a>,
* [Quickstart: Create a custom voice assistant](/azure/cognitive-services/speech-service/quickstarts/voice-assistants) (with sendActivity example)</a>
*
* @param activity the serialized payload of an activity to send.
* @return an interaction identifier acquired when the activity is sent to the service. This may occur before the
* activity is processed and evaluated by the dialog implementation and the receipt of an interaction identifier does
* not indicate any success or failure in processing the activity. Information about success or failure may be obtained
* via response activities with correlation data or with TurnStatusReceived events that correlate to this interaction
* identifier.
*/
- (nonnull NSString *)sendActivity:(nonnull NSString *)activity
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sends a data payload to dialog implementation that this DialogServiceConnector instance is connected to. This is
* usually a JSON document with its schema determined by the dialog implementation and the contents of a sent activity
* should be populated with knowledge about the format and content expectations of the dialog system.
*
* Sent activities are not associated with any other interaction and will generate their own standalone interaction
* identifier when processed by the service. Correlation of conversations and other interactions should be
* accomplished via the activity payload itself using the capabilities of the dialog implementation used.
*
* @param activity the serialized payload of an activity to send.
* @param interactionIdReceivedHandler a handler function called when the activity is sent to the service. This may occur
* before the activity is processed and evaluated by the dialog implementation and the receipt of an interaction
* identifier does not indicate any success or failure in processing the activity. Information about success or failure
* may be obtained via response activities with correlation data or with TurnStatusReceived events that correlate to
* this interaction identifier.
* @param outError error information.
* @return a value indicating whether the request to send an activity started successfully. If NO, additional
* information may be available in outError.
*/
- (BOOL)sendActivityAsync
:(NSString * _Nonnull)activity
interactionIdReceivedHandler:(nonnull SPXDialogServiceConnectorInteractionIdHandler)interactionIdReceivedHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Sends a data payload to dialog implementation that this DialogServiceConnector instance is connected to. This is
* usually a JSON document with its schema determined by the dialog implementation and the contents of a sent activity
* should be populated with knowledge about the format and content expectations of the dialog system.
*
* Sent activities are not associated with any other interaction and will generate their own standalone interaction
* identifier when processed by the service. Correlation of conversations and other interactions should be
* accomplished via the activity payload itself using the capabilities of the dialog implementation used.
*
* See also:
* <a href="https://github.com/microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md">Bot Framework -- Activity schema</a>,
* [Quickstart: Create a custom voice assistant](/azure/cognitive-services/speech-service/quickstarts/voice-assistants) (with sendActivityAsync example)</a>
*
* @param activity the serialized payload of an activity to send.
* @param interactionIdReceivedHandler a handler function called when the activity is sent to the service. This may occur
* before the activity is processed and evaluated by the dialog implementation and the receipt of an interaction
* identifier does not indicate any success or failure in processing the activity. Information about success or failure
* may be obtained via response activities with correlation data or with TurnStatusReceived events that correlate to
* this interaction identifier.
*/
- (void)sendActivityAsync
:(NSString * _Nonnull)activity
interactionIdReceivedHandler:(nonnull SPXDialogServiceConnectorInteractionIdHandler)interactionIdReceivedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Begins a speech-to-text interaction with this connector using a keyword. This interaction will use the provided
* keyword model to listen for a keyword indefinitely, during which audio is not sent to the speech service and all
* processing is performed locally. When a keyword is recognized, the DialogServiceConnector will automatically connect
* to the speech service and begin sending audio data from just before the keyword as if listenOnceAsync() were invoked.
* When received, speech-to-text results may be processed by the provided result handler or retrieved via a subscription
* to the recognized event. The speech-to-text result produced by this operation is also provided to the configured
* dialog implementation and that dialog system may produce any number of activity payloads in response to the speech
* interaction. Speech interactions may be correlated with activities via dialog-specific data in the activity payload.
*
* @param keywordModel the keyword recognition model.
* @param outError error information.
* @return a value indicating whether the requested keyword recognition successfully started. If NO, outError may
* contain additional information.
*/
- (BOOL)startKeywordRecognition
:(nonnull SPXKeywordRecognitionModel *)keywordModel
error:(NSError * _Nullable * _Nullable)outError;
/**
* Begins a speech-to-text interaction with this connector using a keyword. This interaction will use the provided
* keyword model to listen for a keyword indefinitely, during which audio is not sent to the speech service and all
* processing is performed locally. When a keyword is recognized, the DialogServiceConnector will automatically connect
* to the speech service and begin sending audio data from just before the keyword as if listenOnceAsync() were invoked.
* When received, speech-to-text results may be processed by the provided result handler or retrieved via a subscription
* to the recognized event. The speech-to-text result produced by this operation is also provided to the configured
* dialog implementation and that dialog system may produce any number of activity payloads in response to the speech
* interaction. Speech interactions may be correlated with activities via dialog-specific data in the activity payload.
*
* @param keywordModel the keyword recognition model.
*/
- (void)startKeywordRecognition:(nonnull SPXKeywordRecognitionModel *)keywordModel
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Asynchronously begins a speech-to-text interaction with this connector and immediately returns execution to the
* calling thread. This interaction will use the provided keyword model to listen for a keyword indefinitely, during
* which audio is not sent to the speech service and all processing is performed locally. When a keyword is recognized,
* the DialogServiceConnector will automatically connect to the speech service and begin sending audio data from just
* before the keyword as if listenOnceAsync() were invoked. When received, speech-to-text results may be processed by
* the provided result handler or retrieved via a subscription to the recognized event. The speech-to-text result
* produced by this operation is also provided to the configured dialog implementation and that dialog system may
* produce any number of activity payloads in response to the speech interaction. Speech interactions may be correlated
* with activities via dialog-specific data in the activity payload.
*
* @param keywordModel the keyword recognition model.
* @param completionHandler the handler function called when keyword recognition has started.
* @param outError error information.
* @return a value indicating whether the request to start keyword recognition was received successfully. If NO,
* additional information may available in outError.
*/
- (BOOL)startKeywordRecognitionAsync
:(nonnull SPXKeywordRecognitionModel *)keywordModel
completionHandler:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Asynchronously begins a speech-to-text interaction with this connector and immediately returns execution to the
* calling thread. This interaction will use the provided keyword model to listen for a keyword indefinitely, during
* which audio is not sent to the speech service and all processing is performed locally. When a keyword is recognized,
* the DialogServiceConnector will automatically connect to the speech service and begin sending audio data from just
* before the keyword as if listenOnceAsync() were invoked. When received, speech-to-text results may be processed by
* the provided result handler or retrieved via a subscription to the recognized event. The speech-to-text result
* produced by this operation is also provided to the configured dialog implementation and that dialog system may
* produce any number of activity payloads in response to the speech interaction. Speech interactions may be correlated
* with activities via dialog-specific data in the activity payload.
*
* @param keywordModel the keyword recognition model.
* @param completionHandler the handler function called when keyword recognition has started.
*/
- (void)startKeywordRecognitionAsync
:(nonnull SPXKeywordRecognitionModel *)keywordModel
completionHandler:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops any active keyword recognition.
*
* @param outError error information.
* @return a value indicating whether keyword recognition was stopped successfully. If NO, additional information may
* be available in outError.
*/
- (BOOL)stopKeywordRecognition:(NSError * _Nullable * _Nullable)outError;
/**
* Stops any active keyword recognition.
*/
- (void)stopKeywordRecognition
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops any active keyword recognition.
*
* @param completionHandler the handler function called when keyword recognition has stopped.
* @param outError error information.
* @return a value indicating whether the request to stop was received successfully. If NO, additional error
* information may be available in outError.
*/
- (BOOL)stopKeywordRecognitionAsync
:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Stops any active keyword recognition.
*
* @param completionHandler the handler function called when keyword recognition has stopped.
*/
- (void)stopKeywordRecognitionAsync:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Establishes a connection with the service. Connection is automatically performed when needed, but this manual call
* can be useful to make sure the connection is active before its first use to help reduce inital latency.
*
* Calling connect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling open(false). The Connection object also provides events to monitor
* connections and disconnections.
*
* @param outError error information.
* @return a value indicating whether connection was successful. If NO, additional information may be available in
* outError.
*/
- (BOOL)connect:(NSError * _Nullable * _Nullable)outError;
/**
* Establishes a connection with the service. Connection is automatically performed when needed, but this manual call
* can be useful to make sure the connection is active before its first use to help reduce inital latency.
*
* Calling connect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling open(false). The Connection object also provides events to monitor
* connections and disconnections.
*/
- (void)connect
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Establishes a connection with the service. Connection is automatically performed when needed, but this manual call
* can be useful to make sure the connection is active before its first use to help reduce inital latency.
*
* Calling connect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling open(false). The Connection object also provides events to monitor
* connections and disconnections.
*
* @param completionHandler the handler function called when connection is complete.
* @param outError error information.
* @return a value indicating whether the request to connect started successfully. If NO, additional information may
* be available in outError.
*/
- (BOOL)connectAsync
:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Establishes a connection with the service. Connection is automatically performed when needed, but this manual call
* can be useful to make sure the connection is active before its first use to help reduce inital latency.
*
* Calling connect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling open(false). The Connection object also provides events to monitor
* connections and disconnections.
*
* @param completionHandler the handler function called when connection is complete.
*/
- (void)connectAsync:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Disconnects from the service. Subsequent calls that require a connection will still automatically reconnect after
* manual disconnection.
*
* Calling disconnect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling close(). The Connection object also provides events to monitor
* connections and disconnections.
*
* @param outError error information.
* @return a value indicating whether disconnection was successful. If NO, additional information may be available in
* outError.
*/
- (BOOL)disconnect:(NSError * _Nullable * _Nullable)outError;
/**
* Disconnects from the service. Subsequent calls that require a connection will still automatically reconnect after
* manual disconnection.
*
* Calling disconnect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling close(). The Connection object also provides events to monitor
* connections and disconnections.
*/
- (void)disconnect
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Disconnects from the service. Subsequent calls that require a connection will still automatically reconnect after
* manual disconnection.
*
* Calling disconnect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling close(). The Connection object also provides events to monitor
* connections and disconnections.
*
* @param completionHandler the handler function called when disconnection is complete.
* @param outError error information.
* @return a value indicating whether the request to disconnect was received successfully. If NO, additional
* information may be available in outError.
*/
- (BOOL)disconnectAsync
:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Disconnects from the service. Subsequent calls that require a connection will still automatically reconnect after
* manual disconnection.
*
* Calling disconnect() on a DialogServiceConnector is functionally equivalent to initializing a Connection using
* initFromDialogServiceConnector and then calling close(). The Connection object also provides events to monitor
* connections and disconnections.
*
* @param completionHandler the handler function called when disconnection is complete.
*/
- (void)disconnectAsync:(nonnull SPXDialogServiceConnectorAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Registers a provided handler function to be called when a final speech-to-text-result is received by this
* DialogServiceConnector instance.
*/
- (void)addRecognizedEventHandler:(nonnull SPXDialogServiceConnectorRecognitionEventHandler)eventHandler;
/**
* Registers a provided handler function to be called when an intermediate speech-to-text-result is received by this
* DialogServiceConnector instance. A single speech-to-text interaction may receive many intermediate 'recognizing'
* results that correspond to a single, final 'recognized' result.
*/
- (void)addRecognizingEventHandler:(nonnull SPXDialogServiceConnectorRecognitionEventHandler)eventHandler;
/**
* Registers a provided handler function to be called when an interaction is abnormally terminated. This may happen for
* expected conditions, such as the end of provided file or audio stream input, or for unexpected error conditions.
* More information about the reason for the canceled event may be retrieved from the event data.
*/
- (void)addCanceledEventHandler:(nonnull SPXDialogServiceConnectorCanceledEventHandler)eventHandler;
/**
* Registers a provided handler function to be called when a turn status update is received from the dialog
* implementation that this DialogServiceConnector is connected to.
* A turn is a single execution session within the dialog implementation that may generate
* any number of activities over its course. The information in this payload represents success or failure conditions
* encountered by the dialog implementation over the course of this execution. This data facilitates the indication
* of completion or error conditions within the dialog implementation even when no explicit activity data is produced
* as part of a turn.
*/
- (void)addTurnStatusReceivedEventHandler
:(nonnull SPXDialogServiceConnectorTurnStatusReceivedEventHandler)eventHandler;
/**
* Registers a provided handler function to be called when an activity payload is received from the dialog
* implementation that this DialogServiceConnector is connected to. Activities may be sent by a dialog implementation
* at any time during a connection and there may be a many-to-one relationship between activities received and input,
* such as speech utterances, sent by this object.
*/
- (void)addActivityReceivedEventHandler:(nonnull SPXDialogServiceConnectorActivityReceivedEventHandler)eventHandler;
@end

40
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConnectorActivityReceivedEventArgs.h

@ -0,0 +1,40 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXAudioStream.h"
/**
* The object type that encapsulates the response data that originates from the dialog implementation used by a
* DialogServiceConnector. Activities may be sent by a dialog implementation at any time during a connection and there
* may be a many-to-one relationship between activities received and input utterances.
*/
SPX_EXPORT
@interface SPXDialogServiceConnectorActivityReceivedEventArgs : NSObject
/**
* Gets a serialized JSON object that represents the activity payload sent by the dialog implementation that a
* DialogServiceConnector communicates with. This data is originated from the dialog implementation and both the schema
* and contents of the document are determined by the sender.
*/
@property (copy, readonly, nonnull)NSString *activity;
/**
* Gets a value indicating whether this activity payload includes an audio stream from the text-to-speech service. If
* such a stream is present, it can be retrieved via the audio property.
*
* If there is no audio data associated with this activity payload, hasAudio will be false and audio will be nil.
*/
@property (readonly)bool hasAudio;
/**
* Gets a PullAudioOutputStream associated with this activity, as produced by the text-to-speech service. This stream
* is populated as data arrives and may not contain all synthesized audio when the activity arrives.
*
* If there is no audio data associated with this activity payload, hasAudio will be false and audio will be nil.
*/
@property (copy, readonly, nonnull)SPXPullAudioOutputStream *audio;
@end

39
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXDialogServiceConnectorTurnStatusReceivedEventArgs.h

@ -0,0 +1,39 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* The object type that encapsulates turn status information as received from the dialog implementation that a
* DialogServiceConnector communicates with. A turn is a single execution session within the dialog implementation that
* may generate any number of activities over its course. The information in this payload represents success or failure
* conditions encountered by the dialog implementation over the course of this execution. This data facilitates the
* indication of completion or error conditions within the dialog implementation even when no explicit activity data is
* produced as part of a turn.
*/
SPX_EXPORT
@interface SPXDialogServiceConnectorTurnStatusReceivedEventArgs : NSObject
/**
* The interaction identifier associated with this turn status event. Interaction identifiers generally correspond to a
* single input signal (e.g. a voice utterance or sent activity payload) and will correlate to replyTo fields within Bot
* Framework activities.
*/
@property (copy, readonly, nonnull)NSString *interactionId;
/**
* The conversation identifier associated with this turn status event. Conversations are logical groupings of turns that
* may span multiple interactions. A client can use a conversation identifier to resume or retry a conversation if such
* a capability is supported by the backing dialog implementation.
*/
@property (copy, readonly, nonnull)NSString *conversationId;
/**
* The numeric status code associated with this turn status event. These generally correspond to standard HTTP status
* codes such as 200 (OK), 400 (Failure/Bad Request), and 429 (Timeout/Throttled).
*/
@property (readonly)int statusCode;
@end

166
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXEmbeddedSpeechConfiguration.h

@ -0,0 +1,166 @@
///
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
#import "SPXSpeechRecognitionModelInfo.h"
#import "SPXSpeechTranslationModelInfo.h"
/**
* Class that defines embedded (offline) speech configuration.
*/
SPX_EXPORT
@interface SPXEmbeddedSpeechConfiguration : NSObject
/**
* The model name for speech recognition.
*/
@property (nonatomic, copy, nullable) NSString *speechRecognitionModelName;
/**
* The speech recognition output format.
*/
@property (nonatomic) SPXOutputFormat speechRecognitionOutputFormat;
/**
* The profanity option for speech recognition.
*/
@property (nonatomic) SPXSpeechConfigProfanityOption profanityOption;
/**
* The voice name for embedded speech synthesis.
*/
@property (nonatomic, copy, nullable) NSString *speechSynthesisVoiceName;
/**
* The model name for speech translation.
*/
@property (nonatomic, copy, nullable) NSString *speechTranslationModelName;
/**
* Available speech recognition models.
*/
@property (nonatomic, copy, readonly, nonnull) NSArray<SPXSpeechRecognitionModelInfo *> *speechRecognitionModelsInfo;
/**
* Available speech translation models.
*/
@property (nonatomic, copy, readonly, nonnull)NSArray<SPXSpeechTranslationModelInfo *> *speechTranslationModelsInfo;
/**
* Creates an instance of the embedded speech config with a specified offline model path.
*
* @param path The folder path to search for offline models.
* This can be a root path under which several models are located in subfolders,
* or a direct path to a specific model folder.
* @param outError The error information.
* @return An instance of the embedded speech config.
*/
- (nullable instancetype)initFromPath:(nonnull NSString *)path error:(NSError * _Nullable * _Nullable)outError;
/**
* Creates an instance of the embedded speech config with a specified offline model path.
*
* @param path The folder path to search for offline models.
* This can be a root path under which several models are located in subfolders,
* or a direct path to a specific model folder.
* @return An instance of the embedded speech config.
*/
- (nullable instancetype)initFromPath:(nonnull NSString *)path
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Creates an instance of the embedded speech config with specified offline model paths.
*
* @param paths The folder paths to search for offline models.
* These can be root paths under which several models are located in subfolders,
* or direct paths to specific model folders.
* @param outError The error information.
* @return An instance of the embedded speech config.
*/
- (nullable instancetype)initFromPaths:(nonnull NSArray<NSString *> *)paths error:(NSError * _Nullable * _Nullable)outError;
/**
* Creates an instance of the embedded speech config with specified offline model paths.
*
* @param paths The folder paths to search for offline models.
* These can be root paths under which several models are located in subfolders,
* or direct paths to specific model folders.
* @return An instance of the embedded speech config.
*/
- (nullable instancetype)initFromPaths:(nonnull NSArray<NSString *> *)paths
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Get the speech synthesis output format.
*/
- (nonnull NSString *)speechSynthesisOutputFormat;
/**
* Sets the speech synthesis output format (e.g. Riff16Khz16BitMonoPcm).
*
* @param format The speech synthesis output format.
*/
- (void)setSpeechSynthesisOutputFormat:(SPXSpeechSynthesisOutputFormat)format;
/**
* Sets the model for speech recognition.
*
* @param name The model name.
* @param license The license text.
*/
- (void)setSpeechRecognitionModel:(nonnull NSString *)name license:(nonnull NSString *)license;
/**
* Sets the voice for embedded speech synthesis.
*
* @param name The voice name of the embedded speech synthesis.
* @param license The license text.
*/
- (void)setSpeechSynthesisVoice:(nonnull NSString *)name license:(nonnull NSString *)license;
/**
* Sets the model for speech translation.
*
* @param name The model name.
* @param license The license text.
*/
- (void)setSpeechTranslationModel:(nonnull NSString *)name license:(nonnull NSString *)license;
/**
* Returns the property value.
* If the name is not available, it returns an empty string.
*
* @param name property name.
* @return value of the property.
*/
-(nullable NSString *)getPropertyByName:(nonnull NSString *)name;
/**
* Sets the property value by name.
*
* @param value value of the property.
* @param name property name.
*/
-(void)setPropertyTo:(nonnull NSString *)value byName:(nonnull NSString *)name;
/**
* Returns the property value.
* If the specified id is not available, it returns an empty string.
*
* @param propertyId property id.
* @return value of the property.
*/
-(nullable NSString *)getPropertyById:(SPXPropertyId)propertyId;
/**
* Sets the property value by property id.
*
* @param value value of the property.
* @param propertyId property id.
*/
-(void)setPropertyTo:(nonnull NSString *)value byId:(SPXPropertyId)propertyId;
@end

77
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXEventLogger.h

@ -0,0 +1,77 @@
///
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
/**
* Class with static methods to control callback-based SDK logging.
* Turning on logging while running your Speech SDK scenario provides
* detailed information from the SDK's core native components. If you
* report an issue to Microsoft, you may be asked to provide logs to help
* Microsoft diagnose the issue. Your application should not take dependency
* on particular log strings, as they may change from one SDK release to another
* without notice.
* Use SPXEventLogger when you want to get access to new log strings as soon
* as they are available, and you need to further process them. For example,
* integrating Speech SDK logs with your existing logging collection system.
* Added in version 1.43.0
*
* Event logging is a process wide construct. That means that if (for example)
* you have multiple speech recognizer objects running in parallel, you can only register
* one callback function to receive interleaved logs from all recognizers. You cannot register
* a separate callback for each recognizer.
*/
SPX_EXPORT
@interface SPXEventLogger : NSObject
typedef void (^SPXEventLoggerHandler)(NSString * _Nonnull);
/**
* Registers a callback function that will be invoked for each new log message.
*
* @param callback The callback function to call. Pass nil to stop the Event Logger.
* @param outError The error information.
* @remarks You can only register one callback function. This call will happen on a working thread of the SDK,
* so the log string should be copied somewhere for further processing by another thread, and the function should return immediately.
* No heavy processing or network calls should be done in this callback function.
*/
+ (void)setCallback:(nullable SPXEventLoggerHandler)callback error:(NSError * _Nullable * _Nullable)outError;
/**
* Registers a callback function that will be invoked for each new log message.
*
* @param callback The callback function to call. Pass nil to stop the Event Logger.
* @remarks You can only register one callback function. This call will happen on a working thread of the SDK,
* so the log string should be copied somewhere for further processing by another thread, and the function should return immediately.
* No heavy processing or network calls should be done in this callback function.
*/
+ (void)setCallback:(nullable SPXEventLoggerHandler)callback
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sets or clears the filters that apply to file logging.
*
* @param filters Filters to use, or nil or an empty list to remove previously set filters.
* @param outError The error information.
*/
+ (void)setFilters:(nullable NSArray<NSString *> *)filters error:(NSError * _Nullable * _Nullable)outError;
/**
* Sets or clears the filters that apply to file logging.
*
* @param filters Filters to use, or nil or an empty list to remove previously set filters.
*/
+ (void)setFilters:(nullable NSArray<NSString *> *)filters
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sets the level of the messages to be captured by the logger.
*
* @param level Maximum level of detail to be captured by the logger.
*/
+ (void)setLevel:(SPXLogLevel)level;
@end

99
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXFileLogger.h

@ -0,0 +1,99 @@
///
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
/**
* Class with static methods to control file-based SDK logging.
* Turning on logging while running your Speech SDK scenario provides
* detailed information from the SDK's core native components. If you
* report an issue to Microsoft, you may be asked to provide logs to help
* Microsoft diagnose the issue. Your application should not take dependency
* on particular log strings, as they may change from one SDK release to another
* without notice.
* SPXFileLogger is the simplest logging solution and suitable for diagnosing
* most on-device issues when running Speech SDK.
* Added in version 1.43.0
*
* File logging is a process wide construct. That means that if (for example)
* you have multiple speech recognizer objects running in parallel, there will be one
* log file containing interleaved logs lines from all recognizers. You cannot get a
* separate log file for each recognizer.
*/
SPX_EXPORT
@interface SPXFileLogger : NSObject
/**
* Starts logging to a file.
*
* @param path Path to a log file on local disk.
* @param append If true, appends to existing log file. If false, creates a new log file.
* @param outError The error information.
*/
+ (void)start:(nonnull NSString *)path append:(BOOL)append error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts logging to a file.
*
* @param path Path to a log file on local disk.
* @param append If true, appends to existing log file. If false, creates a new log file.
*/
+ (void)start:(nonnull NSString *)path append:(BOOL)append
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts logging to a file.
*
* @param path Path to a log file on local disk.
* @param outError The error information.
*/
+ (void)start:(nonnull NSString *)path error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts logging to a file.
*
* @param path Path to a log file on local disk.
*/
+ (void)start:(nonnull NSString *)path
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops logging to a file.
*
* @param outError The error information.
*/
+ (void)stop:(NSError * _Nullable * _Nullable)outError;
/**
* Stops logging to a file.
*/
+ (void)stop
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sets or clears the filters that apply to file logging.
*
* @param filters Filters to use, or nil or an empty list to remove previously set filters.
* @param outError The error information.
*/
+ (void)setFilters:(nullable NSArray<NSString *> *)filters error:(NSError * _Nullable * _Nullable)outError;
/**
* Sets or clears the filters that apply to file logging.
*
* @param filters Filters to use, or nil or an empty list to remove previously set filters.
*/
+ (void)setFilters:(nullable NSArray<NSString *> *)filters
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sets the level of the messages to be captured by the logger.
*
* @param level Maximum level of detail to be captured by the logger.
*/
+ (void)setLevel:(SPXLogLevel)level;
@end

9
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXFoundation.h

@ -0,0 +1,9 @@
///
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import <Foundation/Foundation.h>
#define SPX_EXPORT __attribute__((visibility ("default")))

17
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXGrammar.h

@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Represents base class grammar for customizing speech recognition.
*
* Added in version 1.5.0.
*/
SPX_EXPORT
@interface SPXGrammar : NSObject
@end

23
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXGrammarPhrase.h

@ -0,0 +1,23 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Represents a phrase that may be spoken by the user.
*
* Added in version 1.5.0.
*/
SPX_EXPORT
@interface SPXGrammarPhrase : NSObject
/**
* Initialize the phrase with a given text.
* @param value an utterance.
*/
-(nullable instancetype) initWithText:(nonnull NSString*)value;
@end

46
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXIntentRecognitionEventArgs.h

@ -0,0 +1,46 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXIntentRecognitionResult.h"
/**
* Defines the payload for intent recognizing/recognized events.
*/
SPX_EXPORT
@interface SPXIntentRecognitionEventArgs : SPXRecognitionEventArgs
/**
* Represents the intent recognition result.
*/
@property (readonly, nullable)SPXIntentRecognitionResult *result;
@end
/**
* Defines the payload of intent recognition canceled result events.
*/
SPX_EXPORT
@interface SPXIntentRecognitionCanceledEventArgs : SPXIntentRecognitionEventArgs
/**
* The reason the recognition was canceled.
*/
@property (readonly)SPXCancellationReason reason;
/**
* The error code in case of an unsuccessful recognition (reason is set to Error).
*
* Added in version 1.1.0.
*/
@property (readonly)SPXCancellationErrorCode errorCode;
/**
* The error message in case of an unsuccessful recognition (reason is set to Error).
*/
@property (copy, readonly, nullable)NSString *errorDetails;
@end

21
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXIntentRecognitionResult.h

@ -0,0 +1,21 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionResult.h"
/**
* Defines the result of intent recognition.
*/
SPX_EXPORT
@interface SPXIntentRecognitionResult : SPXRecognitionResult
/**
* A string that represents an intent identifier to be recognized.
*/
@property (copy, readonly, nullable)NSString *intentId;
@end

333
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXIntentRecognizer.h

@ -0,0 +1,333 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechConfiguration.h"
#import "SPXAudioConfiguration.h"
#import "SPXPropertyCollection.h"
#import "SPXRecognizer.h"
#import "SPXLanguageUnderstandingModel.h"
#import "SPXIntentRecognitionResult.h"
#import "SPXIntentRecognitionEventArgs.h"
/**
* Performs intent recognition on speech input. It returns both recognized text and recognized intent.
*/
SPX_EXPORT
@interface SPXIntentRecognizer : SPXRecognizer
typedef void (^SPXIntentRecognitionEventHandler)(SPXIntentRecognizer * _Nonnull, SPXIntentRecognitionEventArgs * _Nonnull);
typedef void (^SPXIntentRecognitionCanceledEventHandler)(SPXIntentRecognizer * _Nonnull, SPXIntentRecognitionCanceledEventArgs * _Nonnull);
typedef void (^SPXIntentRecognitionAsyncCompletionHandler)(void);
/**
* The authorization token used to communicate with the intent recognition service.
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token.
* Otherwise, the recognizer will encounter errors during recognition.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Initializes a new instance of intent recognizer using the specified speech configuration.
* @param speechConfiguration speech recognition configuration.
* @return an intent recognizer.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of intent recognizer using the specified speech configuration.
*
* Added in version 1.6.0.
*
* @param speechConfiguration speech recognition configuration.
* @param outError error information.
* @return an intent recognizer.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of an intent recognizer using the specified speech and audio configurations.
*
* @param speechConfiguration speech recognition configuration.
* @param audioConfiguration audio configuration.
* @return an intent recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of an intent recognizer using the specified speech and audio configurations.
*
* Added in version 1.6.0.
*
* @param speechConfiguration speech recognition configuration.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an intent recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a simple phrase that may be spoken by the user, indicating a specific user intent.
*
* @param simplePhrase The phrase corresponding to the intent.
*/
- (void)addIntentFromPhrase:(nonnull NSString *)simplePhrase;
/**
* Adds a simple phrase that may be spoken by the user, indicating a specific user intent, and maps it to the provided identifier.
*
* @param simplePhrase The phrase corresponding to the intent.
* @param intentId A custom id string to be returned in the SPXIntentRecognitionResult's getIntentId() method.
*/
- (void)addIntentFromPhrase:(nonnull NSString *)simplePhrase mappingToId:(nonnull NSString *)intentId;
/**
* Adds a single intent by name from the specified Language Understanding Model.
*
* @param intentName The name of the single intent to be included from the language understanding model.
* @param model The language understanding model containing the intent.
*/
- (void)addIntent:(nonnull NSString *)intentName fromModel:(nonnull SPXLanguageUnderstandingModel *)model;
/**
* Adds a single intent by name from the specified Language Understanding Model, and maps the intent name to the provided identifier.
*
* @param intentName The name of the single intent to be included from the language understanding model.
* @param model The language understanding model containing the intent.
* @param intentId A custom id string to be returned in the SPXIntentRecognitionResult's getIntentId() method.
*/
- (void)addIntent:(nonnull NSString *)intentName fromModel:(nonnull SPXLanguageUnderstandingModel *)model mappingToId:(nonnull NSString *)intentId;
/**
* Adds all intents from the specified Language Understanding Model.
*
* @param model The language understanding model containing the intents.
*/
- (void)addAllIntentsFromModel:(nonnull SPXLanguageUnderstandingModel *)model;
/**
* Adds all intents from the specified Language Understanding Model, and maps them to the provided identifier.
*
* @param model The language understanding model containing the intents.
* @param intentId A custom id string to be returned in the SPXIntentRecognitionResult's getIntentId() method.
*/
- (void)addAllIntentsFromModel:(nonnull SPXLanguageUnderstandingModel *)model mappingToId:(nonnull NSString *)intentId;
/**
* Starts intent recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
*
* Note: Since recognizeOnce() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognitionAsync() instead.
*
* @return the result of intent recognition.
*/
- (nonnull SPXIntentRecognitionResult *)recognizeOnce
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.") NS_RETURNS_RETAINED;
/**
* Starts intent recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
*
* Note: Since recognizeOnce() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognitionAsync() instead.
*
* Added in version 1.6.0.
*
* @param outError error information.
* @return the result of intent recognition.
*/
- (nullable SPXIntentRecognitionResult *)recognizeOnce:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Starts speech recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
*
* Note: Since recognizeOnceAsync() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognitionAsync() instead.
*
* @param resultReceivedHandler the block function to be called when the first utterance has been recognized.
*/
- (void)recognizeOnceAsync:(nonnull void (^)(SPXIntentRecognitionResult * _Nonnull)) resultReceivedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts speech recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
* Note: Since recognizeOnceAsync() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognitionAsync() instead.
*
* Added in version 1.6.0.
*
* @param resultReceivedHandler the block function to be called when the first utterance has been recognized.
* @param outError error information.
*/
- (BOOL)recognizeOnceAsync:(nonnull void (^)(SPXIntentRecognitionResult * _Nonnull)) resultReceivedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts speech recognition on a continuous audio stream, until stopContinuousRecognition() is called.
* User must subscribe to events to receive recognition results.
*/
- (void)startContinuousRecognition
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts speech recognition on a continuous audio stream, until stopContinuousRecognition() is called.
* User must subscribe to events to receive recognition results.
*
* Added in version 1.6.0.
*
* @param outError error information.
*/
- (BOOL)startContinuousRecognition:(NSError * _Nullable * _Nullable)outError;
/**
* Stops continuous intent recognition.
*/
- (void)stopContinuousRecognition
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops continuous intent recognition.
*
* Added in version 1.6.0.
*
* @param outError error information.
*/
- (BOOL)stopContinuousRecognition:(NSError * _Nullable * _Nullable)outError;
/**
* Begins a speech-to-text interaction with this recognizer using a keyword.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, IntentRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
* @param outError error information.
* @return a value indicating whether the requested keyword recognition successfully started. If NO, outError may
* contain additional information.
*/
- (BOOL)startKeywordRecognition
:(nonnull SPXKeywordRecognitionModel *)keywordModel
error:(NSError * _Nullable * _Nullable)outError;
/**
* Begins a speech-to-text interaction with this recognizer using a keyword.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, IntentRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
*/
- (void)startKeywordRecognition:(nonnull SPXKeywordRecognitionModel *)keywordModel
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Asynchronously begins a speech-to-text interaction with this recognizer
* and immediately returns execution to the calling thread.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, IntentRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
* @param completionHandler the handler function called when keyword recognition has started.
* @param outError error information.
* @return a value indicating whether the request to start keyword recognition was received successfully. If NO,
* additional information may available in outError.
*/
- (BOOL)startKeywordRecognitionAsync
:(nonnull SPXKeywordRecognitionModel *)keywordModel
completionHandler:(nonnull SPXIntentRecognitionAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Asynchronously begins a speech-to-text interaction with this recognizer
* and immediately returns execution to the calling thread.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, IntentRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
* @param completionHandler the handler function called when keyword recognition has started.
*/
- (void)startKeywordRecognitionAsync
:(nonnull SPXKeywordRecognitionModel *)keywordModel
completionHandler:(nonnull SPXIntentRecognitionAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops any active keyword recognition.
*
* @param outError error information.
* @return a value indicating whether keyword recognition was stopped successfully. If NO, additional information may
* be available in outError.
*/
- (BOOL)stopKeywordRecognition:(NSError * _Nullable * _Nullable)outError;
/**
* Stops any active keyword recognition.
*/
- (void)stopKeywordRecognition
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops any active keyword recognition.
*
* @param completionHandler the handler function called when keyword recognition has stopped.
* @param outError error information.
* @return a value indicating whether the request to stop was received successfully. If NO, additional error
* information may be available in outError.
*/
- (BOOL)stopKeywordRecognitionAsync
:(nonnull SPXIntentRecognitionAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Stops any active keyword recognition.
*
* @param completionHandler the handler function called when keyword recognition has stopped.
*/
- (void)stopKeywordRecognitionAsync:(nonnull SPXIntentRecognitionAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Subscribes to the Recognized event which indicates that a final result has been recognized.
*/
- (void)addRecognizedEventHandler:(nonnull SPXIntentRecognitionEventHandler)eventHandler;
/**
* Subscribes to the Recognizing event which indicates that an intermediate result has been recognized.
*/
- (void)addRecognizingEventHandler:(nonnull SPXIntentRecognitionEventHandler)eventHandler;
/**
* Subscribes to the Canceled event which indicates that an error occurred during recognition.
*/
- (void)addCanceledEventHandler:(nonnull SPXIntentRecognitionCanceledEventHandler)eventHandler;
@end

30
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognitionEventArgs.h

@ -0,0 +1,30 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXSpeechRecognitionEventArgs.h"
#import "SPXKeywordRecognitionResult.h"
/**
* Defines the payload for keyword recognizing/recognized events.
*/
SPX_EXPORT
@interface SPXKeywordRecognitionEventArgs : SPXRecognitionEventArgs
/**
* Represents the keyword recognition result.
*/
@property (readonly, nullable)SPXKeywordRecognitionResult *result;
@end
/**
* Defines the payload of keyword recognition canceled events.
*/
SPX_EXPORT
@interface SPXKeywordRecognitionCanceledEventArgs : SPXSpeechRecognitionCanceledEventArgs
@end

32
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognitionModel.h

@ -0,0 +1,32 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Represents keyword recognition model used with StartKeywordRecognitionAsync methods.
*/
SPX_EXPORT
@interface SPXKeywordRecognitionModel : NSObject
/**
* Creates a keyword recognition model using the specified file.
*
* @param fileName The file name of the keyword recognition model.
* @return an instance of keyword recognition model.
*/
- (nullable instancetype)initFromFile:(nonnull NSString *)fileName
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Creates a keyword recognition model using the specified file.
*
* @param fileName The file name of the keyword recognition model.
* @param outError error information.
* @return an instance of keyword recognition model.
*/
- (nullable instancetype)initFromFile:(nonnull NSString *)fileName error:(NSError * _Nullable * _Nullable)outError;
@end

15
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognitionResult.h

@ -0,0 +1,15 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionResult.h"
/**
* Defines the result of keyword recognition.
*/
SPX_EXPORT
@interface SPXKeywordRecognitionResult : SPXRecognitionResult
@end

101
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXKeywordRecognizer.h

@ -0,0 +1,101 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXAudioConfiguration.h"
#import "SPXPropertyCollection.h"
#import "SPXRecognizer.h"
#import "SPXKeywordRecognitionModel.h"
#import "SPXKeywordRecognitionResult.h"
#import "SPXKeywordRecognitionEventArgs.h"
/**
* Recognizer type that is specialized to only handle keyword activation.
*
* Added in version 1.15.0.
*
*/
SPX_EXPORT
@interface SPXKeywordRecognizer : NSObject
typedef void (^SPXKeywordRecognitionEventHandler)(SPXKeywordRecognizer * _Nonnull, SPXKeywordRecognitionEventArgs * _Nonnull);
typedef void (^SPXKeywordRecognitionCanceledEventHandler)(SPXKeywordRecognizer * _Nonnull, SPXKeywordRecognitionCanceledEventArgs * _Nonnull);
/**
* The collection of properties and their values defined for this SPXKeywordRecognizer.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
/**
* Initializes a new instance of keyword recognizer using the specified audio configuration.
*
* @param audioConfiguration audio configuration.
* @return an keyword recognizer.
*/
- (nullable instancetype)init:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of keyword recognizer using the specified audio configuration.
*
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an keyword recognizer.
*/
- (nullable instancetype)init:(nonnull SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts a keyword recognition session. This session will last until the first keyword is recognized.
* When this happens, a Recognized event will be raised and the session will end. To rearm the keyword,
* the method needs to be called again after the event is emitted.
*
* Note that if no keyword is detected in the input, the task will never resolve (unless stopRecognitionAsync method is called).
*
* @param resultReceivedHandler the block function to be called when the keyword has been recognized.
* @param keywordModel the keyword recognition model.
*/
- (void)recognizeOnceAsync:(nonnull void (^)(SPXKeywordRecognitionResult * _Nonnull)) resultReceivedHandler keywordModel:(nonnull SPXKeywordRecognitionModel *)keywordModel
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts a keyword recognition session. This session will last until the first keyword is recognized.
* When this happens, a Recognized event will be raised and the session will end. To rearm the keyword,
* the method needs to be called again after the event is emitted.
*
* Note that if no keyword is detected in the input, the task will never resolve (unless stopRecognitionAsync method is called).
*
* @param resultReceivedHandler the block function to be called when the keyword has been recognized.
* @param keywordModel the keyword recognition model.
* @param outError error information.
*/
- (BOOL)recognizeOnceAsync:(nonnull void (^)(SPXKeywordRecognitionResult * _Nonnull)) resultReceivedHandler keywordModel:(nonnull SPXKeywordRecognitionModel *)keywordModel error:(NSError * _Nullable * _Nullable)outError;
/**
* Stops a currently active keyword recognition session.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)stopRecognitionAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops a currently active keyword recognition session.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)stopRecognitionAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Subscribes to the Recognized event which indicates that a final result has been recognized.
*/
- (void)addRecognizedEventHandler:(nonnull SPXKeywordRecognitionEventHandler)eventHandler;
/**
* Subscribes to the Canceled event which indicates that an error occurred during recognition.
*/
- (void)addCanceledEventHandler:(nonnull SPXKeywordRecognitionCanceledEventHandler)eventHandler;
@end

44
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXLanguageUnderstandingModel.h

@ -0,0 +1,44 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Represents the language understanding model used for intent recognition.
*/
SPX_EXPORT
@interface SPXLanguageUnderstandingModel : NSObject
/**
* Initializes a language understanding model using the specified endpoint URL.
*
* The Speech SDK only supports LUIS v2.0 endpoints.
*
* For details, see [Quickstart: Recognize intents with the Speech service and LUIS](/azure/cognitive-services/Speech-Service/get-started-intent-recognition?pivots=programming-language-objectivec).
*
* @param uri the endpoint of the language understanding model.
* @return an instance of language understanding model.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)uri;
/**
* Initializes a language understanding model using an application id for the Language Understanding service.
*
* @param appId the application id for the Language Understanding service.
* @return an instance of language understanding model.
*/
- (nullable instancetype)initWithAppId:(nonnull NSString *)appId;
/**
* Initializes a language understanding model using a subscription key, application id and region for the Language Understanding service.
*
* @param key the subscription key for the Language Understanding service.
* @param appId the application id for the Language Understanding service.
* @param region the region for the Language Understanding service (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @return an instance of language understanding model.
*/
- (nullable instancetype)initWithSubscription:(nonnull NSString *)key withAppId:(nonnull NSString *)appId andRegion:(nonnull NSString *)region;
@end

327
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeeting.h

@ -0,0 +1,327 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXUser.h"
#import "SPXParticipant.h"
#import "SPXPropertyCollection.h"
#import "SPXSpeechConfiguration.h"
/**
* Performs meeting management including add and remove participants.
*/
SPX_EXPORT
@interface SPXMeeting : NSObject
/**
* The collection of properties and their values defined for this SPXMeeting.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
/**
* The unique identifier for the meeting.
*/
@property (nonatomic, copy, nullable)NSString *meetingId;
/**
* The authorization token used to communicate with the service.
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token. Otherwise, the recognizer will
* encounter errors during recognition.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Initializes a new instance of meeting using the specified speech configuration.
*
* @param speechConfiguration speech configuration.
* @return a meeting instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of meeting using the specified speech configuration and meeting id.
*
* @param speechConfiguration speech configuration.
* @param meetingId a unqiue identification of your meeting.
* @return a meeting instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration meetingId:(nonnull NSString *)meetingId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of meeting using the specified speech configuration and meeting id.
*
* @param speechConfiguration speech configuration.
* @param meetingId a unqiue identification of your meeting.
* @param outError error information.
* @return a meeting instance.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration meetingId:(nonnull NSString *)meetingId error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts a meeting, and provides asynchronous callback with the information is meeting started successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)startMeetingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts a meeting, and provides asynchronous callback with the information is meeting started successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)startMeetingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Ends a meeting, and provides asynchronous callback with the information is meeting ended successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)endMeetingAsync:(nonnull void (^)(BOOL ended, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Ends a meeting, and provides asynchronous callback with the information is meeting ended successfully or not.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)endMeetingAsync:(nonnull void (^)(BOOL ended, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Deletes a meeting, and provides asynchronous callback with the information is meeting deletion completed.
* After deleted, no one will be able to join the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)deleteMeetingAsync:(nonnull void (^)(BOOL deleted, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Deletes a meeting, and provides asynchronous callback with the information is meeting deletion completed.
* After deleted, no one will be able to join the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)deleteMeetingAsync:(nonnull void (^)(BOOL deleted, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Locks a meeting, and provides asynchronous callback with the information is meeting locking completed.
* After locked, new participants are prevented from joining the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)lockMeetingAsync:(nonnull void (^)(BOOL locked, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Locks a meeting, and provides asynchronous callback with the information is meeting locking completed.
* After locked, new participants are prevented from joining the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)lockMeetingAsync:(nonnull void (^)(BOOL locked, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Unlocks a meeting, and provides asynchronous callback with the information is meeting unlocking completed.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)unlockMeetingAsync:(nonnull void (^)(BOOL unlocked, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Unlocks a meeting, and provides asynchronous callback with the information is meeting unlocking completed.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)unlockMeetingAsync:(nonnull void (^)(BOOL unlocked, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Mute all other participants in the meeting. After this no other participants will have their speech recognitions broadcast,
* nor be able to send text messages.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)muteAllParticipantsAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Mute all other participants in the meeting. After this no other participants will have their speech recognitions broadcast,
* nor be able to send text messages.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)muteAllParticipantsAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Unmute all other participants in the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)unmuteAllParticipantsAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Unmute all other participants in the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)unmuteAllParticipantsAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Mute participant with a given userId in the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)muteParticipantAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Mute participant with a given userId in the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)muteParticipantAsync:(nonnull void (^)(BOOL muted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Unmute participant with a given userId in the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)unmuteParticipantAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Unmute participant with a given userId in the meeting.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)unmuteParticipantAsync:(nonnull void (^)(BOOL unmuted, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a participant from a meeting using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Adds a participant from a meeting using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a participant from a meeting using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
*/
- (void)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Adds a participant from a meeting using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
* @param outError error information.
*/
- (BOOL)addParticipantAsync:(nonnull void (^)(SPXParticipant * _Nullable, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a participant from a meeting using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
*/
- (void)addParticipantAsync:(nonnull void (^)(SPXUser * _Nullable, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Adds a participant from a meeting using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
* @param outError error information.
*/
- (BOOL)addParticipantAsync:(nonnull void (^)(SPXUser * _Nullable, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user error:(NSError * _Nullable * _Nullable)outError;
/**
* Remove a participant from a meeting using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
*/
- (void)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Remove a participant from a meeting using a user id.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param userId A user identifier.
* @param outError error information.
*/
- (BOOL)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler userId:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
/**
* Remove a participant from a meeting using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
*/
- (void)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Remove a participant from a meeting using a Participant object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param participant A Participant instance.
* @param outError error information.
*/
- (BOOL)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler participant:(nonnull SPXParticipant *)participant error:(NSError * _Nullable * _Nullable)outError;
/**
* Remove a participant from a meeting using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
*/
- (void)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Remove a participant from a meeting using a User object.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param user A User instance.
* @param outError error information.
*/
- (BOOL)removeParticipantAsync:(nonnull void (^)(BOOL removed, NSError * _Nullable))completedHandler user:(nonnull SPXUser *)user error:(NSError * _Nullable * _Nullable)outError;
@end

153
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeetingTranscriber.h

@ -0,0 +1,153 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechConfiguration.h"
#import "SPXAudioConfiguration.h"
#import "SPXPropertyCollection.h"
#import "SPXRecognizer.h"
#import "SPXMeeting.h"
#import "SPXMeetingTranscriptionResult.h"
#import "SPXMeetingTranscriptionEventArgs.h"
/**
* Performs meeting transcribing for audio input streams, and gets transcribed text and user id as a result.
*/
SPX_EXPORT
@interface SPXMeetingTranscriber : SPXRecognizer
typedef void (^SPXMeetingTranscriptionEventHandler)(SPXMeetingTranscriber * _Nonnull, SPXMeetingTranscriptionEventArgs * _Nonnull);
typedef void (^SPXMeetingTranscriptionCanceledEventHandler)(SPXMeetingTranscriber * _Nonnull, SPXMeetingTranscriptionCanceledEventArgs * _Nonnull);
/**
* The authorization token used to communicate with the meeting transcription service.
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token.
* Otherwise, the recognizer will encounter errors during recognition.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Initializes a new instance of a meeting transcriber using the default configuration.
* @return a meeting transcriber instance.
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability"
- (nullable instancetype)init
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
#pragma clang diagnostic pop
/**
* Initializes a new instance of a meeting transcriber using the default configuration.
*
* @param outError error information.
* @return a meeting transcriber instance.
*/
- (nullable instancetype)init:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of a meeting transcriber using the specified audio configuration.
*
* @param audioConfiguration audio configuration.
* @return a meeting transcriber instance.
*/
- (nullable instancetype)initWithAudioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of a meeting transcriber using the specified audio configuration.
*
* @param audioConfiguration audio configuration.
* @return a meeting transcriber instance.
*/
- (nullable instancetype)initWithAudioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Join a meeting.
* A meeting transcriber must join a meeting before transcribing audio.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param meeting speech configuration.
*/
- (void)joinMeetingAsync:(nonnull void (^)(BOOL joined, NSError * _Nullable))completedHandler meeting:(nonnull SPXMeeting *)meeting
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Join a meeting.
* A meeting transcriber must join a meeting before transcribing audio.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param meeting speech configuration.
* @param outError error information.
*/
- (BOOL)joinMeetingAsync:(nonnull void (^)(BOOL joined, NSError * _Nullable))completedHandler meeting:(nonnull SPXMeeting *)meeting error:(NSError * _Nullable * _Nullable)outError;
/**
* Leave a meeting.
* After leaving a meeting, no transcribing and transcribed events will be sent out.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)leaveMeetingAsync:(nonnull void (^)(BOOL left, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Leave a meeting.
* After leaving a meeting, no transcribing and transcribed events will be sent out.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)leaveMeetingAsync:(nonnull void (^)(BOOL left, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts meeting transcribing on a continuous audio stream, until stopTranscribingAsync() is called.
* User must subscribe to events to receive transcription results.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)startTranscribingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts meeting transcribing on a continuous audio stream, until stopTranscribingAsync() is called.
* User must subscribe to events to receive transcription results.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)startTranscribingAsync:(nonnull void (^)(BOOL started, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Stops meeting transcribing.
*
* @param completedHandler the block function to be called when async operation has been completed.
*/
- (void)stopTranscribingAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops meeting transcribing.
*
* @param completedHandler the block function to be called when async operation has been completed.
* @param outError error information.
*/
- (BOOL)stopTranscribingAsync:(nonnull void (^)(BOOL stopped, NSError * _Nullable))completedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Subscribes to the Transcribed event which indicates that a final result has been transcribed.
*/
- (void)addTranscribedEventHandler:(nonnull SPXMeetingTranscriptionEventHandler)eventHandler;
/**
* Subscribes to the Transcribing event which indicates an that intermediate result has been transcribed.
*/
- (void)addTranscribingEventHandler:(nonnull SPXMeetingTranscriptionEventHandler)eventHandler;
/**
* Subscribes to the Canceled event which indicates that an error occurred during transcription.
*/
- (void)addCanceledEventHandler:(nonnull SPXMeetingTranscriptionCanceledEventHandler)eventHandler;
@end

45
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeetingTranscriptionEventArgs.h

@ -0,0 +1,45 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXMeetingTranscriptionResult.h"
/**
* Defines the payload for meeting transcription events.
*/
SPX_EXPORT
@interface SPXMeetingTranscriptionEventArgs : SPXRecognitionEventArgs
/**
* Represents the meeting transcription result.
*/
@property (readonly, nullable)SPXMeetingTranscriptionResult *result;
@end
/**
* Defines the payload of meeting transcription canceled result events.
*/
SPX_EXPORT
@interface SPXMeetingTranscriptionCanceledEventArgs : SPXMeetingTranscriptionEventArgs
/**
* The reason the trancription was canceled.
*/
@property (readonly)SPXCancellationReason reason;
/**
* The error code in case of an unsuccessful transcription (reason is set to Error).
*
*/
@property (readonly)SPXCancellationErrorCode errorCode;
/**
* The error message in case of an unsuccessful transcription (reason is set to Error).
*/
@property (copy, readonly, nullable)NSString *errorDetails;
@end

25
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMeetingTranscriptionResult.h

@ -0,0 +1,25 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionResult.h"
/**
* Defines the result of meeting transcription.
*/
SPX_EXPORT
@interface SPXMeetingTranscriptionResult : SPXRecognitionResult
/**
* A string that represents an user identifier in the meeting.
*/
@property (copy, readonly, nullable)NSString *userId;
/**
* A string that represents the utterance. This id is consistence for intermediates and final speech recognition result from one speaker.
*/
@property (copy, readonly, nullable)NSString *utteranceId;
@end

127
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXMemoryLogger.h

@ -0,0 +1,127 @@
///
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
/**
* Class with static methods to control SDK logging into an in-memory buffer.
* Turning on logging while running your Speech SDK scenario provides
* detailed information from the SDK's core native components. If you
* report an issue to Microsoft, you may be asked to provide logs to help
* Microsoft diagnose the issue. Your application should not take dependency
* on particular log strings, as they may change from one SDK release to another
* without notice.
* SPXMemoryLogger is designed for the case where you want to get access to logs
* that were taken in the short duration before some unexpected event happens.
* For example, if you are running a Speech Recognizer, you may want to dump the SPXMemoryLogger
* after getting an event indicating recognition was canceled due to some error.
* The size of the memory buffer is fixed at 2MB and cannot be changed. This is
* a "ring" buffer, that is, new log strings written replace the oldest ones
* in the buffer.
* Added in version 1.43.0
*
* Memory logging is a process wide construct. That means that if (for example)
* you have multiple speech recognizer objects running in parallel, there will be one
* memory buffer containing interleaved logs from all recognizers. You cannot get a
* separate logs for each recognizer.
*/
SPX_EXPORT
@interface SPXMemoryLogger : NSObject
/**
* Starts logging into the internal memory buffer.
*/
+ (void)start;
/**
* Stops logging into the internal memory buffer.
*/
+ (void)stop;
/**
* Sets or clears the filters that apply to file logging.
*
* @param filters Filters to use, or nil or an empty list to remove previously set filters.
* @param outError The error information.
*/
+ (void)setFilters:(nullable NSArray<NSString *> *)filters error:(NSError * _Nullable * _Nullable)outError;
/**
* Sets or clears the filters that apply to file logging.
*
* @param filters Filters to use, or nil or an empty list to remove previously set filters.
*/
+ (void)setFilters:(nullable NSArray<NSString *> *)filters
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Writes the content of the whole memory buffer to the specified file.
* It does not block other SDK threads from continuing to log into the buffer.
*
* @param path Path to a log file on local disk.
* @remarks This does not reset (clear) the memory buffer.
*/
+ (void)dumpToFile:(nonnull NSString *)path
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Writes the content of the whole memory buffer to the specified file.
* It does not block other SDK threads from continuing to log into the buffer.
*
* @param path Path to a log file on local disk.
* @param outError The error information.
* @remarks This does not reset (clear) the memory buffer.
*/
+ (void)dumpToFile:(nonnull NSString *)path error:(NSError * _Nullable * _Nullable)outError;
/**
* Writes the content of the whole memory buffer to the specified output stream.
* It does not block other SDK threads from continuing to log into the buffer.
*
* @param outputStream The output stream to write to.
* @remarks This does not reset (clear) the memory buffer.
*/
+ (void)dumpToOutputStream:(nonnull NSOutputStream *)outputStream
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Writes the content of the whole memory buffer to the specified output stream.
* It does not block other SDK threads from continuing to log into the buffer.
*
* @param outputStream The output stream to write to.
* @param outError The error information.
* @remarks This does not reset (clear) the memory buffer.
*/
+ (void)dumpToOutputStream:(nonnull NSOutputStream *)outputStream error:(NSError * _Nullable * _Nullable)outError;
/**
* Returns the content of the whole memory buffer as an array of strings.
* It does not block other SDK threads from continuing to log into the buffer.
*
* @returns An array with the contents of the memory buffer copied into it.
* @remarks This does not reset (clear) the memory buffer.
*/
+ (nullable NSArray<NSString *> *)dumpToNSArray
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Returns the content of the whole memory buffer as an array of strings.
* It does not block other SDK threads from continuing to log into the buffer.
*
* @returns An array with the contents of the memory buffer copied into it.
* @param outError The error information.
* @remarks This does not reset (clear) the memory buffer.
*/
+ (nullable NSArray<NSString *> *)dumpToNSArray:(NSError * _Nullable * _Nullable)outError;
/**
* Sets the level of the messages to be captured by the logger.
*
* @param level Maximum level of detail to be captured by the logger.
*/
+ (void)setLevel:(SPXLogLevel)level;
@end

126
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXParticipant.h

@ -0,0 +1,126 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXPropertyCollection.h"
/**
* Represents a participant in a conversation transcribing session.
*
* Added in version 1.13.0.
*/
SPX_EXPORT
@interface SPXParticipant : NSObject
/**
* The collection of properties and their values defined for this SPXParticipant.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
/**
* The unique identifier for the participant.
*/
@property (nonatomic, copy, nullable)NSString *id;
/**
* The user's avatar as an HTML hex string (e.g. FF0000 for red).
*/
@property (nonatomic, copy, nullable)NSString *avatar;
/**
* The participant's display name. Please note that each participant within the same conversation must
* have a different display name. Duplicate names within the same conversation are not allowed. You can
* use the id property as another way to refer to each participant.
*/
@property (nonatomic, copy, nullable)NSString *displayName;
/**
* The participant's preferred spoken language.
*/
@property (nonatomic, copy, nullable)NSString *preferredLanguage;
/**
* The participant's voice signature.
*/
@property (nonatomic, copy, nullable)NSString *voiceSignature;
/**
* Provides information is Participant muted.
*/
@property (nonatomic, readonly)BOOL isMuted;
/**
* Provides information is participant using Text To Speech (TTS).
*/
@property (nonatomic, readonly)BOOL isUsingTts;
/**
* Provides information is participant host.
*/
@property (nonatomic, readonly)BOOL isHost;
/**
* Create a Participant using user id, her/his preferred language and her/his voice signature.
* If voice signature is empty then user will not be identified.
*
* @param userId user's Id.
* @param preferredLanguage users' preferred language.
* @param voiceSignature user's voice signature.
* @return The Participant object.
*/
- (nullable instancetype)initFrom:(nonnull NSString *)userId preferredLanguage:(nonnull NSString *)preferredLanguage voiceSignature:(nonnull NSString *)voiceSignature
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Create a Participant using user id, her/his preferred language and her/his voice signature.
* If voice signature is empty then user will not be identified.
*
* @param userId user's Id.
* @param preferredLanguage users' preferred language.
* @param voiceSignature user's voice signature.
* @return The Participant object.
* @param outError error information.
*/
- (nullable instancetype)initFrom:(nonnull NSString *)userId preferredLanguage:(nonnull NSString *)preferredLanguage voiceSignature:(nonnull NSString *)voiceSignature error:(NSError * _Nullable * _Nullable)outError;
/**
* Create a Participant using user id and her/his preferred language.
*
* @param userId user's Id.
* @param preferredLanguage users' preferred language.
* @return The Participant object.
*/
- (nullable instancetype)initFrom:(nonnull NSString *)userId preferredLanguage:(nonnull NSString *)preferredLanguage
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Create a Participant using user id and her/his preferred language.
*
* @param userId user's Id.
* @param preferredLanguage users' preferred language.
* @return The Participant object.
* @param outError error information.
*/
- (nullable instancetype)initFrom:(nonnull NSString *)userId preferredLanguage:(nonnull NSString *)preferredLanguage error:(NSError * _Nullable * _Nullable)outError;
/**
* Create a Participant using user id.
*
* @param userId user's Id.
* @return The Participant object.
*/
- (nullable instancetype)initFrom:(nonnull NSString *)userId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Create a Participant using user id.
*
* @param userId user's Id.
* @return The Participant object.
* @param outError error information.
*/
- (nullable instancetype)initFrom:(nonnull NSString *)userId error:(NSError * _Nullable * _Nullable)outError;
@end

38
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPhraseListGrammar.h

@ -0,0 +1,38 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXGrammar.h"
#import "SPXRecognizer.h"
/**
* Represents a phrase list grammar for dynamic grammar scenarios.
*
* Added in version 1.5.0.
*/
SPX_EXPORT
@interface SPXPhraseListGrammar : SPXGrammar
/**
* Creates a phrase list grammar for the specified recognizer.
*
* @param recognizer The recognizer from which to obtain the phrase list grammar.
* @return a phrase list grammar instance.
*/
-(nullable instancetype)initWithRecognizer:(nonnull SPXRecognizer *)recognizer;
/**
* Adds a simple phrase that may be spoken by the user.
*
* @param phrase The phrase to be added.
*/
-(void)addPhrase:(nonnull NSString *)phrase;
/**
* Clears all phrases from the phrase list grammar.
*/
-(void)clear;
@end

192
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPronunciationAssessmentConfiguration.h

@ -0,0 +1,192 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
#import "SPXRecognizer.h"
/**
* Represents pronunciation assessment configuration
* Added in version 1.14.0
*/
SPX_EXPORT
@interface SPXPronunciationAssessmentConfiguration : NSObject
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration.
* For parameter details, see the table
* [Pronunciation assessment parameters](/azure/cognitive-services/speech-service/rest-speech-to-text-short#pronunciation-assessment-parameters).
*
* @param referenceText The reference text.
* @param gradingSystem The point system for score calibration.
* @param granularity The evaluation granularity.
* @param enableMiscue If enables miscue calculation. When true, the pronounced words are compared to the reference text, and are marked with omission/insertion based on the comparison; when false, the recognized text will always be reference text.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity
enableMiscue:(BOOL)enableMiscue
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration.
* For parameter details, see the table
* [Pronunciation assessment parameters](/azure/cognitive-services/speech-service/rest-speech-to-text-short#pronunciation-assessment-parameters).
*
* @param referenceText The reference text.
* @param gradingSystem The point system for score calibration.
* @param granularity The evaluation granularity.
* @param enableMiscue If enables miscue calculation.
* @param outError error information.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity
enableMiscue:(BOOL)enableMiscue
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration.
* For parameter details, see the table
* [Pronunciation assessment parameters](/azure/cognitive-services/speech-service/rest-speech-to-text-short#pronunciation-assessment-parameters).
*
* @param referenceText The reference text.
* @param gradingSystem The point system for score calibration.
* @param granularity The evaluation granularity.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration.
* For parameter details, see the table
* [Pronunciation assessment parameters](/azure/cognitive-services/speech-service/rest-speech-to-text-short#pronunciation-assessment-parameters).
*
* @param referenceText The reference text.
* @param gradingSystem The point system for score calibration.
* @param granularity The evaluation granularity.
* @param outError error information.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration.
* For parameter details, see the table
* [Pronunciation assessment parameters](/azure/cognitive-services/speech-service/rest-speech-to-text-short#pronunciation-assessment-parameters).
*
* @param referenceText The reference text.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)referenceText
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration.
* For parameter details, see the table
* [Pronunciation assessment parameters](/azure/cognitive-services/speech-service/rest-speech-to-text-short#pronunciation-assessment-parameters).
*
* @param referenceText The reference text.
* @param outError error information.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)referenceText
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration using json string.
*
* @param json the json string.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)initWithJson:(nonnull NSString *)json
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the SPXPronunciationAssessmentConfiguration using json string.
*
* @param json the json string.
* @param outError error information.
*
* @return an instance of pronunciation assessment configuration.
*/
- (nullable instancetype)initWithJson:(nonnull NSString *)json
error:(NSError * _Nullable * _Nullable)outError;
/**
* The reference text.
*/
@property (nonatomic, copy, nullable)NSString *referenceText;
/**
* The phoneme alphabet. Valid values are "SAPI" (default) and "IPA".
*
* NOTE: Added in version 1.20.0
*/
@property (nonatomic, copy, nullable)NSString *phonemeAlphabet;
- (nullable NSString *)phonemeAlphabet UNAVAILABLE_ATTRIBUTE;
/**
* The nbest phoneme count.
*
* NOTE: Added in version 1.20.0
*/
@property (nonatomic)NSInteger nbestPhonemeCount;
- (NSInteger)nbestPhonemeCount UNAVAILABLE_ATTRIBUTE;
/**
* Whether to enable prosoody assessment.
*
* Added in version 1.33.0.
*/
- (void)enableProsodyAssessment;
/**
* Enables content assessment with specific topic.
*
* Added in version 1.33.0.
*/
- (void)enableContentAssessmentWithTopic:(nonnull NSString *)topic;
/**
* Gets the json string of pronunciation assessment parameters.
*
* @return json string of pronunciation assessment parameters.
*/
- (nullable NSString *)toJson;
/**
* Applies the settings in this config to a recognizer.
*
* @param recognizer The target recognizer.
*/
- (void)applyToRecognizer:(nonnull SPXRecognizer *)recognizer
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Applies the settings in this config to a recognizer.
*
* @param recognizer The target recognizer.
* @param outError error information.
*/
- (BOOL)applyToRecognizer:(nonnull SPXRecognizer *)recognizer error:(NSError * _Nullable * _Nullable)outError;
@end

93
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPronunciationAssessmentResult.h

@ -0,0 +1,93 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechRecognitionResult.h"
#import "SPXTimingResult.h"
/**
* Represents content assessment result
* Added in version 1.33.0
*/
SPX_EXPORT
@interface SPXContentAssessmentResult : NSObject
/**
* The grammar score.
*/
@property (readonly) double grammarScore;
/**
* The vocabulary score.
*/
@property (readonly) double vocabularyScore;
/**
* The topic score.
*/
@property (readonly) double topicScore;
@end
/**
* Represents pronunciation assessment result
* Added in version 1.14.0
*/
SPX_EXPORT
@interface SPXPronunciationAssessmentResult : NSObject
/**
* The pronunciation accuracy of the given speech, which indicates
* how closely the phonemes match a native speaker's pronunciation.
*/
@property (readonly) double accuracyScore;
/**
* The overall score indicating the pronunciation quality of the given speech.
* This is calculated from AccuracyScore, FluencyScore and CompletenessScore with weight.
*/
@property (readonly)double pronunciationScore;
/**
* The score indicating the completeness of the given speech by calculating the ratio of pronounced words towards entire input.
*/
@property (readonly)double completenessScore;
/**
* The score indicating the fluency of the given speech.
*/
@property (readonly)double fluencyScore;
/**
* The prosody score.
*/
@property (readonly)double prosodyScore;
/**
* The content assessment result.
* Only available when content assessment is enabled.
*/
@property (nonatomic, retain, nullable) SPXContentAssessmentResult *contentAssessmentResult;
/**
* Word level pronunciation assessment results.
*
* Added in version 1.21.0
*/
@property (nonatomic, retain, nullable) NSArray<SPXWordLevelTimingResult *> *words;
/**
* Initializes an SPXPronunciationAssessmentResult object using SPXSpeechRecognitionResult.
*
* @param speechRecognitionResult the speech recognition result
*
* @return an instance of auto detection source language result.
*/
- (nullable instancetype)init:(nonnull SPXSpeechRecognitionResult *)speechRecognitionResult;
@end

69
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXPropertyCollection.h

@ -0,0 +1,69 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
/**
* Represents a collection of properties and their values.
*/
@protocol SPXPropertyCollection
/**
* Returns the property value.
* If the name is not available, it returns an empty string.
*
* @param name property name.
* @return value of the property.
*/
-(nullable NSString *)getPropertyByName:(nonnull NSString *)name;
/**
* Returns the property value.
* If the name is not available, it returns the specified default value.
*
* @param name property name.
* @param defaultValue default value which is returned if the property is not available in the collection.
* @return value of the property.
*/
-(nullable NSString *)getPropertyByName:(nonnull NSString *)name defaultValue:(nonnull NSString *)defaultValue;
/**
* Returns the property value.
* If the specified id is not available, it returns an empty string.
*
* @param propertyId property id.
* @return value of the property.
*/
-(nullable NSString *)getPropertyById:(SPXPropertyId)propertyId;
/**
* Returns the property value.
* If the specified id is not available, it returns the specified default value.
*
* @param propertyId property id.
* @param defaultValue default value which is returned if the property is not available in the collection.
* @return value of the property.
*/
-(nullable NSString *)getPropertyById:(SPXPropertyId)propertyId defaultValue:(nonnull NSString *)defaultValue;
@optional
/**
* Sets the property value by name.
*
* @param name property name.
* @param value value of the property.
*/
-(void)setPropertyTo:(nonnull NSString *)value byName:(nonnull NSString *)name;
/**
* Sets the property value by property id.
*
* @param propertyId property id.
* @param value value of the property.
*/
-(void)setPropertyTo:(nonnull NSString *)value byId:(SPXPropertyId)propertyId;
@end

21
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXRecognitionEventArgs.h

@ -0,0 +1,21 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSessionEventArgs.h"
/**
* Defines the payload for SpeechStartDetected and SpeechEndDetected events.
*/
SPX_EXPORT
@interface SPXRecognitionEventArgs : SPXSessionEventArgs
/**
* Represents the message offset in ticks.
* A single tick represents one hundred nanoseconds or one ten-millionth of a second.
*/
@property (readonly)uint64_t offset;
@end

134
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXRecognitionResult.h

@ -0,0 +1,134 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
#import "SPXPropertyCollection.h"
/**
* Represents the recognition result base class.
*/
SPX_EXPORT
@interface SPXRecognitionResult : NSObject
/**
* The result identifier.
*/
@property (copy, readonly, nonnull)NSString *resultId;
/**
* The reason the result was created.
*/
@property (readonly)SPXResultReason reason;
/**
* The recognized text in the result.
*/
@property (copy, readonly, nullable)NSString *text;
/**
* Duration of recognized speech in ticks.
* A single tick represents one hundred nanoseconds or one ten-millionth of a second.
*/
@property (readonly)uint64_t duration;
/**
* Offset of recognized speech in milliseconds.
* A single tick represents one hundred nanoseconds or one ten-millionth of a second.
*/
@property (readonly)uint64_t offset;
/**
* Index of the input audio channel where the speech was recognized.
* Numbering starts at zero.
*/
@property (readonly)uint32_t channel;
/**
* The set of properties exposed in the result.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
@end
/**
* Defines detailed information about why a result was canceled.
*/
SPX_EXPORT
@interface SPXCancellationDetails : NSObject
/**
* The reason the recognition was canceled.
*/
@property (readonly)SPXCancellationReason reason;
/**
* The error code in case of an unsuccessful recognition (reason is set to Error).
*
* Added in version 1.1.0.
*/
@property (readonly)SPXCancellationErrorCode errorCode;
/**
* The error message in case of an unsuccessful recognition (reason is set to Error).
*/
@property (copy, readonly, nullable)NSString *errorDetails;
/**
* Creates an instance of SPXCancellationDetails object for the canceled SPXSpeechRecognitionResult.
*
* @param recognitionResult The result that was canceled.
* @return The cancellation details object being created.
*/
-(nullable instancetype)initFromCanceledRecognitionResult:(nonnull SPXRecognitionResult *)recognitionResult
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Creates an instance of SPXCancellationDetails object for the canceled SPXSpeechRecognitionResult.
*
* Added in version 1.6.0.
*
* @param recognitionResult The result that was canceled.
* @param outError error information.
* @return The cancellation details object being created.
*/
-(nullable instancetype)initFromCanceledRecognitionResult:(nonnull SPXRecognitionResult *)recognitionResult error:(NSError * _Nullable * _Nullable)outError;
@end
/**
* Defines detailed information for NoMatch recognition results.
*/
SPX_EXPORT
@interface SPXNoMatchDetails : NSObject
/**
* The reason why NoMatch is returned.
*/
@property (readonly)SPXNoMatchReason reason;
/**
* Initializes an instance of SPXNoMatchDetails object from a NoMatch result.
*
* @param recognitionResult recognition result that has NoMatch returned in Reason.
* @return an SPXNoMatchDetails instance.
*/
-(nullable instancetype)initFromNoMatchRecognitionResult:(nonnull SPXRecognitionResult *)recognitionResult
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of SPXNoMatchDetails object from a NoMatch result.
*
* Added in version 1.6.0.
*
* @param recognitionResult recognition result that has NoMatch returned in Reason.
* @param outError error information.
* @return an SPXNoMatchDetails instance.
*/
-(nullable instancetype)initFromNoMatchRecognitionResult:(nonnull SPXRecognitionResult *)recognitionResult error:(NSError * _Nullable * _Nullable)outError;
@end

54
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXRecognizer.h

@ -0,0 +1,54 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSessionEventArgs.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXPropertyCollection.h"
/**
* Defines the base class SPXRecognizer which mainly contains common event handlers.
*/
SPX_EXPORT
@interface SPXRecognizer : NSObject
typedef void (^SPXSessionEventHandler)(SPXRecognizer * _Nonnull, SPXSessionEventArgs * _Nonnull);
typedef void (^SPXRecognitionEventHandler)(SPXRecognizer * _Nonnull, SPXRecognitionEventArgs * _Nonnull);
/**
* The collection of properties and their values defined for this SPXRecognizer.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
/**
* Subscribes to the SessionStarted event using the specified handler.
*
* @param eventHandler the handler function for this event.
*/
- (void)addSessionStartedEventHandler:(nonnull SPXSessionEventHandler)eventHandler;
/**
* Subscribes to the SessionStopped event using the specified handler.
*
* @param eventHandler the handler function for this event.
*/
- (void)addSessionStoppedEventHandler:(nonnull SPXSessionEventHandler)eventHandler;
/**
* Subscribes to the SpeechStartDetected event using the specified handler.
*
* @param eventHandler the handler function for this event.
*/
- (void)addSpeechStartDetectedEventHandler:(nonnull SPXRecognitionEventHandler)eventHandler;
/**
* Subscribes to SpeechEndDetected event using the specified handler.
*
* @param eventHandler the handler function for this event.
*/
- (void)addSpeechEndDetectedEventHandler:(nonnull SPXRecognitionEventHandler)eventHandler;
@end

19
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSessionEventArgs.h

@ -0,0 +1,19 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Defines the payload for SessionStarted/SessionStopped events.
*/
SPX_EXPORT
@interface SPXSessionEventArgs : NSObject
/**
* The session identifier.
*/
@property (copy, readonly, nonnull)NSString *sessionId;
@end

59
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSourceLanguageConfiguration.h

@ -0,0 +1,59 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Represents source language configuration, allowing specifying the source language and customized endpoint
* Added in version 1.12.0
*/
SPX_EXPORT
@interface SPXSourceLanguageConfiguration : NSObject
/**
* Initializes an SPXSourceLanguageConfiguration object using the language.
*
* @param language value of the language.
*
* @return an instance of source language configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)language
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXSourceLanguageConfiguration object using the language.
*
* @param language value of the language.
* @param outError error information.
*
* @return an instance of source language configuration.
*/
- (nullable instancetype)init:(nonnull NSString *)language error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an SPXSourceLanguageConfiguration object using the language and corresponding endpoint id
*
* @param language value of the language.
* @param endpointId id of the customized endpoint, will be used to recognize the audio in the source language.
*
* @return an instance of source language configuration.
*/
- (nullable instancetype)initWithLanguage:(nonnull NSString *)language endpointId:(nonnull NSString *)endpointId
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an SPXSourceLanguageConfiguration object using the language and corresponding endpoint id
*
* @param language value of the language.
* @param endpointId id of the customized endpoint, will be used to recognize the audio in the source language.
* @param outError error information.
*
* @return an instance of source language configuration.
*/
- (nullable instancetype)initWithLanguage:(nonnull NSString *)language
endpointId:(nonnull NSString *)endpointId
error:(NSError * _Nullable * _Nullable)outError;
@end

71
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechApi.h

@ -0,0 +1,71 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXAudioConfiguration.h"
#import "SPXAudioDataStream.h"
#import "SPXAudioProcessingOptions.h"
#import "SPXAudioStream.h"
#import "SPXAudioStreamFormat.h"
#import "SPXAutoDetectSourceLanguageConfiguration.h"
#import "SPXAutoDetectSourceLanguageResult.h"
#import "SPXConnection.h"
#import "SPXConnectionEventArgs.h"
#import "SPXConversation.h"
#import "SPXConversationEventArgs.h"
#import "SPXConversationTranscriber.h"
#import "SPXConversationTranscriptionEventArgs.h"
#import "SPXConversationTranscriptionResult.h"
#import "SPXConversationTranslationEventArgs.h"
#import "SPXConversationTranslationResult.h"
#import "SPXConversationTranslator.h"
#import "SPXDialogServiceConfiguration.h"
#import "SPXDialogServiceConnector.h"
#import "SPXDialogServiceConnectorActivityReceivedEventArgs.h"
#import "SPXDialogServiceConnectorTurnStatusReceivedEventArgs.h"
#import "SPXEventLogger.h"
#import "SPXEmbeddedSpeechConfiguration.h"
#import "SPXFileLogger.h"
#import "SPXGrammar.h"
#import "SPXGrammarPhrase.h"
#import "SPXIntentRecognitionEventArgs.h"
#import "SPXIntentRecognitionResult.h"
#import "SPXIntentRecognizer.h"
#import "SPXLanguageUnderstandingModel.h"
#import "SPXMeeting.h"
#import "SPXMeetingTranscriber.h"
#import "SPXMeetingTranscriptionEventArgs.h"
#import "SPXMeetingTranscriptionResult.h"
#import "SPXMemoryLogger.h"
#import "SPXKeywordRecognitionEventArgs.h"
#import "SPXKeywordRecognitionResult.h"
#import "SPXKeywordRecognizer.h"
#import "SPXKeywordRecognitionModel.h"
#import "SPXParticipant.h"
#import "SPXPhraseListGrammar.h"
#import "SPXPronunciationAssessmentConfiguration.h"
#import "SPXPronunciationAssessmentResult.h"
#import "SPXPropertyCollection.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXRecognitionResult.h"
#import "SPXRecognizer.h"
#import "SPXSessionEventArgs.h"
#import "SPXSpeechConfiguration.h"
#import "SPXSpeechRecognitionEventArgs.h"
#import "SPXSpeechRecognitionModelInfo.h"
#import "SPXSpeechRecognitionResult.h"
#import "SPXSpeechRecognizer.h"
#import "SPXSpeechSynthesisCancellationDetails.h"
#import "SPXSpeechSynthesisEventArgs.h"
#import "SPXSpeechSynthesizer.h"
#import "SPXSpeechTranslationConfiguration.h"
#import "SPXSpeechTranslationModelInfo.h"
#import "SPXSourceLanguageConfiguration.h"
#import "SPXTranslationRecognitionEventArgs.h"
#import "SPXTranslationRecognitionResult.h"
#import "SPXTranslationRecognizer.h"
#import "SPXTranslationSynthesisEventArgs.h"
#import "SPXTranslationSynthesisResult.h"
#import "SPXUser.h"
#import "SPXTimingResult.h"

402
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechConfiguration.h

@ -0,0 +1,402 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXPropertyCollection.h"
/**
* Defines configurations for speech or intent recognition.
*/
SPX_EXPORT
@interface SPXSpeechConfiguration : NSObject
/**
* Tag of speech recognition language, using BCP-47 format.
*/
@property (nonatomic, copy, nullable)NSString *speechRecognitionLanguage;
/**
* Endpoint ID of a customized speech model that is used for speech recognition, or a custom voice model for speech synthesis.
*/
@property (nonatomic, copy, nullable)NSString *endpointId;
/**
* The output format of the speech recognition result.
*
* Note: This output format is for speech recognition result, use SPXSpeechConfiguration.speechSynthesisOutputFormat
* and SPXSpeechConfiguration.setSpeechSynthesisOutputFormat to get/set the systhesized audio output format.
*/
@property (nonatomic)SPXOutputFormat outputFormat;
/**
* Authorization token.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token
* expires, the caller needs to refresh it by calling this setter with a new valid token.
* As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created.
* For recognizers that have been created before, you need to set authorization token of the corresponding recognizer
* to refresh the token. Otherwise, the recognizers will encounter errors during recognition.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Subscription key.
*/
@property (nonatomic, copy, readonly, nullable)NSString *subscriptionKey;
/**
* Region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
*/
@property (nonatomic, copy, readonly, nullable)NSString *region;
/**
* Speech synthesis language.
*
* Added in version 1.7.0
*/
@property (nonatomic, copy, nullable)NSString *speechSynthesisLanguage;
/**
* Speech synthesis voice.
*
* Added in version 1.7.0
*/
@property (nonatomic, copy, nullable)NSString *speechSynthesisVoiceName;
/**
* Speech synthesis optput format.
*
* Added in version 1.7.0
*/
@property (nonatomic, copy, readonly, nullable)NSString* speechSynthesisOutputFormat;
/**
* Initializes an instance of a speech configuration with the specified subscription key and service region.
*
* Added in version 1.6.0.
*
* @param subscriptionKey the subscription key to be used.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @param outError error information.
* @return a speech configuration instance.
*/
- (nullable instancetype)initWithSubscription:(nonnull NSString *)subscriptionKey region:(nonnull NSString *)region error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of a speech configuration with the specified subscription key and service region.
*
* @param subscriptionKey the subscription key to be used.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @return a speech configuration instance.
*/
- (nullable instancetype)initWithSubscription:(nonnull NSString *)subscriptionKey region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of a speech configuration with specified authorization token and service region.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token
* expires, the caller needs to refresh it by calling this setter with a new valid token.
* As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created.
* For recognizers that have been created before, you need to set authorization token of the corresponding recognizer
* to refresh the token. Otherwise, the recognizers will encounter errors during recognition.
*
* @param authToken the authorization token.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @return a speech configuration instance.
*/
- (nullable instancetype)initWithAuthorizationToken:(nonnull NSString *)authToken region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of a speech configuration with specified authorization token and service region.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token
* expires, the caller needs to refresh it by calling this setter with a new valid token.
* As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created.
* For recognizers that have been created before, you need to set authorization token of the corresponding recognizer
* to refresh the token. Otherwise, the recognizers will encounter errors during recognition.
*
* Added in version 1.6.0.
*
* @param authToken the authorization token.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @param outError error information.
* @return a speech configuration instance.
*/
- (nullable instancetype)initWithAuthorizationToken:(nonnull NSString *)authToken region:(nonnull NSString *)region error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of the speech configuration with specified endpoint and subscription key.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* Whether a specific query parameter is supported or not, depends on the endpoint and scenario.
* For example, if the recognition language is defined in the URI as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SPXSpeechConfiguration, the language setting in the URI takes precedence, and the effective language is "de-DE".
* The example only applies when the endpoint and scenario combination supports language as a query parameter.
* Only the parameters that are not specified in the endpoint URI can be set by other APIs.
*
* Note: To use an authorization token, use initWithEndpoint, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* @param endpointUri The service endpoint to connect to.
* @param subscriptionKey the subscription key.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri subscription:(nonnull NSString *)subscriptionKey
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the speech configuration with specified endpoint and subscription key.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* For example, if the recognition language is defined in the URI as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SPXSpeechConfiguration, the language setting in the URI takes precedence, and the effective language is "de-DE".
* Only the parameters that are not specified in the endpoint URI can be set by other APIs.
*
* Note: To use an authorization token, use initWithEndpoint, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* Added in version 1.5.0.
*
* @param endpointUri The service endpoint to connect to.
* @param subscriptionKey the subscription key.
* @param outError error information.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri subscription:(nonnull NSString *)subscriptionKey error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of the speech configuration with specified endpoint.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* For example, if the recognition language is defined in the uri as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SpeechConfiguration, the language setting in the uri takes precedence, and the effective language is "de-DE".
* Only the parameters that are not specified in the endpoint URL can be set by other APIs.
*
* Note: if the endpoint requires a subscription key for authentication, please use initWithEndpoint:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SpeechConfig instance, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* Added in version 1.6.0.
*
* @param endpointUri The service endpoint to connect to.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the speech configuration with specified endpoint.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* For example, if the recognition language is defined in the uri as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SpeechConfiguration, the language setting in the uri takes precedence, and the effective language is "de-DE".
* Only the parameters that are not specified in the endpoint URL can be set by other APIs.
*
* Note: if the endpoint requires a subscription key for authentication, please use initWithEndpoint:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SpeechConfig instance, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* Added in version 1.6.0.
*
* @param endpointUri The service endpoint to connect to.
* @param outError error information.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of the speech configuration with specified host and subscription key.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: To use an authorization token, use initWithHost, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @param subscriptionKey The subscription key.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri subscription:(nonnull NSString *)subscriptionKey
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the speech configuration with specified host and subscription key.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: To use an authorization token, use initWithHost, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @param subscriptionKey The subscription key.
* @param outError Error information.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri subscription:(nonnull NSString *)subscriptionKey error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes an instance of the speech configuration with specified host.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: If the host requires a subscription key for authentication, use initWithHost:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SpeechConfig instance, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes an instance of the speech configuration with specified host.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: If the host requires a subscription key for authentication, use initWithHost:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SpeechConfig instance, and then set the authorizationToken property on the created SPXSpeechConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @param outError Error information.
* @return A speech configuration instance.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri error:(NSError * _Nullable * _Nullable)outError;
/**
* Sets proxy configuration
*
* Added in version 1.1.0
*
* Note: Proxy functionality is not available on iOS and macOS. This function will have no effect on these platforms.
*
* @param proxyHostName the host name of the proxy server, without the protocol scheme (http://)
* @param proxyPort the port number of the proxy server.
* @param proxyUserName the user name of the proxy server. Use empty string if no user name is needed.
* @param proxyPassword the password of the proxy server. Use empty string if no user password is needed.
*/
-(void)setProxyUsingHost:(nonnull NSString *)proxyHostName Port:(uint32_t)proxyPort UserName:(nullable NSString *)proxyUserName Password:(nullable NSString *)proxyPassword
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Sets proxy configuration
*
* Note: Proxy functionality is not available on iOS and macOS. This function will have no effect on these platforms.
*
* Added in version 1.6.0
*
* @param proxyHostName the host name of the proxy server, without the protocol scheme (http://)
* @param proxyPort the port number of the proxy server.
* @param proxyUserName the user name of the proxy server. Use empty string if no user name is needed.
* @param proxyPassword the password of the proxy server. Use empty string if no user password is needed.
* @param outError error information.
*/
-(BOOL)setProxyUsingHost:(nonnull NSString *)proxyHostName Port:(uint32_t)proxyPort UserName:(nullable NSString *)proxyUserName Password:(nullable NSString *)proxyPassword error:(NSError * _Nullable * _Nullable)outError;
/**
* Returns the property value.
* If the name is not available, it returns an empty string.
*
* @param name property name.
* @return value of the property.
*/
-(nullable NSString *)getPropertyByName:(nonnull NSString *)name;
/**
* Sets the property value by name.
*
* @param name property name.
* @param value value of the property.
*/
-(void)setPropertyTo:(nonnull NSString *)value byName:(nonnull NSString *)name;
/**
* Returns the property value.
* If the specified id is not available, it returns an empty string.
*
* @param propertyId property id.
* @return value of the property.
*/
-(nullable NSString *)getPropertyById:(SPXPropertyId)propertyId;
/**
* Sets the property value by property id.
*
* @param propertyId property id.
* @param value value of the property.
*/
-(void)setPropertyTo:(nonnull NSString *)value byId:(SPXPropertyId)propertyId;
/**
* Sets a property value that will be passed to service using the specified channel.
*
* Added in version 1.5.0.
*
* @param name the property name.
* @param value the property value.
* @param channel the channel used to pass the specified property to service.
*/
-(void)setServicePropertyTo:(nonnull NSString *)value byName:(nonnull NSString*)name usingChannel:(SPXServicePropertyChannel)channel;
/**
* Sets profanity option.
*
* Added in version 1.5.0.
*
* @param profanity Profanity option value.
*/
-(void)setProfanityOptionTo:(SPXSpeechConfigProfanityOption)profanity;
/**
* Set the speech synthesis audio output format (e.g. Riff16Khz16BitMonoPcm).
*
* Added in version 1.7.0
*
* @param formatId output format id.
*/
-(void)setSpeechSynthesisOutputFormat:(SPXSpeechSynthesisOutputFormat)formatId;
/**
* Enables audio logging in service.
* Audio and content logs are stored either in Microsoft-owned storage, or in your own storage account linked
* to your Cognitive Services subscription (Bring Your Own Storage (BYOS) enabled Speech resource).
* Added in version 1.5.0.
*
*/
-(void)enableAudioLogging;
/**
* Includes word-level timestamps in response result.
*
* Added in version 1.5.0.
*/
-(void)requestWordLevelTimestamps;
/**
* Enables dictation mode. Only supported in speech continuous recognition.
*
* Added in version 1.5.0.
*/
-(void)enableDictation;
@end

1320
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechEnums.h

File diff suppressed because it is too large

47
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognitionEventArgs.h

@ -0,0 +1,47 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXSpeechRecognitionResult.h"
/**
* Defines the payload of speech recognizing/recognized event.
*/
SPX_EXPORT
@interface SPXSpeechRecognitionEventArgs : SPXRecognitionEventArgs
/**
* The recognition result.
*/
@property (readonly, nonnull)SPXSpeechRecognitionResult *result;
@end
/**
* Defines the payload of speech recognition canceled events.
*/
SPX_EXPORT
@interface SPXSpeechRecognitionCanceledEventArgs : SPXSpeechRecognitionEventArgs
/**
* The reason why the recognition was canceled.
*/
@property (readonly)SPXCancellationReason reason;
/**
* The error code in case of an unsuccessful recognition (reason is set to Error).
*
* Added in version 1.1.0.
*/
@property (readonly)SPXCancellationErrorCode errorCode;
/**
* The error message in case of an unsuccessful recognition (reason is set to Error).
*/
@property (copy, readonly, nullable)NSString *errorDetails;
@end

48
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognitionModelInfo.h

@ -0,0 +1,48 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Speech recognition model information.
*/
SPX_EXPORT
@interface SPXSpeechRecognitionModelInfo : NSObject
/**
* Model name.
*/
@property (nonatomic, copy, readonly, nullable) NSString *name;
/**
* Locales of the model in BCP-47 format.
*/
@property (nonatomic, copy, readonly, nullable) NSArray<NSString *> *locales;
/**
* Model path (only valid for offline models).
*/
@property (nonatomic, copy, readonly, nullable) NSString *path;
/**
* Model version.
*/
@property (nonatomic, copy, readonly, nullable) NSString *version;
/**
* Initialize a new instance of SPXSpeechRecognitionModelInfo.
*
* @param name The model name.
* @param locales The locales of the model in BCP-47 format.
* @param path The model path (only valid for offline models).
* @param version The model version.
* @return A new instance of SPXSpeechRecognitionModelInfo.
*/
- (nullable instancetype)initWithName:(nonnull NSString *)name
locales:(nonnull NSArray<NSString *> *)locales
path:(nullable NSString *)path
version:(nonnull NSString *)version;
@end

17
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognitionResult.h

@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionResult.h"
/**
* Defines the result of speech recognition.
* Currently no additional properties and methods, besides those from SPXRecognitionResult.
*/
SPX_EXPORT
@interface SPXSpeechRecognitionResult : SPXRecognitionResult
@end

556
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechRecognizer.h

@ -0,0 +1,556 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXAudioConfiguration.h"
#import "SPXAutoDetectSourceLanguageConfiguration.h"
#import "SPXSourceLanguageConfiguration.h"
#import "SPXSpeechConfiguration.h"
#import "SPXSpeechRecognizer.h"
#import "SPXSpeechRecognitionResult.h"
#import "SPXSpeechRecognitionEventArgs.h"
#import "SPXEmbeddedSpeechConfiguration.h"
/**
* Performs speech recognition on the specified audio input, and gets transcribed text as result.
*/
SPX_EXPORT
@interface SPXSpeechRecognizer : SPXRecognizer
typedef void (^SPXSpeechRecognitionEventHandler)(SPXSpeechRecognizer * _Nonnull, SPXSpeechRecognitionEventArgs * _Nonnull);
typedef void (^SPXSpeechRecognitionCanceledEventHandler)(SPXSpeechRecognizer * _Nonnull, SPXSpeechRecognitionCanceledEventArgs * _Nonnull);
typedef void (^SPXSpeechRecognitionAsyncCompletionHandler)(void);
/**
* Authorization token used to communicate with the speech recognition service.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token.
* Otherwise, the recognizer will encounter errors during recognition.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Endpoint ID of a customized speech model that is used for speech recognition.
*/
@property (nonatomic, copy, readonly, nullable)NSString *endpointId;
/**
* Initializes a new instance of speech recognizer.
*
* @param speechConfiguration speech recognition configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer.
*
* Added in version 1.6.0.
*
* @param speechConfiguration speech recognition configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer.
*
* @param speechConfiguration embedded speech recognition configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer.
*
* @param speechConfiguration embedded speech recognition configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified audio config.
*
* @param speechConfiguration speech recognition configuration.
* @param audioConfiguration audio configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified audio config.
*
* Added in version 1.6.0.
* @param speechConfiguration speech recognition configuration.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified audio config.
*
* @param speechConfiguration embedded speech recognition configuration.
* @param audioConfiguration audio configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified audio config.
*
* @param speechConfiguration embedded speech recognition configuration.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified source language.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param language source language.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration language:(nonnull NSString *)language
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified source language.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param language source language.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
language:(nonnull NSString *)language
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified source language and audio configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param language source language.
* @param audioConfiguration audio configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
language:(nonnull NSString *)language
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified source language and audio configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param language source language.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
language:(nonnull NSString *)language
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified source language configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param sourceLanguageConfiguration the source language configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified source language configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param sourceLanguageConfiguration the source language configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified source language configuration and audio configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param sourceLanguageConfiguration the source language configuration.
* @param audioConfiguration audio configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified source language configuration and audio configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param sourceLanguageConfiguration the source language configuration.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
sourceLanguageConfiguration:(nonnull SPXSourceLanguageConfiguration *)sourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection.
*
* @param speechConfiguration embedded speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection.
*
* @param speechConfiguration embedded speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection and audio configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection and audio configuration.
*
* Added in version 1.12.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection and audio configuration.
*
* @param speechConfiguration embedded speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech recognizer using the specified configuration for auto language detection and audio configuration.
*
* @param speechConfiguration embedded speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech recognizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nonnull SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts speech recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
*
* Note: Since recognizeOnceAsync() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognition() instead.
*
* @return the result of speech recognition.
*/
- (nonnull SPXSpeechRecognitionResult *)recognizeOnce
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.") NS_RETURNS_RETAINED;
/**
* Starts speech recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
*
* Note: Since recognizeOnceAsync() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognition() instead.
*
* Added in version 1.6.0.
*
* @param outError error information.
* @return the result of speech recognition.
*/
- (nullable SPXSpeechRecognitionResult *)recognizeOnce:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Starts speech recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
*
* Note: Since recognizeOnceAsync() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognition() instead.
*
* @param resultReceivedHandler the block function to be called when the first utterance has been recognized.
*/
- (void)recognizeOnceAsync:(nonnull void (^)(SPXSpeechRecognitionResult * _Nonnull))resultReceivedHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts speech recognition, and returns after a single utterance is recognized. The end of a
* single utterance is determined by listening for silence at the end or until a maximum of about 30
* seconds of audio is processed. The task returns the recognition text as result.
*
* Note: Since recognizeOnceAsync() returns only a single utterance, it is suitable only for single
* shot recognition like command or query.
* For long-running multi-utterance recognition, use startContinuousRecognition() instead.
*
* Added in version 1.6.0.
*
* @param resultReceivedHandler the block function to be called when the first utterance has been recognized.
* @param outError error information.
*/
- (BOOL)recognizeOnceAsync:(nonnull void (^)(SPXSpeechRecognitionResult * _Nonnull))resultReceivedHandler error:(NSError * _Nullable * _Nullable)outError;
/**
* Starts speech recognition on a continuous audio stream, until stopContinuousRecognition() is called.
* User must subscribe to events to receive recognition results.
*/
- (void)startContinuousRecognition
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Starts speech recognition on a continuous audio stream, until stopContinuousRecognition() is called.
* User must subscribe to events to receive recognition results.
*
* Added in version 1.6.0.
*
* @param outError error information.
*/
- (BOOL)startContinuousRecognition:(NSError * _Nullable * _Nullable)outError;
/**
* Stops continuous speech recognition.
*/
- (void)stopContinuousRecognition
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops continuous speech recognition.
*
* Added in version 1.6.0.
*
* @param outError error information.
*/
- (BOOL)stopContinuousRecognition:(NSError * _Nullable * _Nullable)outError;
/**
* Begins a speech-to-text interaction with this recognizer using a keyword.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, SpeechRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
* @param outError error information.
* @return a value indicating whether the requested keyword recognition successfully started. If NO, outError may
* contain additional information.
*/
- (BOOL)startKeywordRecognition
:(nonnull SPXKeywordRecognitionModel *)keywordModel
error:(NSError * _Nullable * _Nullable)outError;
/**
* Begins a speech-to-text interaction with this recognizer using a keyword.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, SpeechRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
*/
- (void)startKeywordRecognition:(nonnull SPXKeywordRecognitionModel *)keywordModel
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Asynchronously begins a speech-to-text interaction with this recognizer
* and immediately returns execution to the calling thread.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, SpeechRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
* @param completionHandler the handler function called when keyword recognition has started.
* @param outError error information.
* @return a value indicating whether the request to start keyword recognition was received successfully. If NO,
* additional information may available in outError.
*/
- (BOOL)startKeywordRecognitionAsync
:(nonnull SPXKeywordRecognitionModel *)keywordModel
completionHandler:(nonnull SPXSpeechRecognitionAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Asynchronously begins a speech-to-text interaction with this recognizer
* and immediately returns execution to the calling thread.
* This interaction will use the provided keyword model to listen for a keyword indefinitely,
* during which audio is not sent to the speech service and all processing is performed locally.
* When a keyword is recognized, SpeechRecognizer will automatically connect to the speech service
* and begin sending audio data from just before the keyword.
* When received, speech-to-text results may be processed by the provided result handler
* or retrieved via a subscription to the recognized event.
*
* @param keywordModel the keyword recognition model.
* @param completionHandler the handler function called when keyword recognition has started.
*/
- (void)startKeywordRecognitionAsync
:(nonnull SPXKeywordRecognitionModel *)keywordModel
completionHandler:(nonnull SPXSpeechRecognitionAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops any active keyword recognition.
*
* @param outError error information.
* @return a value indicating whether keyword recognition was stopped successfully. If NO, additional information may
* be available in outError.
*/
- (BOOL)stopKeywordRecognition:(NSError * _Nullable * _Nullable)outError;
/**
* Stops any active keyword recognition.
*/
- (void)stopKeywordRecognition
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops any active keyword recognition.
*
* @param completionHandler the handler function called when keyword recognition has stopped.
* @param outError error information.
* @return a value indicating whether the request to stop was received successfully. If NO, additional error
* information may be available in outError.
*/
- (BOOL)stopKeywordRecognitionAsync
:(nonnull SPXSpeechRecognitionAsyncCompletionHandler)completionHandler
error:(NSError * _Nullable * _Nullable)outError;
/**
* Stops any active keyword recognition.
*
* @param completionHandler the handler function called when keyword recognition has stopped.
*/
- (void)stopKeywordRecognitionAsync:(nonnull SPXSpeechRecognitionAsyncCompletionHandler)completionHandler
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Subscribes to the Recognized event which indicates that a final result has been recognized.
*/
- (void)addRecognizedEventHandler:(nonnull SPXSpeechRecognitionEventHandler)eventHandler;
/**
* Subscribes to the Recognizing event which indicates that an intermediate result has been recognized.
*/
- (void)addRecognizingEventHandler:(nonnull SPXSpeechRecognitionEventHandler)eventHandler;
/**
* Subscribes to the Canceled event which indicates that an error occurred during recognition.
*/
- (void)addCanceledEventHandler:(nonnull SPXSpeechRecognitionCanceledEventHandler)eventHandler;
@end

71
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesisCancellationDetails.h

@ -0,0 +1,71 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
#import "SPXSpeechSynthesisResult.h"
#import "SPXAudioDataStream.h"
/**
* Defines detailed information about why a speech synthesis result was canceled.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXSpeechSynthesisCancellationDetails : NSObject
/**
* The reason the synthesis was canceled.
*/
@property (readonly)SPXCancellationReason reason;
/**
* The error message in case of an unsuccessful synthesis (reason is set to Error). If reason is not an error, errorCode returns NoErro.
*/
@property (readonly)SPXCancellationErrorCode errorCode;
/**
* The error message in case of an unsuccessful synthesis (reason is set to Error).
*/
@property (copy, readonly, nullable)NSString *errorDetails;
/**
* Creates an instance of SPXSpeechSynthesisCancellationDetails object for the canceled SPXSpeechSynthesisResult.
*
* @param synthesisResult the synthesis result that was canceled.
* @return the speech synthesis cancellation details object being created.
*/
- (nullable instancetype)initFromCanceledSynthesisResult:(nonnull SPXSpeechSynthesisResult *)synthesisResult
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Creates an instance of SPXSpeechSynthesisCancellationDetails object for the canceled SPXSpeechSynthesisResult.
*
* @param synthesisResult the synthesis result that was canceled.
* @param outError error information.
* @return the speech synthesis cancellation details object being created.
*/
- (nullable instancetype)initFromCanceledSynthesisResult:(nonnull SPXSpeechSynthesisResult *)synthesisResult error:(NSError * _Nullable * _Nullable)outError;
/**
* Creates an instance of SPXSpeechSynthesisCancellationDetails object for the canceled SPXAudioDataStream.
*
* @param stream the audio data stream that was canceled.
* @return the speech synthesis cancellation details object being created.
*/
- (nullable instancetype)initFromCanceledAudioDataStream:(nonnull SPXAudioDataStream *)stream
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Creates an instance of SPXSpeechSynthesisCancellationDetails object for the canceled SPXAudioDataStream.
*
* @param stream the audio data stream that was canceled.
* @param outError error information.
* @return the speech synthesis cancellation details object being created.
*/
- (nullable instancetype)initFromCanceledAudioDataStream:(nonnull SPXAudioDataStream *)stream error:(NSError * _Nullable * _Nullable)outError;
@end

134
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesisEventArgs.h

@ -0,0 +1,134 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
/**
* Defines the payload of speech synthesis event.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXSpeechSynthesisEventArgs : NSObject
/**
* The synthesis result.
*/
@property (readonly, nonnull)SPXSpeechSynthesisResult *result;
@end
/**
* Defines the payload of speech synthesis word boundary event.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXSpeechSynthesisWordBoundaryEventArgs : NSObject
/**
* The result identifier.
*
* Added in version 1.25.0
*/
@property (copy, readonly, nonnull)NSString *resultId;
/**
* Word boundary audio offset, in ticks (100 nanoseconds).
*/
@property (readonly)NSUInteger audioOffset;
/**
* Time duration of the audio.
*
* Added in version 1.21.0.
*/
@property (readonly)NSTimeInterval duration;
/**
* Word boundary text offset.
*/
@property (readonly)NSUInteger textOffset;
/**
* Word boundary word length.
*/
@property (readonly)NSUInteger wordLength;
/**
* The text.
*
* Added in version 1.21.0
*/
@property (copy, readonly, nonnull)NSString *text;
/**
* Word boundary type.
*
* Added in version 1.21.0.
*/
@property (readonly) SPXSpeechSynthesisBoundaryType boundaryType;
@end
/**
* Defines the payload of speech synthesis viseme event.
*
* Added in version 1.16.0
*/
SPX_EXPORT
@interface SPXSpeechSynthesisVisemeEventArgs : NSObject
/**
* The result identifier.
*
* Added in version 1.25.0
*/
@property (copy, readonly, nonnull)NSString *resultId;
/**
* Viseme audio offset, in ticks (100 nanoseconds).
*/
@property (readonly)uint64_t audioOffset;
/**
* Viseme ID.
*/
@property (readonly)NSUInteger visemeId;
/**
* The animation of current viseme evenet, could be in svg or other format.
*/
@property (copy, readonly, nonnull)NSString *animation;
@end
/**
* Defines the payload of speech synthesis bookmark event.
*
* Added in version 1.16.0
*/
SPX_EXPORT
@interface SPXSpeechSynthesisBookmarkEventArgs : NSObject
/**
* The result identifier.
*
* Added in version 1.25.0
*/
@property (copy, readonly, nonnull)NSString *resultId;
/**
* Audio offset of current bookmark, in ticks (100 nanoseconds).
*/
@property (readonly)uint64_t audioOffset;
/**
* The bookmark text.
*/
@property (copy, readonly, nonnull)NSString *text;
@end

44
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesisResult.h

@ -0,0 +1,44 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
#import "SPXPropertyCollection.h"
/**
* Defines the speech synthesis result.
*
* Added in version 1.7.0
*/
SPX_EXPORT
@interface SPXSpeechSynthesisResult : NSObject
/**
* The result identifier.
*/
@property (copy, readonly, nonnull)NSString *resultId;
/**
* The synthesized audio data.
*/
@property (readonly, nullable)NSData *audioData;
/**
* The reason the result was created.
*/
@property (readonly)SPXResultReason reason;
/**
* The set of properties exposed in the result.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
/**
* The time duration of the synthesized audio.
* Added in version 1.21.0.
*/
@property (readonly)NSTimeInterval audioDuration;
@end

352
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechSynthesizer.h

@ -0,0 +1,352 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXAudioConfiguration.h"
#import "SPXSpeechConfiguration.h"
#import "SPXSpeechSynthesisResult.h"
#import "SPXSpeechSynthesisEventArgs.h"
#import "SPXSynthesisVoicesResult.h"
#import "SPXEmbeddedSpeechConfiguration.h"
/**
* Performs speech synthesis from a text to a specified audio output.
*
* Updated in version 1.16.0
*/
SPX_EXPORT
@interface SPXSpeechSynthesizer : NSObject
typedef void (^SPXSpeechSynthesisEventHandler)(SPXSpeechSynthesizer * _Nonnull, SPXSpeechSynthesisEventArgs * _Nonnull);
typedef void (^SPXSpeechSynthesisWordBoundaryEventHandler)(SPXSpeechSynthesizer * _Nonnull, SPXSpeechSynthesisWordBoundaryEventArgs * _Nonnull);
typedef void (^SPXSpeechSynthesisVisemeEventHandler)(SPXSpeechSynthesizer * _Nonnull, SPXSpeechSynthesisVisemeEventArgs * _Nonnull);
typedef void (^SPXSpeechSynthesisBookmarkEventHandler)(SPXSpeechSynthesizer * _Nonnull, SPXSpeechSynthesisBookmarkEventArgs * _Nonnull);
/**
* The collection of properties and their values defined for this SPXSpeechSynthesizer.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
/**
* Authorization token used to communicate with the speech synthesis service.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires,
* the caller needs to refresh it by calling this setter with a new valid token.
* Otherwise, the synthesizer will encounter errors during speech synthesis.
*/
@property (nonatomic, copy, nullable)NSString *authorizationToken;
/**
* Initializes a new instance of speech synthesizer using a speech config.
* This synthesizer will output the audio to default speaker, which will throw an exception if the speaker is not available.
* Please use initWithSpeechConfiguration(speechConfiguration, nil) if you just need the SPXSynthesisResult or SPXAudioDataStream.
*
* @param speechConfiguration speech configuration.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech synthesizer using a speech config.
* This synthesizer will output the audio to default speaker, which will throw an exception if the speaker is not available.
* Please use initWithSpeechConfiguration(speechConfiguration, nil) if you just need the SPXSynthesisResult or SPXAudioDataStream.
*
* @param speechConfiguration speech configuration.
* @param outError error information.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)init:(nonnull SPXSpeechConfiguration *)speechConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech synthesizer using a speech config and audio config.
*
* @param speechConfiguration speech configuration.
* @param audioConfiguration audio configuration.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nullable SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech synthesizer using a speech config and audio config.
*
* @param speechConfiguration speech configuration.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration audioConfiguration:(nullable SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech synthesizer using a embedded speech config.
* This synthesizer will output the audio to default speaker, which will throw an exception if the speaker is not available.
* Please use initWithEmbeddedSpeechConfiguration(speechConfiguration, nil) if you just need the SPXSynthesisResult or SPXAudioDataStream.
*
* @param speechConfiguration embedded speech configuration.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech synthesizer using a embedded speech config.
* This synthesizer will output the audio to default speaker, which will throw an exception if the speaker is not available.
* Please use initWithEmbeddedSpeechConfiguration(speechConfiguration, nil) if you just need the SPXSynthesisResult or SPXAudioDataStream.
*
* @param speechConfiguration embedded speech configuration.
* @param outError error information.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech synthesizer using a embedded speech config and audio config.
*
* @param speechConfiguration embedded speech configuration.
* @param audioConfiguration audio configuration.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration audioConfiguration:(nullable SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech synthesizer using a embedded speech config and audio config.
*
* @param speechConfiguration embedded speech configuration.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithEmbeddedSpeechConfiguration:(nonnull SPXEmbeddedSpeechConfiguration *)speechConfiguration audioConfiguration:(nullable SPXAudioConfiguration *)audioConfiguration error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech synthesizer using the specified configuration for auto language detection.
*
* Added in version 1.13.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @return an instance of speech synthesizer
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech synthesizer using the specified configuration for auto language detection.
*
* Added in version 1.13.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param outError error information.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes a new instance of speech synthesizer using the specified configuration for auto language detection and audio configuration.
*
* Added in version 1.13.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nullable SPXAudioConfiguration *)audioConfiguration
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes a new instance of speech synthesizer using the specified configuration for auto language detection and audio configuration.
*
* Added in version 1.13.0.
* @param speechConfiguration speech recognition configuration.
* @param autoDetectSourceLanguageConfiguration the configuration for auto language detection.
* @param audioConfiguration audio configuration.
* @param outError error information.
* @return an instance of speech synthesizer.
*/
- (nullable instancetype)initWithSpeechConfiguration:(nonnull SPXSpeechConfiguration *)speechConfiguration
autoDetectSourceLanguageConfiguration:(nonnull SPXAutoDetectSourceLanguageConfiguration *)autoDetectSourceLanguageConfiguration
audioConfiguration:(nullable SPXAudioConfiguration *)audioConfiguration
error:(NSError * _Nullable * _Nullable)outError;
/**
* Execute the speech synthesis on plain text.
*
* @param text the plain text for synthesis.
* @return the result of speech synthesis.
*/
- (nonnull SPXSpeechSynthesisResult *)speakText:(nonnull NSString*)text NS_RETURNS_RETAINED
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Execute the speech synthesis on plain text.
*
* @param text the plain text for synthesis.
* @param outError error information.
* @return the result of speech synthesis.
*/
- (nullable SPXSpeechSynthesisResult *)speakText:(nonnull NSString*)text error:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Execute the speech synthesis on SSML.
*
* @param ssml the SSML for synthesis.
* @return the result of speech synthesis.
*/
- (nonnull SPXSpeechSynthesisResult *)speakSsml:(nonnull NSString*)ssml NS_RETURNS_RETAINED
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Execute the speech synthesis on SSML.
*
* @param ssml the SSML for synthesis.
* @param outError error information.
* @return the result of speech synthesis.
*/
- (nullable SPXSpeechSynthesisResult *)speakSsml:(nonnull NSString*)ssml error:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Start the speech synthesis on plain text.
*
* @param text the plain the for synthesis.
* @return the result of speech synthesis.
*/
- (nonnull SPXSpeechSynthesisResult *)startSpeakingText:(nonnull NSString*)text NS_RETURNS_RETAINED
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Start the speech synthesis on plain text.
*
* @param text the plain text for synthesis.
* @param outError error information.
* @return the result of speech synthesis.
*/
- (nullable SPXSpeechSynthesisResult *)startSpeakingText:(nonnull NSString*)text error:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Start the speech synthesis on SSML.
*
* @param ssml the SSML for synthesis.
* @return the result of speech synthesis.
*/
- (nonnull SPXSpeechSynthesisResult *)startSpeakingSsml:(nonnull NSString*)ssml NS_RETURNS_RETAINED
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Start the speech synthesis on SSML.
*
* @param ssml the SSML for synthesis.
* @param outError error information.
* @return the result of speech synthesis.
*/
- (nullable SPXSpeechSynthesisResult *)startSpeakingSsml:(nonnull NSString*)ssml error:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Stops synthesis.
* This method will stop the playback and clear the unread data in SPXPullAudioOutputStream
*
* Added in version 1.14.0
*/
- (void)stopSpeaking
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Stops synthesis.
* This method will stop the playback and clear the unread data in SPXPullAudioOutputStream
*
* Added in version 1.14.0
*
* @param outError error information.
*/
- (BOOL)stopSpeaking:(NSError * _Nullable * _Nullable)outError;
/**
* Get the available voices.
*
* Added in version 1.16.0
*
* @param locale Specify the locale of voices, in BCP-47 format; or leave it empty to get all available voices.
* @return the result of voices retrieved.
*/
- (nonnull SPXSynthesisVoicesResult *)getVoicesWithLocale:(nonnull NSString*)locale NS_RETURNS_RETAINED
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Get the available voices.
*
* Added in version 1.16.0
*
* @param locale Specify the locale of voices, in BCP-47 format; or leave it empty to get all available voices.
* @param outError error information.
* @return the result of voices retrieved.
*/
- (nullable SPXSynthesisVoicesResult *)getVoicesWithLocale:(nonnull NSString*)locale error:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Get the available voices in all locales.
*
* Added in version 1.16.0
*
* @return the result of voices retrieved.
*/
- (nonnull SPXSynthesisVoicesResult *)getVoices NS_RETURNS_RETAINED
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Get the available voices in all locales.
*
* Added in version 1.16.0
*
* @param outError error information.
* @return the result of voices retrieved.
*/
- (nullable SPXSynthesisVoicesResult *)getVoices:(NSError * _Nullable * _Nullable)outError NS_RETURNS_RETAINED;
/**
* Subscribes to the SynthesisStarted event which indicates that the synthesis just started.
*/
- (void)addSynthesisStartedEventHandler:(nonnull SPXSpeechSynthesisEventHandler)eventHandler;
/**
* Subscribes to the Synthesizing event which indicates that the synthesis is on going.
*/
- (void)addSynthesizingEventHandler:(nonnull SPXSpeechSynthesisEventHandler)eventHandler;
/**
* Subscribes to the SynthesisCompleted event which indicates that the synthesis completed.
*/
- (void)addSynthesisCompletedEventHandler:(nonnull SPXSpeechSynthesisEventHandler)eventHandler;
/**
* Subscribes to the SynthesisCanceled event which indicates that the synthesis is canceled.
*/
- (void)addSynthesisCanceledEventHandler:(nonnull SPXSpeechSynthesisEventHandler)eventHandler;
/**
* Subscribes to the SynthesisWordBoundary event which indicates that a word boundary is received.
*/
- (void)addSynthesisWordBoundaryEventHandler:(nonnull SPXSpeechSynthesisWordBoundaryEventHandler)eventHandler;
/**
* Subscribes to the VisemeReceived event which indicates that a viseme is received.
*/
- (void)addVisemeReceivedEventHandler:(nonnull SPXSpeechSynthesisVisemeEventHandler)eventHandler;
/**
* Subscribes to the BookmarkReached event which indicates that a bookmark is reached.
*/
- (void)addBookmarkReachedEventHandler:(nonnull SPXSpeechSynthesisBookmarkEventHandler)eventHandler;
@end

256
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechTranslationConfiguration.h

@ -0,0 +1,256 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechConfiguration.h"
/**
* Defines configurations for translation with speech input.
*/
SPX_EXPORT
@interface SPXSpeechTranslationConfiguration : SPXSpeechConfiguration
/**
* All target languages that have been configured for translation.
*/
@property (nonatomic, copy, readonly, nonnull)NSArray *targetLanguages;
/**
* Voice name of the synthesis output of translated language.
*/
@property (nonatomic, copy, nullable)NSString *voiceName;
/**
* Initializes speech translation configuration with the specified subscription key and service region.
*
* @param subscriptionKey the key of subscription to be used.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithSubscription:(nonnull NSString *)subscriptionKey region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes speech translation configuration with the specified subscription key and service region.
*
* Added in version 1.6.0.
*
* @param subscriptionKey the key of subscription to be used.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @param outError error information.
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithSubscription:(nonnull NSString *)subscriptionKey region:(nonnull NSString *)region error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes speech translation configuration with the specified subscription key and service region.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token
* expires, the caller needs to refresh it by calling setAuthorizationToken with a new valid token on the created recognizer.
* Otherwise, the recognizer instance will encounter errors during recognition.
* For long-living recognizers, the authorization token needs to be updated on the recognizer.
*
* @param authToken the authorization token.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithAuthorizationToken:(nonnull NSString *)authToken region:(nonnull NSString *)region
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes speech translation configuration with the specified subscription key and service region.
*
* Note: The caller needs to ensure that the authorization token is valid. Before the authorization token
* expires, the caller needs to refresh it by calling setAuthorizationToken with a new valid token on the created recognizer.
* Otherwise, the recognizer instance will encounter errors during recognition.
* For long-living recognizers, the authorization token needs to be updated on the recognizer.
*
* Added in version 1.6.0.
*
* @param authToken the authorization token.
* @param region the region name (see the <a href="https://aka.ms/csspeech/region">region page</a>).
* @param outError error information.
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithAuthorizationToken:(nonnull NSString *)authToken region:(nonnull NSString *)region error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes speech translation configuration with specified endpoint and subscription key.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* For example, if the recognition language is defined in the URI as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SPXSpeechTranslationConfiguration, the language setting in URI takes precedence,
* and the effective language is "de-DE".
* Only the parameters that are not specified in the endpoint URI can be set by other APIs.
*
* Note: To use an authorization token, use initWithEndpoint, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* @param endpointUri The service endpoint to connect to.
* @param subscriptionKey the subscription key.
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri subscription:(nonnull NSString *)subscriptionKey
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes speech translation configuration with specified endpoint and subscription key.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* For example, if the recognition language is defined in the URI as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SPXSpeechTranslationConfiguration, the language setting in URI takes precedence,
* and the effective language is "de-DE".
* Only the parameters that are not specified in the endpoint URI can be set by other APIs.
*
* Note: To use an authorization token, use initWithEndpoint, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* Added in version 1.6.0.
*
* @param endpointUri The service endpoint to connect to.
* @param subscriptionKey the subscription key.
* @param outError error information.
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri subscription:(nonnull NSString *)subscriptionKey error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes speech translation configuration with specified endpoint.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* For example, if the recognition language is defined in the URI as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SPXSpeechTranslationConfiguration, the language setting in URI takes precedence,
* and the effective language is "de-DE".
* Only the parameters that are not specified in the endpoint URI can be set by other APIs.
*
* Note: if the endpoint requires a subscription key for authentication, please use initWithEndpoint:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SPXSpeechTranslationConfig instance, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* Note: Added in version 1.5.0.
*
* @param endpointUri The service endpoint to connect to.
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes speech translation configuration with specified endpoint.
* This method is intended only for users who use a non-standard service endpoint or parameters.
*
* Note: The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs.
* For example, if the recognition language is defined in the URI as query parameter "language=de-DE", and is also set to "en-US" via
* property speechRecognitionLanguage in SPXSpeechTranslationConfiguration, the language setting in URI takes precedence,
* and the effective language is "de-DE".
* Only the parameters that are not specified in the endpoint URI can be set by other APIs.
*
* Note: if the endpoint requires a subscription key for authentication, please use initWithEndpoint:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SPXSpeechTranslationConfig instance, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* Note: Added in version 1.6.0.
*
* @param endpointUri The service endpoint to connect to.
* @param outError error information.
* @return an instance of speech translation configuration.
*/
- (nullable instancetype)initWithEndpoint:(nonnull NSString *)endpointUri error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes speech translation configuration with specified host and subscription key.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: To use an authorization token, use initWithHost, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @param subscriptionKey The subscription key.
* @return An instance of speech translation configuration.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri subscription:(nonnull NSString *)subscriptionKey
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes speech translation configuration with specified host and subscription key.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: To use an authorization token, use initWithHost, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @param subscriptionKey The subscription key.
* @param outError Error information.
* @return An instance of speech translation configuration.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri subscription:(nonnull NSString *)subscriptionKey error:(NSError * _Nullable * _Nullable)outError;
/**
* Initializes speech translation configuration with specified host.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: If the host requires a subscription key for authentication, use initWithHost:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SPXSpeechTranslationConfig instance, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @return An instance of speech translation configuration.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri
NS_SWIFT_UNAVAILABLE("Use the method with Swift-compatible error handling.");
/**
* Initializes speech translation configuration with specified host.
* This method is intended only for users who use a non-default service host. Standard resource path will be assumed.
* For services with a non-standard resource path or no path at all, use initWithEndpoint instead.
*
* Note: Query parameters are not allowed in the host URI and must be set by other APIs.
*
* Note: If the host requires a subscription key for authentication, use initWithHost:subscription: to pass the subscription key as parameter.
* To use an authorization token, use this method to create a SPXSpeechTranslationConfig instance, and then set the authorizationToken property on the created SPXSpeechTranslationConfiguration instance.
*
* Added in version 1.8.0.
*
* @param hostUri The service host to connect to. Format is "protocol://host:port" where ":port" is optional.
* @param outError Error information.
* @return An instance of speech translation configuration.
*/
- (nullable instancetype)initWithHost:(nonnull NSString *)hostUri error:(NSError * _Nullable * _Nullable)outError;
/**
* Adds a target language for translation.
*
* @param lang the language identifier in BCP-47 format.
*/
- (void)addTargetLanguage:(nonnull NSString *)lang;
/**
* Removes a target language for translation.
*
* Added in version 1.7.0.
*
* @param lang the language identifier in BCP-47 format.
*/
- (void)removeTargetLanguage:(nonnull NSString *)lang;
/**
* Sets a Category Id that will be passed to service. Category Id is used to find the custom model.
*
* @param categoryId the category id for custom model.
*/
- (void)setCustomModelCategoryId:(nonnull NSString *)categoryId;
@end

55
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSpeechTranslationModelInfo.h

@ -0,0 +1,55 @@
///
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Represents information about a speech translation model.
*/
SPX_EXPORT
@interface SPXSpeechTranslationModelInfo : NSObject
/**
* The name of the speech translation model.
*/
@property (nonatomic, readonly, nonnull) NSString *name;
/**
* The source languages supported by the model.
*/
@property (nonatomic, readonly, nonnull) NSArray<NSString *> *sourceLanguages;
/**
* The target languages supported by the model.
*/
@property (nonatomic, readonly, nonnull) NSArray<NSString *> *targetLanguages;
/**
* The path of the model (valid only for offline models).
*/
@property (nonatomic, readonly, nullable) NSString *path;
/**
* The version of the speech translation model.
*/
@property (nonatomic, readonly, nonnull) NSString *version;
/**
* Initializes a new instance of the SPXSpeechTranslationModelInfo class.
*
* @param name The name of the model.
* @param sourceLanguages The source languages supported by the model.
* @param targetLanguages The target languages supported by the model.
* @param path The path of the model (valid only for offline models).
* @param version The version of the model.
* @return An initialized SPXSpeechTranslationModelInfo instance.
*/
- (nullable instancetype)initWithName:(nonnull NSString *)name
sourceLanguages:(nonnull NSArray<NSString *> *)sourceLanguages
targetLanguages:(nonnull NSArray<NSString *> *)targetLanguages
path:(nullable NSString *)path
version:(nonnull NSString *)version;
@end

44
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXSynthesisVoicesResult.h

@ -0,0 +1,44 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXSpeechEnums.h"
#import "SPXPropertyCollection.h"
#import "SPXVoiceInfo.h"
/**
* Contains detailed information about the retrieved synthesis voices list.
*
* Added in version 1.16.0
*/
SPX_EXPORT
@interface SPXSynthesisVoicesResult : NSObject
/**
* The retrieved voices list.
*/
@property (nonatomic, retain, nonnull) NSArray<SPXVoiceInfo *> *voices;
/**
* The result identifier.
*/
@property (copy, readonly, nonnull)NSString *resultId;
/**
* The reason the result was created.
*/
@property (readonly)SPXResultReason reason;
/**
* The error details of the result.
*/
@property (copy, readonly, nonnull)NSString *errorDetails;
/**
* The set of properties exposed in the result.
*/
@property (readonly, nullable)id <SPXPropertyCollection> properties;
@end

135
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXTimingResult.h

@ -0,0 +1,135 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
/**
* Contains nbest phoneme information.
*
* Added in version 1.21.0
*/
SPX_EXPORT
@interface SPXNBestPhoneme : NSObject
/**
* The phoneme.
*/
@property (copy, readonly, nullable)NSString *phoneme;
/**
* The score.
*/
@property (readonly)double score;
@end
/**
* Contains basic properties of timing result
*
* Added in version 1.21.0
*/
SPX_EXPORT
@interface SPXTimingResult : NSObject
/**
* The time offset.
*/
@property (readonly)NSTimeInterval offset;
/**
* The time duration.
*/
@property (readonly)NSTimeInterval duration;
@end
/**
* Contains phoneme level timing result
*
* Added in version 1.21.0
*/
SPX_EXPORT
@interface SPXPhonemeLevelTimingResult : SPXTimingResult
/**
* The phoneme text.
*/
@property (copy, readonly, nullable)NSString *phoneme;
/**
* The score indicating the pronunciation accuracy of the given speech, which indicates
* how closely the phoneme match a native speaker's pronunciation
*/
@property (readonly)double accuracyScore;
/**
* The list of nbest phonemes.
*/
@property (nonatomic, retain, nullable) NSArray<SPXNBestPhoneme *> *nbestPhonemes;
@end
/**
* Contains syllable level timing result
*
* Added in version 1.21.0
*/
SPX_EXPORT
@interface SPXSyllableLevelTimingResult : SPXTimingResult
/**
* The syllable.
*/
@property (copy, readonly, nullable)NSString *syllable;
/**
* The grapheme.
*/
@property (copy, readonly, nullable)NSString *grapheme;
/**
* The score indicating the pronunciation accuracy of the given speech, which indicates
* how closely the syllable match a native speaker's pronunciation.
*/
@property (readonly)double accuracyScore;
@end
/**
* Contains word level timing result
*
* Added in version 1.21.0
*/
SPX_EXPORT
@interface SPXWordLevelTimingResult : SPXTimingResult
/**
* The word text.
*/
@property (copy, readonly, nullable)NSString *word;
/**
* The score indicating the pronunciation accuracy of the given speech, which indicates
* how closely the phonemes match a native speaker's pronunciation.
*/
@property (readonly)double accuracyScore;
/**
* This value indicates whether a word is omitted, inserted or badly pronounced, compared to ReferenceText.
* Possible values are None (meaning no error on this word), Omission, Insertion and Mispronunciation.
*/
@property (copy, readonly, nullable)NSString *errorType;
/**
* Phoneme level pronunciation assessment result
*/
@property (nonatomic, retain, nullable) NSArray<SPXPhonemeLevelTimingResult *> *phonemes;
/**
* Syllable level timing result
*/
@property (nonatomic, retain, nullable) NSArray<SPXSyllableLevelTimingResult *> *syllables;
@end

47
local_plugins/azure_speech/ios/azure_speech/MicrosoftCognitiveServicesSpeech.xcframework/ios-arm64/MicrosoftCognitiveServicesSpeech.framework/Headers/SPXTranslationRecognitionEventArgs.h

@ -0,0 +1,47 @@
//
// Copyright (c) Microsoft. All rights reserved.
// See https://aka.ms/csspeech/license for the full license information.
//
#import "SPXFoundation.h"
#import "SPXRecognitionEventArgs.h"
#import "SPXTranslationRecognitionResult.h"
/**
* Defines the payload of text translation recognizing/recognized events.
*/
SPX_EXPORT
@interface SPXTranslationRecognitionEventArgs : SPXRecognitionEventArgs
/**
* The translation text result.
*/
@property (readonly, nonnull)SPXTranslationRecognitionResult *result;
@end
/**
* Defines the payload of text translation canceled events.
*/
SPX_EXPORT
@interface SPXTranslationRecognitionCanceledEventArgs : SPXTranslationRecognitionEventArgs
/**
* The reason why the text translation was canceled.
*/
@property (readonly)SPXCancellationReason reason;
/**
* The error code in case of an unsuccessful recognition (reason is set to Error).
*
* Added in version 1.1.0.
*/
@property (readonly)SPXCancellationErrorCode errorCode;
/**
* The error message in case of an unsuccessful recognition (reason is set to Error).
*/
@property (copy, readonly, nullable)NSString *errorDetails;
@end

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save