From 65277ba21c7b6c69a9fe7c28f8f0a7084405d399 Mon Sep 17 00:00:00 2001 From: Haritha Mohan Date: Wed, 20 Sep 2023 16:22:17 -0700 Subject: [PATCH 1/3] [Speech] Add support for Xcode 15 --- src/speech.cs | 63 ++++++++ .../MacCatalyst-Speech.ignore} | 17 +-- .../MacCatalyst-Speech.todo | 2 - .../{iOS-Speech.todo => iOS-Speech.ignore} | 17 +-- ...{macOS-Speech.todo => macOS-Speech.ignore} | 17 +-- .../{iOS-Speech.todo => iOS-Speech.ignore} | 17 +-- tests/xtro-sharpie/macOS-Speech.ignore | 137 ++++++++++++++++++ 7 files changed, 208 insertions(+), 62 deletions(-) rename tests/xtro-sharpie/{macOS-Speech.todo => api-annotations-dotnet/MacCatalyst-Speech.ignore} (90%) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Speech.todo rename tests/xtro-sharpie/api-annotations-dotnet/{iOS-Speech.todo => iOS-Speech.ignore} (90%) rename tests/xtro-sharpie/api-annotations-dotnet/{macOS-Speech.todo => macOS-Speech.ignore} (90%) rename tests/xtro-sharpie/{iOS-Speech.todo => iOS-Speech.ignore} (90%) create mode 100644 tests/xtro-sharpie/macOS-Speech.ignore diff --git a/src/speech.cs b/src/speech.cs index cfe26297161c..182a8170420c 100644 --- a/src/speech.cs +++ b/src/speech.cs @@ -49,6 +49,14 @@ public enum SFSpeechRecognizerAuthorizationStatus : long { Authorized, } + [Mac(14, 0), iOS(17, 0), MacCatalyst(17,0)] + [Native] + public enum SFSpeechErrorCode : long { + InternalServiceError = 1, + UndefinedTemplateClassName = 7, + MalformedSupplementalModel = 8, + } + [MacCatalyst (13, 1)] [DisableDefaultCtor] [Abstract] // no docs (yet) but it has no means (init*) to create it, unlike its subclasses @@ -77,6 +85,10 @@ interface SFSpeechRecognitionRequest { [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("addsPunctuation")] bool AddsPunctuation { get; set; } + + [Mac(14, 0), iOS(17, 0), MacCatalyst(17, 0)] + [NullAllowed, Export("customizedLanguageModel", ArgumentSemantic.Copy)] + SFSpeechLanguageModelConfiguration CustomizedLanguageModel { get; set; } } [MacCatalyst (13, 1)] @@ -347,4 +359,55 @@ interface SFVoiceAnalytics : NSCopying, NSSecureCoding { [Export ("voicing", ArgumentSemantic.Copy)] SFAcousticFeature Voicing { get; } } + + [Mac(14, 0), iOS(17, 0), MacCatalyst(17, 0)] + [BaseType(typeof(NSObject))] + interface SFSpeechLanguageModelConfiguration : NSCopying { + [Export("initWithLanguageModel:")] + NativeHandle Constructor(NSUrl languageModel); + + [Export("initWithLanguageModel:vocabulary:")] + NativeHandle Constructor(NSUrl languageModel, [NullAllowed] NSUrl vocabulary); + + [Export("languageModel", ArgumentSemantic.Copy)] + NSUrl LanguageModel { get; } + + [NullAllowed, Export("vocabulary", ArgumentSemantic.Copy)] + NSUrl Vocabulary { get; } + } + + [Mac (14,0), iOS (17,0), MacCatalyst(17, 0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface SFSpeechLanguageModel { + [Static] + [Export ("prepareCustomLanguageModelForUrl:clientIdentifier:configuration:completion:")] + [Async] + void PrepareCustomModel (NSUrl asset, string clientIdentifier, SFSpeechLanguageModelConfiguration configuration, Action completion); + + [Static] + [Export ("prepareCustomLanguageModelForUrl:clientIdentifier:configuration:ignoresCache:completion:")] + [Async] + void PrepareCustomModel (NSUrl asset, string clientIdentifier, SFSpeechLanguageModelConfiguration configuration, bool ignoresCache, Action completion); + } + + [Partial] + [Mac (14,0), iOS (17,0), MacCatalyst(17, 0)] + interface SFAnalysisContextTag { + [Field("SFAnalysisContextTagLeftContext")] + NSString LeftContext { get; } + + [Field("SFAnalysisContextTagRightContext")] + NSString RightContext { get; } + + [Field("SFAnalysisContextTagSelectedText")] + NSString SelectedText { get; } + } + + [Partial] + [Mac(14, 0), iOS(17, 0), MacCatalyst(17,0)] + interface SFSpeech { + [Field("SFSpeechErrorDomain")] + NSString ErrorDomain { get; } + } } diff --git a/tests/xtro-sharpie/macOS-Speech.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Speech.ignore similarity index 90% rename from tests/xtro-sharpie/macOS-Speech.todo rename to tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Speech.ignore index 41c0960fd7e6..74e1ec6804f4 100644 --- a/tests/xtro-sharpie/macOS-Speech.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Speech.ignore @@ -1,17 +1,13 @@ +# xcode 15, these are all private APIs !missing-enum! _SFCommandRecognizerArgumentPresence not bound !missing-enum! _SFEARResultType not bound !missing-enum! _SFTranscriptionOptions not bound !missing-enum! _SFTranscriptionResultAttributeOptions not bound -!missing-enum! SFSpeechErrorCode not bound !missing-field! _SFAnalysisContextTagContextualNamedEntities not bound !missing-field! _SFAnalysisContextTagGeoLMRegionID not bound !missing-field! _SFAnalysisContextTagLeftContext not bound !missing-field! _SFAnalysisContextTagRightContext not bound !missing-field! _SFAnalysisContextTagSelectedText not bound -!missing-field! SFAnalysisContextTagLeftContext not bound -!missing-field! SFAnalysisContextTagRightContext not bound -!missing-field! SFAnalysisContextTagSelectedText not bound -!missing-field! SFSpeechErrorDomain not bound !missing-protocol! _SFSpeechAnalyzerEndpointingResultDelegate not bound !missing-protocol! _SFSpeechAnalyzerTranscriberResultDelegate not bound !missing-selector! _SFAnalysisContext::contextualNamedEntities not bound @@ -119,14 +115,6 @@ !missing-selector! _STTranscriberMultisegmentResult::segments not bound !missing-selector! _STTranscriberMultisegmentResult::transcriptions not bound !missing-selector! +_SFSpeechAnalyzer::modelDownloadRequestForClientIdentifier:transcriberOptions: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:completion: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:ignoresCache:completion: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel:vocabulary: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::languageModel not bound -!missing-selector! SFSpeechLanguageModelConfiguration::vocabulary not bound -!missing-selector! SFSpeechRecognitionRequest::customizedLanguageModel not bound -!missing-selector! SFSpeechRecognitionRequest::setCustomizedLanguageModel: not bound !missing-type! _SFAnalysisContext not bound !missing-type! _SFAnalyzerTranscriptionSegment not bound !missing-type! _SFCommandRecognizerArgument not bound @@ -146,5 +134,4 @@ !missing-type! _SFTranscriberResult not bound !missing-type! _STCommandRecognizerResult not bound !missing-type! _STTranscriberMultisegmentResult not bound -!missing-type! SFSpeechLanguageModel not bound -!missing-type! SFSpeechLanguageModelConfiguration not bound + diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Speech.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Speech.todo deleted file mode 100644 index 713090f88aac..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Speech.todo +++ /dev/null @@ -1,2 +0,0 @@ -!missing-selector! SFSpeechRecognitionRequest::addsPunctuation not bound -!missing-selector! SFSpeechRecognitionRequest::setAddsPunctuation: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Speech.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Speech.ignore similarity index 90% rename from tests/xtro-sharpie/api-annotations-dotnet/iOS-Speech.todo rename to tests/xtro-sharpie/api-annotations-dotnet/iOS-Speech.ignore index 41c0960fd7e6..74e1ec6804f4 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Speech.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Speech.ignore @@ -1,17 +1,13 @@ +# xcode 15, these are all private APIs !missing-enum! _SFCommandRecognizerArgumentPresence not bound !missing-enum! _SFEARResultType not bound !missing-enum! _SFTranscriptionOptions not bound !missing-enum! _SFTranscriptionResultAttributeOptions not bound -!missing-enum! SFSpeechErrorCode not bound !missing-field! _SFAnalysisContextTagContextualNamedEntities not bound !missing-field! _SFAnalysisContextTagGeoLMRegionID not bound !missing-field! _SFAnalysisContextTagLeftContext not bound !missing-field! _SFAnalysisContextTagRightContext not bound !missing-field! _SFAnalysisContextTagSelectedText not bound -!missing-field! SFAnalysisContextTagLeftContext not bound -!missing-field! SFAnalysisContextTagRightContext not bound -!missing-field! SFAnalysisContextTagSelectedText not bound -!missing-field! SFSpeechErrorDomain not bound !missing-protocol! _SFSpeechAnalyzerEndpointingResultDelegate not bound !missing-protocol! _SFSpeechAnalyzerTranscriberResultDelegate not bound !missing-selector! _SFAnalysisContext::contextualNamedEntities not bound @@ -119,14 +115,6 @@ !missing-selector! _STTranscriberMultisegmentResult::segments not bound !missing-selector! _STTranscriberMultisegmentResult::transcriptions not bound !missing-selector! +_SFSpeechAnalyzer::modelDownloadRequestForClientIdentifier:transcriberOptions: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:completion: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:ignoresCache:completion: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel:vocabulary: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::languageModel not bound -!missing-selector! SFSpeechLanguageModelConfiguration::vocabulary not bound -!missing-selector! SFSpeechRecognitionRequest::customizedLanguageModel not bound -!missing-selector! SFSpeechRecognitionRequest::setCustomizedLanguageModel: not bound !missing-type! _SFAnalysisContext not bound !missing-type! _SFAnalyzerTranscriptionSegment not bound !missing-type! _SFCommandRecognizerArgument not bound @@ -146,5 +134,4 @@ !missing-type! _SFTranscriberResult not bound !missing-type! _STCommandRecognizerResult not bound !missing-type! _STTranscriberMultisegmentResult not bound -!missing-type! SFSpeechLanguageModel not bound -!missing-type! SFSpeechLanguageModelConfiguration not bound + diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Speech.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Speech.ignore similarity index 90% rename from tests/xtro-sharpie/api-annotations-dotnet/macOS-Speech.todo rename to tests/xtro-sharpie/api-annotations-dotnet/macOS-Speech.ignore index 41c0960fd7e6..74e1ec6804f4 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Speech.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Speech.ignore @@ -1,17 +1,13 @@ +# xcode 15, these are all private APIs !missing-enum! _SFCommandRecognizerArgumentPresence not bound !missing-enum! _SFEARResultType not bound !missing-enum! _SFTranscriptionOptions not bound !missing-enum! _SFTranscriptionResultAttributeOptions not bound -!missing-enum! SFSpeechErrorCode not bound !missing-field! _SFAnalysisContextTagContextualNamedEntities not bound !missing-field! _SFAnalysisContextTagGeoLMRegionID not bound !missing-field! _SFAnalysisContextTagLeftContext not bound !missing-field! _SFAnalysisContextTagRightContext not bound !missing-field! _SFAnalysisContextTagSelectedText not bound -!missing-field! SFAnalysisContextTagLeftContext not bound -!missing-field! SFAnalysisContextTagRightContext not bound -!missing-field! SFAnalysisContextTagSelectedText not bound -!missing-field! SFSpeechErrorDomain not bound !missing-protocol! _SFSpeechAnalyzerEndpointingResultDelegate not bound !missing-protocol! _SFSpeechAnalyzerTranscriberResultDelegate not bound !missing-selector! _SFAnalysisContext::contextualNamedEntities not bound @@ -119,14 +115,6 @@ !missing-selector! _STTranscriberMultisegmentResult::segments not bound !missing-selector! _STTranscriberMultisegmentResult::transcriptions not bound !missing-selector! +_SFSpeechAnalyzer::modelDownloadRequestForClientIdentifier:transcriberOptions: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:completion: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:ignoresCache:completion: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel:vocabulary: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::languageModel not bound -!missing-selector! SFSpeechLanguageModelConfiguration::vocabulary not bound -!missing-selector! SFSpeechRecognitionRequest::customizedLanguageModel not bound -!missing-selector! SFSpeechRecognitionRequest::setCustomizedLanguageModel: not bound !missing-type! _SFAnalysisContext not bound !missing-type! _SFAnalyzerTranscriptionSegment not bound !missing-type! _SFCommandRecognizerArgument not bound @@ -146,5 +134,4 @@ !missing-type! _SFTranscriberResult not bound !missing-type! _STCommandRecognizerResult not bound !missing-type! _STTranscriberMultisegmentResult not bound -!missing-type! SFSpeechLanguageModel not bound -!missing-type! SFSpeechLanguageModelConfiguration not bound + diff --git a/tests/xtro-sharpie/iOS-Speech.todo b/tests/xtro-sharpie/iOS-Speech.ignore similarity index 90% rename from tests/xtro-sharpie/iOS-Speech.todo rename to tests/xtro-sharpie/iOS-Speech.ignore index 41c0960fd7e6..74e1ec6804f4 100644 --- a/tests/xtro-sharpie/iOS-Speech.todo +++ b/tests/xtro-sharpie/iOS-Speech.ignore @@ -1,17 +1,13 @@ +# xcode 15, these are all private APIs !missing-enum! _SFCommandRecognizerArgumentPresence not bound !missing-enum! _SFEARResultType not bound !missing-enum! _SFTranscriptionOptions not bound !missing-enum! _SFTranscriptionResultAttributeOptions not bound -!missing-enum! SFSpeechErrorCode not bound !missing-field! _SFAnalysisContextTagContextualNamedEntities not bound !missing-field! _SFAnalysisContextTagGeoLMRegionID not bound !missing-field! _SFAnalysisContextTagLeftContext not bound !missing-field! _SFAnalysisContextTagRightContext not bound !missing-field! _SFAnalysisContextTagSelectedText not bound -!missing-field! SFAnalysisContextTagLeftContext not bound -!missing-field! SFAnalysisContextTagRightContext not bound -!missing-field! SFAnalysisContextTagSelectedText not bound -!missing-field! SFSpeechErrorDomain not bound !missing-protocol! _SFSpeechAnalyzerEndpointingResultDelegate not bound !missing-protocol! _SFSpeechAnalyzerTranscriberResultDelegate not bound !missing-selector! _SFAnalysisContext::contextualNamedEntities not bound @@ -119,14 +115,6 @@ !missing-selector! _STTranscriberMultisegmentResult::segments not bound !missing-selector! _STTranscriberMultisegmentResult::transcriptions not bound !missing-selector! +_SFSpeechAnalyzer::modelDownloadRequestForClientIdentifier:transcriberOptions: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:completion: not bound -!missing-selector! +SFSpeechLanguageModel::prepareCustomLanguageModelForUrl:clientIdentifier:configuration:ignoresCache:completion: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::initWithLanguageModel:vocabulary: not bound -!missing-selector! SFSpeechLanguageModelConfiguration::languageModel not bound -!missing-selector! SFSpeechLanguageModelConfiguration::vocabulary not bound -!missing-selector! SFSpeechRecognitionRequest::customizedLanguageModel not bound -!missing-selector! SFSpeechRecognitionRequest::setCustomizedLanguageModel: not bound !missing-type! _SFAnalysisContext not bound !missing-type! _SFAnalyzerTranscriptionSegment not bound !missing-type! _SFCommandRecognizerArgument not bound @@ -146,5 +134,4 @@ !missing-type! _SFTranscriberResult not bound !missing-type! _STCommandRecognizerResult not bound !missing-type! _STTranscriberMultisegmentResult not bound -!missing-type! SFSpeechLanguageModel not bound -!missing-type! SFSpeechLanguageModelConfiguration not bound + diff --git a/tests/xtro-sharpie/macOS-Speech.ignore b/tests/xtro-sharpie/macOS-Speech.ignore new file mode 100644 index 000000000000..74e1ec6804f4 --- /dev/null +++ b/tests/xtro-sharpie/macOS-Speech.ignore @@ -0,0 +1,137 @@ +# xcode 15, these are all private APIs +!missing-enum! _SFCommandRecognizerArgumentPresence not bound +!missing-enum! _SFEARResultType not bound +!missing-enum! _SFTranscriptionOptions not bound +!missing-enum! _SFTranscriptionResultAttributeOptions not bound +!missing-field! _SFAnalysisContextTagContextualNamedEntities not bound +!missing-field! _SFAnalysisContextTagGeoLMRegionID not bound +!missing-field! _SFAnalysisContextTagLeftContext not bound +!missing-field! _SFAnalysisContextTagRightContext not bound +!missing-field! _SFAnalysisContextTagSelectedText not bound +!missing-protocol! _SFSpeechAnalyzerEndpointingResultDelegate not bound +!missing-protocol! _SFSpeechAnalyzerTranscriberResultDelegate not bound +!missing-selector! _SFAnalysisContext::contextualNamedEntities not bound +!missing-selector! _SFAnalysisContext::contextualStringsForKey: not bound +!missing-selector! _SFAnalysisContext::geoLMRegionID not bound +!missing-selector! _SFAnalysisContext::initWithAnalysisContext: not bound +!missing-selector! _SFAnalysisContext::setContextualNamedEntities: not bound +!missing-selector! _SFAnalysisContext::setContextualStrings:forKey: not bound +!missing-selector! _SFAnalysisContext::setGeoLMRegionID: not bound +!missing-selector! _SFAnalysisContext::setUserData:forKey: not bound +!missing-selector! _SFAnalysisContext::userDataForKey: not bound +!missing-selector! _SFAnalyzerTranscriptionSegment::alternatives not bound +!missing-selector! _SFAnalyzerTranscriptionSegment::initWithText:alternatives: not bound +!missing-selector! _SFAnalyzerTranscriptionSegment::text not bound +!missing-selector! _SFCommandRecognizerArgument::adpositionIndexes not bound +!missing-selector! _SFCommandRecognizerArgument::indexes not bound +!missing-selector! _SFCommandRecognizerArgument::initWithPresence:indexes:adpositionIndexes: not bound +!missing-selector! _SFCommandRecognizerArgument::presence not bound +!missing-selector! _SFCommandRecognizerInterpretation::arguments not bound +!missing-selector! _SFCommandRecognizerInterpretation::commandIdentifier not bound +!missing-selector! _SFCommandRecognizerInterpretation::initWithCommandIdentifier:suiteIdentifiers:range:verbIndexes:arguments: not bound +!missing-selector! _SFCommandRecognizerInterpretation::range not bound +!missing-selector! _SFCommandRecognizerInterpretation::suiteIdentifiers not bound +!missing-selector! _SFCommandRecognizerInterpretation::verbIndexes not bound +!missing-selector! _SFContextualNamedEntity::initWithPeopleSuggesterRecipientDisplayName: not bound +!missing-selector! _SFContextualNamedEntity::initWithPersonalizationPortraitName:score:category:language: not bound +!missing-selector! _SFEndpointingResult::eosLikelihood not bound +!missing-selector! _SFEndpointingResult::initWithRange:wordCount:eosLikelihood:pauseCounts:silencePosterior: not bound +!missing-selector! _SFEndpointingResult::pauseCounts not bound +!missing-selector! _SFEndpointingResult::range not bound +!missing-selector! _SFEndpointingResult::silencePosterior not bound +!missing-selector! _SFEndpointingResult::wordCount not bound +!missing-selector! _SFInputSequencer::addAudio: not bound +!missing-selector! _SFInputSequencer::finishAudio not bound +!missing-selector! _SFInputSequencer::init not bound +!missing-selector! _SFInputSequencer::underlyingObject not bound +!missing-selector! _SFModelDownloadRequest::downloadWithCompletion: not bound +!missing-selector! _SFModelDownloadRequest::progress not bound +!missing-selector! _SFSpeechAnalyzer::cancelPendingResultsAndPauseWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::finalizeAndFinishThrough:completion: not bound +!missing-selector! _SFSpeechAnalyzer::finalizeAndFinishThroughEndOfInputWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::finalizeAndFinishWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::finalizeThrough:completion: not bound +!missing-selector! _SFSpeechAnalyzer::finalizeWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::getContextWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::getModelInfoLanguageWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::getModelInfoTasksWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::getNextBufferStartTimeWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::getRecognitionStatisticsWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::getRecognitionUtterenceStatisticsWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::initWithClientIdentifier:inputSequence:audioFormat:transcriberResultDelegate:endpointingResultDelegate:queue:transcriberOptions:commandRecognizerOptions:options:restrictedLogging:geoLMRegionID:contextualNamedEntities:didChangeVolatileRange: not bound +!missing-selector! _SFSpeechAnalyzer::inputSequence not bound +!missing-selector! _SFSpeechAnalyzer::prepareToAnalyzeReportingInto:completion: not bound +!missing-selector! _SFSpeechAnalyzer::requestResultAtEndpointTimes: not bound +!missing-selector! _SFSpeechAnalyzer::resumeWithCompletion: not bound +!missing-selector! _SFSpeechAnalyzer::setDidChangeVolatileRange:completion: not bound +!missing-selector! _SFSpeechAnalyzerCommandRecognizerOptions::initWithVoiceCommandActiveSet: not bound +!missing-selector! _SFSpeechAnalyzerCommandRecognizerOptions::setVoiceCommandActiveSet: not bound +!missing-selector! _SFSpeechAnalyzerCommandRecognizerOptions::voiceCommandActiveSet not bound +!missing-selector! _SFSpeechAnalyzerOptions::highPriority not bound +!missing-selector! _SFSpeechAnalyzerOptions::initWithHighPriority:loggingInfo:powerContext: not bound +!missing-selector! _SFSpeechAnalyzerOptions::loggingInfo not bound +!missing-selector! _SFSpeechAnalyzerOptions::powerContext not bound +!missing-selector! _SFSpeechAnalyzerOptionsLoggingInfo::asrID not bound +!missing-selector! _SFSpeechAnalyzerOptionsLoggingInfo::initWithAsrID:requestID: not bound +!missing-selector! _SFSpeechAnalyzerOptionsLoggingInfo::requestID not bound +!missing-selector! _SFSpeechAnalyzerOptionsPowerContext::ane not bound +!missing-selector! _SFSpeechAnalyzerOptionsPowerContext::cpu not bound +!missing-selector! _SFSpeechAnalyzerOptionsPowerContext::gpu not bound +!missing-selector! _SFSpeechAnalyzerOptionsPowerContext::initWithAne:cpu:gpu: not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::attributeOptions not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::init not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::locale not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::modelOptions not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::setAttributeOptions: not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::setLocale: not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::setModelOptions: not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::setTaskHint: not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::setTranscriptionOptions: not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::taskHint not bound +!missing-selector! _SFSpeechAnalyzerTranscriberOptions::transcriptionOptions not bound +!missing-selector! _SFToken::confidence not bound +!missing-selector! _SFToken::duration not bound +!missing-selector! _SFToken::initWithText:confidence:startTime:duration: not bound +!missing-selector! _SFToken::startTime not bound +!missing-selector! _SFToken::text not bound +!missing-selector! _SFTranscriberModelOptions::farField not bound +!missing-selector! _SFTranscriberModelOptions::initWithSupplementalModelURL:farField:modelOverrideURL:speechProfileURLs:taskForMemoryLock: not bound +!missing-selector! _SFTranscriberModelOptions::modelOverrideURL not bound +!missing-selector! _SFTranscriberModelOptions::speechProfileURLs not bound +!missing-selector! _SFTranscriberModelOptions::supplementalModelURL not bound +!missing-selector! _SFTranscriberModelOptions::taskForMemoryLock not bound +!missing-selector! _SFTranscriberResult::contextualizedCommandRecognizerResult not bound +!missing-selector! _SFTranscriberResult::contextualizedTranscriberMultisegmentResult not bound +!missing-selector! _SFTranscriberResult::initWithRange:normalizedTranscriberMultisegmentResult:normalizedCommandRecognizerResult:contextualizedTranscriberMultisegmentResult:contextualizedCommandRecognizerResult: not bound +!missing-selector! _SFTranscriberResult::normalizedCommandRecognizerResult not bound +!missing-selector! _SFTranscriberResult::normalizedTranscriberMultisegmentResult not bound +!missing-selector! _SFTranscriberResult::range not bound +!missing-selector! _STCommandRecognizerResult::initWithTranscriptionCommands: not bound +!missing-selector! _STCommandRecognizerResult::transcriptionCommands not bound +!missing-selector! _STTranscriberMultisegmentResult::earResultType not bound +!missing-selector! _STTranscriberMultisegmentResult::initWithSegments:transcriptions:earResultType:nBestChoices:recognitionAudioRange: not bound +!missing-selector! _STTranscriberMultisegmentResult::nBestChoices not bound +!missing-selector! _STTranscriberMultisegmentResult::recognitionAudioRange not bound +!missing-selector! _STTranscriberMultisegmentResult::segments not bound +!missing-selector! _STTranscriberMultisegmentResult::transcriptions not bound +!missing-selector! +_SFSpeechAnalyzer::modelDownloadRequestForClientIdentifier:transcriberOptions: not bound +!missing-type! _SFAnalysisContext not bound +!missing-type! _SFAnalyzerTranscriptionSegment not bound +!missing-type! _SFCommandRecognizerArgument not bound +!missing-type! _SFCommandRecognizerInterpretation not bound +!missing-type! _SFContextualNamedEntity not bound +!missing-type! _SFEndpointingResult not bound +!missing-type! _SFInputSequencer not bound +!missing-type! _SFModelDownloadRequest not bound +!missing-type! _SFSpeechAnalyzer not bound +!missing-type! _SFSpeechAnalyzerCommandRecognizerOptions not bound +!missing-type! _SFSpeechAnalyzerOptions not bound +!missing-type! _SFSpeechAnalyzerOptionsLoggingInfo not bound +!missing-type! _SFSpeechAnalyzerOptionsPowerContext not bound +!missing-type! _SFSpeechAnalyzerTranscriberOptions not bound +!missing-type! _SFToken not bound +!missing-type! _SFTranscriberModelOptions not bound +!missing-type! _SFTranscriberResult not bound +!missing-type! _STCommandRecognizerResult not bound +!missing-type! _STTranscriberMultisegmentResult not bound + From 1d69965e626a14bf14ad55f1a98c840d6637dece Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Wed, 20 Sep 2023 23:35:03 +0000 Subject: [PATCH 2/3] Auto-format source code --- src/speech.cs | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/speech.cs b/src/speech.cs index 182a8170420c..8295277bedaf 100644 --- a/src/speech.cs +++ b/src/speech.cs @@ -49,7 +49,7 @@ public enum SFSpeechRecognizerAuthorizationStatus : long { Authorized, } - [Mac(14, 0), iOS(17, 0), MacCatalyst(17,0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum SFSpeechErrorCode : long { InternalServiceError = 1, @@ -86,8 +86,8 @@ interface SFSpeechRecognitionRequest { [Export ("addsPunctuation")] bool AddsPunctuation { get; set; } - [Mac(14, 0), iOS(17, 0), MacCatalyst(17, 0)] - [NullAllowed, Export("customizedLanguageModel", ArgumentSemantic.Copy)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NullAllowed, Export ("customizedLanguageModel", ArgumentSemantic.Copy)] SFSpeechLanguageModelConfiguration CustomizedLanguageModel { get; set; } } @@ -360,24 +360,24 @@ interface SFVoiceAnalytics : NSCopying, NSSecureCoding { SFAcousticFeature Voicing { get; } } - [Mac(14, 0), iOS(17, 0), MacCatalyst(17, 0)] - [BaseType(typeof(NSObject))] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] interface SFSpeechLanguageModelConfiguration : NSCopying { - [Export("initWithLanguageModel:")] - NativeHandle Constructor(NSUrl languageModel); + [Export ("initWithLanguageModel:")] + NativeHandle Constructor (NSUrl languageModel); - [Export("initWithLanguageModel:vocabulary:")] - NativeHandle Constructor(NSUrl languageModel, [NullAllowed] NSUrl vocabulary); + [Export ("initWithLanguageModel:vocabulary:")] + NativeHandle Constructor (NSUrl languageModel, [NullAllowed] NSUrl vocabulary); - [Export("languageModel", ArgumentSemantic.Copy)] + [Export ("languageModel", ArgumentSemantic.Copy)] NSUrl LanguageModel { get; } - [NullAllowed, Export("vocabulary", ArgumentSemantic.Copy)] + [NullAllowed, Export ("vocabulary", ArgumentSemantic.Copy)] NSUrl Vocabulary { get; } } - [Mac (14,0), iOS (17,0), MacCatalyst(17, 0)] - [BaseType (typeof(NSObject))] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SFSpeechLanguageModel { [Static] @@ -392,22 +392,22 @@ interface SFSpeechLanguageModel { } [Partial] - [Mac (14,0), iOS (17,0), MacCatalyst(17, 0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] interface SFAnalysisContextTag { - [Field("SFAnalysisContextTagLeftContext")] + [Field ("SFAnalysisContextTagLeftContext")] NSString LeftContext { get; } - [Field("SFAnalysisContextTagRightContext")] + [Field ("SFAnalysisContextTagRightContext")] NSString RightContext { get; } - [Field("SFAnalysisContextTagSelectedText")] + [Field ("SFAnalysisContextTagSelectedText")] NSString SelectedText { get; } } [Partial] - [Mac(14, 0), iOS(17, 0), MacCatalyst(17,0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] interface SFSpeech { - [Field("SFSpeechErrorDomain")] + [Field ("SFSpeechErrorDomain")] NSString ErrorDomain { get; } } } From 479fe99d005e06f723c1d332e3a87af073771fe9 Mon Sep 17 00:00:00 2001 From: Haritha Mohan Date: Wed, 20 Sep 2023 16:44:32 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Alex Soto --- src/speech.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/speech.cs b/src/speech.cs index 8295277bedaf..a70af92f1a12 100644 --- a/src/speech.cs +++ b/src/speech.cs @@ -51,6 +51,7 @@ public enum SFSpeechRecognizerAuthorizationStatus : long { [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] + [ErrorDomain ("SFSpeechErrorDomain")] public enum SFSpeechErrorCode : long { InternalServiceError = 1, UndefinedTemplateClassName = 7, @@ -403,11 +404,4 @@ interface SFAnalysisContextTag { [Field ("SFAnalysisContextTagSelectedText")] NSString SelectedText { get; } } - - [Partial] - [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] - interface SFSpeech { - [Field ("SFSpeechErrorDomain")] - NSString ErrorDomain { get; } - } }