Documentation
¶
Overview ¶
Package speech provides purego-based Go bindings for the macOS Speech framework.
Apple documentation: https://developer.apple.com/documentation/speech
Index ¶
- func SFSpeechErrorDomain() *foundation.NSString
- func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlClientIdentifierConfigurationCompletion(asset *foundation.NSURL, clientIdentifier *foundation.NSString, ...)
- func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlClientIdentifierConfigurationIgnoresCacheCompletion(asset *foundation.NSURL, clientIdentifier *foundation.NSString, ...)
- func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlConfigurationCompletion(asset *foundation.NSURL, configuration *SFSpeechLanguageModelConfiguration, ...)
- func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlConfigurationIgnoresCacheCompletion(asset *foundation.NSURL, configuration *SFSpeechLanguageModelConfiguration, ...)
- func SFSpeechRecognizerRequestAuthorization(handler func(SFSpeechRecognizerAuthorizationStatus))
- func SFSpeechRecognizerSupportedLocales() *foundation.NSSet[*foundation.NSLocale]
- type Acl_entry_id_t
- type Acl_flag_t
- type Acl_perm_t
- type Acl_tag_t
- type Acl_type_t
- type CGLCPContextPriorityRequest
- type Clockid_t
- type Dispatch_autorelease_frequency_t
- type Dispatch_block_flags_t
- type EvCmd
- type Filesec_property_t
- type Idtype_t
- type Ipc_info_object_type_t
- type Launch_data_type_t
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type Mach_vm_range_flags_t
- type Mach_vm_range_flavor_t
- type Mach_vm_range_tag_t
- type Mpo_flags_t
- type NXMouseButton
- type Os_clockid_t
- type PMPageToPaperMappingType
- type Ptrauth_key
- type Qos_class_t
- type SFAcousticFeature
- type SFSpeechAudioBufferRecognitionRequest
- func (o *SFSpeechAudioBufferRecognitionRequest) AppendAudioPCMBuffer(audioPCMBuffer *avfaudio.AVAudioPCMBuffer)
- func (o *SFSpeechAudioBufferRecognitionRequest) AppendAudioSampleBuffer(sampleBuffer unsafe.Pointer)
- func (o *SFSpeechAudioBufferRecognitionRequest) EndAudio()
- func (o *SFSpeechAudioBufferRecognitionRequest) NativeAudioFormat() *avfaudio.AVAudioFormat
- type SFSpeechErrorCode
- type SFSpeechLanguageModel
- type SFSpeechLanguageModelConfiguration
- func (o *SFSpeechLanguageModelConfiguration) InitWithLanguageModel(languageModel *foundation.NSURL) *SFSpeechLanguageModelConfiguration
- func (o *SFSpeechLanguageModelConfiguration) InitWithLanguageModelVocabulary(languageModel *foundation.NSURL, vocabulary *foundation.NSURL) *SFSpeechLanguageModelConfiguration
- func (o *SFSpeechLanguageModelConfiguration) InitWithLanguageModelVocabularyWeight(languageModel *foundation.NSURL, vocabulary *foundation.NSURL, ...) *SFSpeechLanguageModelConfiguration
- func (o *SFSpeechLanguageModelConfiguration) LanguageModel() *foundation.NSURL
- func (o *SFSpeechLanguageModelConfiguration) Vocabulary() *foundation.NSURL
- func (o *SFSpeechLanguageModelConfiguration) Weight() *foundation.NSNumber
- type SFSpeechRecognitionMetadata
- func (o *SFSpeechRecognitionMetadata) AveragePauseDuration() float64
- func (o *SFSpeechRecognitionMetadata) SpeakingRate() float64
- func (o *SFSpeechRecognitionMetadata) SpeechDuration() float64
- func (o *SFSpeechRecognitionMetadata) SpeechStartTimestamp() float64
- func (o *SFSpeechRecognitionMetadata) VoiceAnalytics() *SFVoiceAnalytics
- type SFSpeechRecognitionRequest
- func (o *SFSpeechRecognitionRequest) AddsPunctuation() bool
- func (o *SFSpeechRecognitionRequest) ContextualStrings() *foundation.NSArray[*foundation.NSString]
- func (o *SFSpeechRecognitionRequest) CustomizedLanguageModel() *SFSpeechLanguageModelConfiguration
- func (o *SFSpeechRecognitionRequest) InteractionIdentifier() *foundation.NSString
- func (o *SFSpeechRecognitionRequest) RequiresOnDeviceRecognition() bool
- func (o *SFSpeechRecognitionRequest) SetAddsPunctuation(addsPunctuation bool)
- func (o *SFSpeechRecognitionRequest) SetContextualStrings(contextualStrings *foundation.NSArray[*foundation.NSString])
- func (o *SFSpeechRecognitionRequest) SetCustomizedLanguageModel(customizedLanguageModel *SFSpeechLanguageModelConfiguration)
- func (o *SFSpeechRecognitionRequest) SetInteractionIdentifier(interactionIdentifier *foundation.NSString)deprecated
- func (o *SFSpeechRecognitionRequest) SetRequiresOnDeviceRecognition(requiresOnDeviceRecognition bool)
- func (o *SFSpeechRecognitionRequest) SetShouldReportPartialResults(shouldReportPartialResults bool)
- func (o *SFSpeechRecognitionRequest) SetTaskHint(taskHint SFSpeechRecognitionTaskHint)
- func (o *SFSpeechRecognitionRequest) ShouldReportPartialResults() bool
- func (o *SFSpeechRecognitionRequest) TaskHint() SFSpeechRecognitionTaskHint
- type SFSpeechRecognitionResult
- func (o *SFSpeechRecognitionResult) BestTranscription() *SFTranscription
- func (o *SFSpeechRecognitionResult) IsFinal() bool
- func (o *SFSpeechRecognitionResult) SpeechRecognitionMetadata() *SFSpeechRecognitionMetadata
- func (o *SFSpeechRecognitionResult) Transcriptions() *foundation.NSArray[*SFTranscription]
- type SFSpeechRecognitionTask
- func (o *SFSpeechRecognitionTask) Cancel()
- func (o *SFSpeechRecognitionTask) Error() unsafe.Pointer
- func (o *SFSpeechRecognitionTask) Finish()
- func (o *SFSpeechRecognitionTask) IsCancelled() bool
- func (o *SFSpeechRecognitionTask) IsFinishing() bool
- func (o *SFSpeechRecognitionTask) State() SFSpeechRecognitionTaskState
- type SFSpeechRecognitionTaskDelegate
- type SFSpeechRecognitionTaskHint
- type SFSpeechRecognitionTaskState
- type SFSpeechRecognizer
- func (o *SFSpeechRecognizer) DefaultTaskHint() SFSpeechRecognitionTaskHint
- func (o *SFSpeechRecognizer) Delegate() SFSpeechRecognizerDelegate
- func (o *SFSpeechRecognizer) Init() *SFSpeechRecognizer
- func (o *SFSpeechRecognizer) InitWithLocale(locale *foundation.NSLocale) *SFSpeechRecognizer
- func (o *SFSpeechRecognizer) IsAvailable() bool
- func (o *SFSpeechRecognizer) Locale() *foundation.NSLocale
- func (o *SFSpeechRecognizer) Queue() *foundation.NSOperationQueue
- func (o *SFSpeechRecognizer) RecognitionTaskWithRequestDelegate(request *SFSpeechRecognitionRequest, delegate SFSpeechRecognitionTaskDelegate) *SFSpeechRecognitionTask
- func (o *SFSpeechRecognizer) RecognitionTaskWithRequestResultHandler(request *SFSpeechRecognitionRequest, ...) *SFSpeechRecognitionTask
- func (o *SFSpeechRecognizer) SetDefaultTaskHint(defaultTaskHint SFSpeechRecognitionTaskHint)
- func (o *SFSpeechRecognizer) SetDelegate(delegate SFSpeechRecognizerDelegate)
- func (o *SFSpeechRecognizer) SetQueue(queue *foundation.NSOperationQueue)
- func (o *SFSpeechRecognizer) SetSupportsOnDeviceRecognition(supportsOnDeviceRecognition bool)
- func (o *SFSpeechRecognizer) SupportsOnDeviceRecognition() bool
- type SFSpeechRecognizerAuthorizationStatus
- type SFSpeechRecognizerDelegate
- type SFSpeechURLRecognitionRequest
- type SFTranscription
- type SFTranscriptionSegment
- func (o *SFTranscriptionSegment) AlternativeSubstrings() *foundation.NSArray[*foundation.NSString]
- func (o *SFTranscriptionSegment) Confidence() float32
- func (o *SFTranscriptionSegment) Duration() float64
- func (o *SFTranscriptionSegment) Substring() *foundation.NSString
- func (o *SFTranscriptionSegment) SubstringRange() foundation.NSRange
- func (o *SFTranscriptionSegment) Timestamp() float64
- func (o *SFTranscriptionSegment) VoiceAnalytics() *SFVoiceAnalytics
- type SFVoiceAnalytics
- type Virtual_memory_guard_exception_code_t
- type Xpc_listener_create_flags_t
- type Xpc_session_create_flags_t
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SFSpeechErrorDomain ¶
func SFSpeechErrorDomain() *foundation.NSString
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlClientIdentifierConfigurationCompletion ¶
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlClientIdentifierConfigurationCompletion(asset *foundation.NSURL, clientIdentifier *foundation.NSString, configuration *SFSpeechLanguageModelConfiguration, completion func(unsafe.Pointer))
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlClientIdentifierConfigurationIgnoresCacheCompletion ¶
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlClientIdentifierConfigurationIgnoresCacheCompletion(asset *foundation.NSURL, clientIdentifier *foundation.NSString, configuration *SFSpeechLanguageModelConfiguration, ignoresCache bool, completion func(unsafe.Pointer))
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlConfigurationCompletion ¶
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlConfigurationCompletion(asset *foundation.NSURL, configuration *SFSpeechLanguageModelConfiguration, completion func(unsafe.Pointer))
Creates a language model from custom training data.
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlConfigurationIgnoresCacheCompletion ¶
func SFSpeechLanguageModelPrepareCustomLanguageModelForUrlConfigurationIgnoresCacheCompletion(asset *foundation.NSURL, configuration *SFSpeechLanguageModelConfiguration, ignoresCache bool, completion func(unsafe.Pointer))
Creates a language model from custom training data.
func SFSpeechRecognizerRequestAuthorization ¶
func SFSpeechRecognizerRequestAuthorization(handler func(SFSpeechRecognizerAuthorizationStatus))
Asks the user to allow your app to perform speech recognition.
func SFSpeechRecognizerSupportedLocales ¶
func SFSpeechRecognizerSupportedLocales() *foundation.NSSet[*foundation.NSLocale]
Returns the set of locales that are supported by the speech recognizer.
Types ¶
type Acl_entry_id_t ¶
type Acl_entry_id_t int64
const ( ACL_FIRST_ENTRY Acl_entry_id_t = 0 ACL_NEXT_ENTRY Acl_entry_id_t = -1 ACL_LAST_ENTRY Acl_entry_id_t = -2 )
func (Acl_entry_id_t) String ¶
func (e Acl_entry_id_t) String() string
type Acl_flag_t ¶
type Acl_flag_t int64
const ( ACL_FLAG_DEFER_INHERIT Acl_flag_t = 1 ACL_FLAG_NO_INHERIT Acl_flag_t = 131072 ACL_ENTRY_INHERITED Acl_flag_t = 16 ACL_ENTRY_FILE_INHERIT Acl_flag_t = 32 ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64 ACL_ENTRY_LIMIT_INHERIT Acl_flag_t = 128 ACL_ENTRY_ONLY_INHERIT Acl_flag_t = 256 )
func (Acl_flag_t) String ¶
func (e Acl_flag_t) String() string
type Acl_perm_t ¶
type Acl_perm_t int64
const ( ACL_READ_DATA Acl_perm_t = 2 ACL_LIST_DIRECTORY Acl_perm_t = 2 ACL_WRITE_DATA Acl_perm_t = 4 ACL_ADD_FILE Acl_perm_t = 4 ACL_EXECUTE Acl_perm_t = 8 ACL_SEARCH Acl_perm_t = 8 ACL_DELETE Acl_perm_t = 16 ACL_APPEND_DATA Acl_perm_t = 32 ACL_ADD_SUBDIRECTORY Acl_perm_t = 32 ACL_DELETE_CHILD Acl_perm_t = 64 ACL_READ_ATTRIBUTES Acl_perm_t = 128 ACL_WRITE_ATTRIBUTES Acl_perm_t = 256 ACL_READ_EXTATTRIBUTES Acl_perm_t = 512 ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024 ACL_READ_SECURITY Acl_perm_t = 2048 ACL_WRITE_SECURITY Acl_perm_t = 4096 ACL_CHANGE_OWNER Acl_perm_t = 8192 ACL_SYNCHRONIZE Acl_perm_t = 1048576 )
func (Acl_perm_t) String ¶
func (e Acl_perm_t) String() string
type Acl_type_t ¶
type Acl_type_t int64
const ( ACL_TYPE_EXTENDED Acl_type_t = 256 ACL_TYPE_ACCESS Acl_type_t = 0 ACL_TYPE_DEFAULT Acl_type_t = 1 ACL_TYPE_AFS Acl_type_t = 2 ACL_TYPE_CODA Acl_type_t = 3 ACL_TYPE_NTFS Acl_type_t = 4 ACL_TYPE_NWFS Acl_type_t = 5 )
func (Acl_type_t) String ¶
func (e Acl_type_t) String() string
type CGLCPContextPriorityRequest ¶
type CGLCPContextPriorityRequest int64
const ( KCGLCPContextPriorityRequestHigh CGLCPContextPriorityRequest = 0 KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1 KCGLCPContextPriorityRequestLow CGLCPContextPriorityRequest = 2 )
func (CGLCPContextPriorityRequest) String ¶
func (e CGLCPContextPriorityRequest) String() string
type Dispatch_autorelease_frequency_t ¶
type Dispatch_autorelease_frequency_t uint64
const ( DISPATCH_AUTORELEASE_FREQUENCY_INHERIT Dispatch_autorelease_frequency_t = 0 DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1 DISPATCH_AUTORELEASE_FREQUENCY_NEVER Dispatch_autorelease_frequency_t = 2 )
func (Dispatch_autorelease_frequency_t) String ¶
func (e Dispatch_autorelease_frequency_t) String() string
type Dispatch_block_flags_t ¶
type Dispatch_block_flags_t uint64
const ( DISPATCH_BLOCK_BARRIER Dispatch_block_flags_t = 1 DISPATCH_BLOCK_DETACHED Dispatch_block_flags_t = 2 DISPATCH_BLOCK_ASSIGN_CURRENT Dispatch_block_flags_t = 4 DISPATCH_BLOCK_NO_QOS_CLASS Dispatch_block_flags_t = 8 DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16 DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32 )
func (Dispatch_block_flags_t) String ¶
func (e Dispatch_block_flags_t) String() string
type Filesec_property_t ¶
type Filesec_property_t int64
const ( FILESEC_OWNER Filesec_property_t = 1 FILESEC_GROUP Filesec_property_t = 2 FILESEC_UUID Filesec_property_t = 3 FILESEC_MODE Filesec_property_t = 4 FILESEC_ACL Filesec_property_t = 5 FILESEC_GRPUUID Filesec_property_t = 6 FILESEC_ACL_RAW Filesec_property_t = 100 FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101 )
func (Filesec_property_t) String ¶
func (e Filesec_property_t) String() string
type Ipc_info_object_type_t ¶
type Ipc_info_object_type_t int64
const ( IPC_OTYPE_NONE Ipc_info_object_type_t = 0 IPC_OTYPE_THREAD_CONTROL Ipc_info_object_type_t = 1 IPC_OTYPE_TASK_CONTROL Ipc_info_object_type_t = 2 IPC_OTYPE_HOST Ipc_info_object_type_t = 3 IPC_OTYPE_HOST_PRIV Ipc_info_object_type_t = 4 IPC_OTYPE_PROCESSOR Ipc_info_object_type_t = 5 IPC_OTYPE_PROCESSOR_SET Ipc_info_object_type_t = 6 IPC_OTYPE_PROCESSOR_SET_NAME Ipc_info_object_type_t = 7 IPC_OTYPE_TIMER Ipc_info_object_type_t = 8 IPC_OTYPE_PORT_SUBST_ONCE Ipc_info_object_type_t = 9 IPC_OTYPE_MIG Ipc_info_object_type_t = 10 IPC_OTYPE_MEMORY_OBJECT Ipc_info_object_type_t = 11 IPC_OTYPE_XMM_PAGER Ipc_info_object_type_t = 12 IPC_OTYPE_XMM_KERNEL Ipc_info_object_type_t = 13 IPC_OTYPE_XMM_REPLY Ipc_info_object_type_t = 14 IPC_OTYPE_UND_REPLY Ipc_info_object_type_t = 15 IPC_OTYPE_HOST_NOTIFY Ipc_info_object_type_t = 16 IPC_OTYPE_HOST_SECURITY Ipc_info_object_type_t = 17 IPC_OTYPE_LEDGER Ipc_info_object_type_t = 18 IPC_OTYPE_MAIN_DEVICE Ipc_info_object_type_t = 19 IPC_OTYPE_TASK_NAME Ipc_info_object_type_t = 20 IPC_OTYPE_SUBSYSTEM Ipc_info_object_type_t = 21 IPC_OTYPE_IO_DONE_QUEUE Ipc_info_object_type_t = 22 IPC_OTYPE_SEMAPHORE Ipc_info_object_type_t = 23 IPC_OTYPE_LOCK_SET Ipc_info_object_type_t = 24 IPC_OTYPE_CLOCK Ipc_info_object_type_t = 25 IPC_OTYPE_CLOCK_CTRL Ipc_info_object_type_t = 26 IPC_OTYPE_IOKIT_IDENT Ipc_info_object_type_t = 27 IPC_OTYPE_NAMED_ENTRY Ipc_info_object_type_t = 28 IPC_OTYPE_IOKIT_CONNECT Ipc_info_object_type_t = 29 IPC_OTYPE_IOKIT_OBJECT Ipc_info_object_type_t = 30 IPC_OTYPE_UPL Ipc_info_object_type_t = 31 IPC_OTYPE_MEM_OBJ_CONTROL Ipc_info_object_type_t = 32 IPC_OTYPE_AU_SESSIONPORT Ipc_info_object_type_t = 33 IPC_OTYPE_FILEPORT Ipc_info_object_type_t = 34 IPC_OTYPE_LABELH Ipc_info_object_type_t = 35 IPC_OTYPE_TASK_RESUME Ipc_info_object_type_t = 36 IPC_OTYPE_VOUCHER Ipc_info_object_type_t = 37 IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38 IPC_OTYPE_WORK_INTERVAL Ipc_info_object_type_t = 39 IPC_OTYPE_UX_HANDLER Ipc_info_object_type_t = 40 IPC_OTYPE_UEXT_OBJECT Ipc_info_object_type_t = 41 IPC_OTYPE_ARCADE_REG Ipc_info_object_type_t = 42 IPC_OTYPE_EVENTLINK Ipc_info_object_type_t = 43 IPC_OTYPE_TASK_INSPECT Ipc_info_object_type_t = 44 IPC_OTYPE_TASK_READ Ipc_info_object_type_t = 45 IPC_OTYPE_THREAD_INSPECT Ipc_info_object_type_t = 46 IPC_OTYPE_THREAD_READ Ipc_info_object_type_t = 47 IPC_OTYPE_SUID_CRED Ipc_info_object_type_t = 48 IPC_OTYPE_HYPERVISOR Ipc_info_object_type_t = 49 IPC_OTYPE_TASK_ID_TOKEN Ipc_info_object_type_t = 50 IPC_OTYPE_TASK_FATAL Ipc_info_object_type_t = 51 IPC_OTYPE_KCDATA Ipc_info_object_type_t = 52 IPC_OTYPE_EXCLAVES_RESOURCE Ipc_info_object_type_t = 53 IPC_OTYPE_THREAD_RESUME Ipc_info_object_type_t = 54 IPC_OTYPE_UNKNOWN Ipc_info_object_type_t = 4294967295 )
func (Ipc_info_object_type_t) String ¶
func (e Ipc_info_object_type_t) String() string
type Launch_data_type_t ¶
type Launch_data_type_t int64
const ( LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1 LAUNCH_DATA_ARRAY Launch_data_type_t = 2 LAUNCH_DATA_FD Launch_data_type_t = 3 LAUNCH_DATA_INTEGER Launch_data_type_t = 4 LAUNCH_DATA_REAL Launch_data_type_t = 5 LAUNCH_DATA_BOOL Launch_data_type_t = 6 LAUNCH_DATA_STRING Launch_data_type_t = 7 LAUNCH_DATA_OPAQUE Launch_data_type_t = 8 LAUNCH_DATA_ERRNO Launch_data_type_t = 9 LAUNCH_DATA_MACHPORT Launch_data_type_t = 10 )
func (Launch_data_type_t) String ¶
func (e Launch_data_type_t) String() string
type MDLabelDomain ¶
type MDLabelDomain int64
@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int64
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int64
@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
type Mach_vm_range_flags_t ¶
type Mach_vm_range_flags_t int64
const (
MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)
func (Mach_vm_range_flags_t) String ¶
func (e Mach_vm_range_flags_t) String() string
type Mach_vm_range_flavor_t ¶
type Mach_vm_range_flavor_t int64
const ( MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0 MACH_VM_RANGE_FLAVOR_V1 Mach_vm_range_flavor_t = 1 )
func (Mach_vm_range_flavor_t) String ¶
func (e Mach_vm_range_flavor_t) String() string
type Mach_vm_range_tag_t ¶
type Mach_vm_range_tag_t int64
const ( MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0 MACH_VM_RANGE_DATA Mach_vm_range_tag_t = 1 MACH_VM_RANGE_FIXED Mach_vm_range_tag_t = 2 )
func (Mach_vm_range_tag_t) String ¶
func (e Mach_vm_range_tag_t) String() string
type Mpo_flags_t ¶
type Mpo_flags_t int64
const ( MPO_PORT Mpo_flags_t = 0 MPO_SERVICE_PORT Mpo_flags_t = 1024 MPO_CONNECTION_PORT Mpo_flags_t = 2048 MPO_REPLY_PORT Mpo_flags_t = 4096 MPO_WEAK_REPLY_PORT Mpo_flags_t = 16384 MPO_NOTIFICATION_PORT Mpo_flags_t = 17408 MPO_EXCEPTION_PORT Mpo_flags_t = 32768 MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536 )
func (Mpo_flags_t) String ¶
func (e Mpo_flags_t) String() string
type NXMouseButton ¶
type NXMouseButton int64
const ( NX_OneButton NXMouseButton = 0 NX_LeftButton NXMouseButton = 1 NX_RightButton NXMouseButton = 2 )
func (NXMouseButton) String ¶
func (e NXMouseButton) String() string
type Os_clockid_t ¶
type Os_clockid_t int64
const (
OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)
func (Os_clockid_t) String ¶
func (e Os_clockid_t) String() string
type PMPageToPaperMappingType ¶
type PMPageToPaperMappingType int64
const ( KPMPageToPaperMappingNone PMPageToPaperMappingType = 1 KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2 )
func (PMPageToPaperMappingType) String ¶
func (e PMPageToPaperMappingType) String() string
type Ptrauth_key ¶
type Ptrauth_key int64
const ( Ptrauth_key_none Ptrauth_key = -1 Ptrauth_key_asia Ptrauth_key = 0 Ptrauth_key_asib Ptrauth_key = 1 Ptrauth_key_asda Ptrauth_key = 2 Ptrauth_key_asdb Ptrauth_key = 3 Ptrauth_key_process_independent_code Ptrauth_key = 0 Ptrauth_key_process_dependent_code Ptrauth_key = 1 Ptrauth_key_process_independent_data Ptrauth_key = 2 Ptrauth_key_process_dependent_data Ptrauth_key = 3 Ptrauth_key_return_address Ptrauth_key = 1 Ptrauth_key_frame_pointer Ptrauth_key = 3 Ptrauth_key_function_pointer Ptrauth_key = 0 Ptrauth_key_block_function Ptrauth_key = 0 Ptrauth_key_cxx_vtable_pointer Ptrauth_key = 2 Ptrauth_key_method_list_pointer Ptrauth_key = 2 Ptrauth_key_objc_isa_pointer Ptrauth_key = 2 Ptrauth_key_objc_super_pointer Ptrauth_key = 2 Ptrauth_key_objc_sel_pointer Ptrauth_key = 3 Ptrauth_key_objc_class_ro_pointer Ptrauth_key = 2 Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2 Ptrauth_key_init_fini_pointer Ptrauth_key = 0 )
func (Ptrauth_key) String ¶
func (e Ptrauth_key) String() string
type Qos_class_t ¶
type Qos_class_t uint32
const ( QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33 QOS_CLASS_USER_INITIATED Qos_class_t = 25 QOS_CLASS_DEFAULT Qos_class_t = 21 QOS_CLASS_UTILITY Qos_class_t = 17 QOS_CLASS_BACKGROUND Qos_class_t = 9 QOS_CLASS_UNSPECIFIED Qos_class_t = 0 )
func (Qos_class_t) String ¶
func (e Qos_class_t) String() string
type SFAcousticFeature ¶
type SFAcousticFeature struct {
foundation.NSObject
}
The value of a voice analysis metric.
Apple documentation: https://developer.apple.com/documentation/speech/sfacousticfeature
func SFAcousticFeatureFromID ¶
func SFAcousticFeatureFromID(id objc.ID) *SFAcousticFeature
func (*SFAcousticFeature) AcousticFeatureValuePerFrame ¶
func (o *SFAcousticFeature) AcousticFeatureValuePerFrame() *foundation.NSArray[*foundation.NSNumber]
An array of feature values, one value per audio frame, corresponding to a transcript segment of recorded audio.
func (*SFAcousticFeature) FrameDuration ¶
func (o *SFAcousticFeature) FrameDuration() float64
The duration of the audio frame.
type SFSpeechAudioBufferRecognitionRequest ¶
type SFSpeechAudioBufferRecognitionRequest struct {
SFSpeechRecognitionRequest
}
A request to recognize speech from captured audio content, such as audio from the device’s microphone.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechaudiobufferrecognitionrequest
func SFSpeechAudioBufferRecognitionRequestFromID ¶
func SFSpeechAudioBufferRecognitionRequestFromID(id objc.ID) *SFSpeechAudioBufferRecognitionRequest
func (*SFSpeechAudioBufferRecognitionRequest) AppendAudioPCMBuffer ¶
func (o *SFSpeechAudioBufferRecognitionRequest) AppendAudioPCMBuffer(audioPCMBuffer *avfaudio.AVAudioPCMBuffer)
Appends audio in the PCM format to the end of the recognition request.
func (*SFSpeechAudioBufferRecognitionRequest) AppendAudioSampleBuffer ¶
func (o *SFSpeechAudioBufferRecognitionRequest) AppendAudioSampleBuffer(sampleBuffer unsafe.Pointer)
Appends audio to the end of the recognition request.
func (*SFSpeechAudioBufferRecognitionRequest) EndAudio ¶
func (o *SFSpeechAudioBufferRecognitionRequest) EndAudio()
Marks the end of audio input for the recognition request.
func (*SFSpeechAudioBufferRecognitionRequest) NativeAudioFormat ¶
func (o *SFSpeechAudioBufferRecognitionRequest) NativeAudioFormat() *avfaudio.AVAudioFormat
The preferred audio format for optimal speech recognition. Use the audio format in this property as a hint for optimal recording, but don't depend on the value remaining unchanged.
type SFSpeechErrorCode ¶
type SFSpeechErrorCode int64
Error codes that can be thrown under the Speech framework’s error domain.
const ( // There was an internal error. SFSpeechErrorCodeInternalServiceError SFSpeechErrorCode = 1 // The audio file could not be read. SFSpeechErrorCodeAudioReadFailed SFSpeechErrorCode = 2 // The custom language model templates were malformed. SFSpeechErrorCodeUndefinedTemplateClassName SFSpeechErrorCode = 7 // The custom language model file was malformed. SFSpeechErrorCodeMalformedSupplementalModel SFSpeechErrorCode = 8 // The operation timed out. SFSpeechErrorCodeTimeout SFSpeechErrorCode = 12 // A required parameter is missing/nil. SFSpeechErrorCodeMissingParameter SFSpeechErrorCode = 13 )
func (SFSpeechErrorCode) String ¶
func (e SFSpeechErrorCode) String() string
type SFSpeechLanguageModel ¶
type SFSpeechLanguageModel struct {
foundation.NSObject
}
A language model built from custom training data.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechlanguagemodel
func SFSpeechLanguageModelFromID ¶
func SFSpeechLanguageModelFromID(id objc.ID) *SFSpeechLanguageModel
type SFSpeechLanguageModelConfiguration ¶
type SFSpeechLanguageModelConfiguration struct {
foundation.NSObject
}
An object describing the location of a custom language model and specialized vocabulary.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechlanguagemodelconfiguration
func SFSpeechLanguageModelConfigurationFromID ¶
func SFSpeechLanguageModelConfigurationFromID(id objc.ID) *SFSpeechLanguageModelConfiguration
func (*SFSpeechLanguageModelConfiguration) InitWithLanguageModel ¶
func (o *SFSpeechLanguageModelConfiguration) InitWithLanguageModel(languageModel *foundation.NSURL) *SFSpeechLanguageModelConfiguration
Creates a configuration with the location of a language model file.
func (*SFSpeechLanguageModelConfiguration) InitWithLanguageModelVocabulary ¶
func (o *SFSpeechLanguageModelConfiguration) InitWithLanguageModelVocabulary(languageModel *foundation.NSURL, vocabulary *foundation.NSURL) *SFSpeechLanguageModelConfiguration
Creates a configuration with the locations of language model and vocabulary files.
func (*SFSpeechLanguageModelConfiguration) InitWithLanguageModelVocabularyWeight ¶
func (o *SFSpeechLanguageModelConfiguration) InitWithLanguageModelVocabularyWeight(languageModel *foundation.NSURL, vocabulary *foundation.NSURL, weight *foundation.NSNumber) *SFSpeechLanguageModelConfiguration
Creates a configuration with the locations of language model and vocabulary files, and custom weight.
func (*SFSpeechLanguageModelConfiguration) LanguageModel ¶
func (o *SFSpeechLanguageModelConfiguration) LanguageModel() *foundation.NSURL
The location of a compiled language model file.
func (*SFSpeechLanguageModelConfiguration) Vocabulary ¶
func (o *SFSpeechLanguageModelConfiguration) Vocabulary() *foundation.NSURL
The location of a compiled vocabulary file.
func (*SFSpeechLanguageModelConfiguration) Weight ¶
func (o *SFSpeechLanguageModelConfiguration) Weight() *foundation.NSNumber
The relative weight of the language model customization. Value must be between 0.0 and 1.0 inclusive.
type SFSpeechRecognitionMetadata ¶
type SFSpeechRecognitionMetadata struct {
foundation.NSObject
}
The metadata of speech in the audio of a speech recognition request.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechrecognitionmetadata
func SFSpeechRecognitionMetadataFromID ¶
func SFSpeechRecognitionMetadataFromID(id objc.ID) *SFSpeechRecognitionMetadata
func (*SFSpeechRecognitionMetadata) AveragePauseDuration ¶
func (o *SFSpeechRecognitionMetadata) AveragePauseDuration() float64
The average pause duration between words, measured in seconds.
func (*SFSpeechRecognitionMetadata) SpeakingRate ¶
func (o *SFSpeechRecognitionMetadata) SpeakingRate() float64
The number of words spoken per minute.
func (*SFSpeechRecognitionMetadata) SpeechDuration ¶
func (o *SFSpeechRecognitionMetadata) SpeechDuration() float64
The duration in seconds of speech in the audio.
func (*SFSpeechRecognitionMetadata) SpeechStartTimestamp ¶
func (o *SFSpeechRecognitionMetadata) SpeechStartTimestamp() float64
The start timestamp of speech in the audio.
func (*SFSpeechRecognitionMetadata) VoiceAnalytics ¶
func (o *SFSpeechRecognitionMetadata) VoiceAnalytics() *SFVoiceAnalytics
An analysis of the transcription segment's vocal properties.
type SFSpeechRecognitionRequest ¶
type SFSpeechRecognitionRequest struct {
foundation.NSObject
}
An abstract class that represents a request to recognize speech from an audio source.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechrecognitionrequest
func SFSpeechRecognitionRequestFromID ¶
func SFSpeechRecognitionRequestFromID(id objc.ID) *SFSpeechRecognitionRequest
func (*SFSpeechRecognitionRequest) AddsPunctuation ¶
func (o *SFSpeechRecognitionRequest) AddsPunctuation() bool
A Boolean value that indicates whether to add punctuation to speech recognition results. Set this property to `true` for the speech framework to automatically include punctuation in the recognition results. Punctuation includes a period or question mark at the end of a sentence, and a comma within a sentence.
func (*SFSpeechRecognitionRequest) ContextualStrings ¶
func (o *SFSpeechRecognitionRequest) ContextualStrings() *foundation.NSArray[*foundation.NSString]
An array of phrases that should be recognized, even if they are not in the system vocabulary. Use this property to specify short custom phrases that are unique to your app. You might include phrases with the names of characters, products, or places that are specific to your app. You might also include domain-specific terminology or unusual or made-up words. Assigning custom phrases to this property improves the likelihood of those phrases being recognized. Keep phrases relatively brief, limiting them to one or two words whenever possible. Lengthy phrases are less likely to be recognized. In addition, try to limit each phrase to something the user can say without pausing. Limit the total number of phrases to no more than 100.
func (*SFSpeechRecognitionRequest) CustomizedLanguageModel ¶
func (o *SFSpeechRecognitionRequest) CustomizedLanguageModel() *SFSpeechLanguageModelConfiguration
func (*SFSpeechRecognitionRequest) InteractionIdentifier ¶
func (o *SFSpeechRecognitionRequest) InteractionIdentifier() *foundation.NSString
An identifier string that you use to describe the type of interaction associated with the speech recognition request. If different parts of your app have different speech recognition needs, you can use this property to identify the part of your app that is making each request. For example, if one part of your app lets users speak phone numbers and another part lets users speak street addresses, consistently identifying the part of the app that makes a recognition request may help improve the accuracy of the results. Deprecated: since macOS 12.0.
func (*SFSpeechRecognitionRequest) RequiresOnDeviceRecognition ¶
func (o *SFSpeechRecognitionRequest) RequiresOnDeviceRecognition() bool
A Boolean value that determines whether a request must keep its audio data on the device. Set this property to `true` to prevent an “SFSpeechRecognitionRequest“ from sending audio over the network. However, on-device requests won't be as accurate. > Note: > The request only honors this setting if the “SFSpeechRecognizer/supportsOnDeviceRecognition“ (“SFSpeechRecognizer“) property is also `true`.
func (*SFSpeechRecognitionRequest) SetAddsPunctuation ¶
func (o *SFSpeechRecognitionRequest) SetAddsPunctuation(addsPunctuation bool)
func (*SFSpeechRecognitionRequest) SetContextualStrings ¶
func (o *SFSpeechRecognitionRequest) SetContextualStrings(contextualStrings *foundation.NSArray[*foundation.NSString])
func (*SFSpeechRecognitionRequest) SetCustomizedLanguageModel ¶
func (o *SFSpeechRecognitionRequest) SetCustomizedLanguageModel(customizedLanguageModel *SFSpeechLanguageModelConfiguration)
func (*SFSpeechRecognitionRequest) SetInteractionIdentifier
deprecated
func (o *SFSpeechRecognitionRequest) SetInteractionIdentifier(interactionIdentifier *foundation.NSString)
Deprecated: since macOS 12.0.
func (*SFSpeechRecognitionRequest) SetRequiresOnDeviceRecognition ¶
func (o *SFSpeechRecognitionRequest) SetRequiresOnDeviceRecognition(requiresOnDeviceRecognition bool)
func (*SFSpeechRecognitionRequest) SetShouldReportPartialResults ¶
func (o *SFSpeechRecognitionRequest) SetShouldReportPartialResults(shouldReportPartialResults bool)
func (*SFSpeechRecognitionRequest) SetTaskHint ¶
func (o *SFSpeechRecognitionRequest) SetTaskHint(taskHint SFSpeechRecognitionTaskHint)
func (*SFSpeechRecognitionRequest) ShouldReportPartialResults ¶
func (o *SFSpeechRecognitionRequest) ShouldReportPartialResults() bool
func (*SFSpeechRecognitionRequest) TaskHint ¶
func (o *SFSpeechRecognitionRequest) TaskHint() SFSpeechRecognitionTaskHint
A value that indicates the type of speech recognition being performed. The default value of this property is “SFSpeechRecognitionTaskHint/unspecified“. For a valid list of values, see “SFSpeechRecognitionTaskHint“.
type SFSpeechRecognitionResult ¶
type SFSpeechRecognitionResult struct {
foundation.NSObject
}
An object that contains the partial or final results of a speech recognition request.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechrecognitionresult
func SFSpeechRecognitionResultFromID ¶
func SFSpeechRecognitionResultFromID(id objc.ID) *SFSpeechRecognitionResult
func (*SFSpeechRecognitionResult) BestTranscription ¶
func (o *SFSpeechRecognitionResult) BestTranscription() *SFTranscription
The transcription with the highest confidence level.
func (*SFSpeechRecognitionResult) IsFinal ¶
func (o *SFSpeechRecognitionResult) IsFinal() bool
A Boolean value that indicates whether speech recognition is complete and whether the transcriptions are final. When a speech recognition request is final, its transcriptions don't change.
func (*SFSpeechRecognitionResult) SpeechRecognitionMetadata ¶
func (o *SFSpeechRecognitionResult) SpeechRecognitionMetadata() *SFSpeechRecognitionMetadata
An object that contains the metadata results for a speech recognition request.
func (*SFSpeechRecognitionResult) Transcriptions ¶
func (o *SFSpeechRecognitionResult) Transcriptions() *foundation.NSArray[*SFTranscription]
An array of potential transcriptions, sorted in descending order of confidence. All transcriptions correspond to the same utterance, which can be a partial or final result of the overall request. The first transcription in the array has the highest confidence rating, followed by transcriptions with decreasing confidence ratings.
type SFSpeechRecognitionTask ¶
type SFSpeechRecognitionTask struct {
foundation.NSObject
}
A task object for monitoring the speech recognition progress.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechrecognitiontask
func SFSpeechRecognitionTaskFromID ¶
func SFSpeechRecognitionTaskFromID(id objc.ID) *SFSpeechRecognitionTask
func (*SFSpeechRecognitionTask) Cancel ¶
func (o *SFSpeechRecognitionTask) Cancel()
Cancels the current speech recognition task.
func (*SFSpeechRecognitionTask) Error ¶
func (o *SFSpeechRecognitionTask) Error() unsafe.Pointer
An error object that specifies the error that occurred during a speech recognition task. The system may return one of the errors listed in the table below. | Error Code | Error Domain | Description | |---|---|---| | `102` | `kLSRErrorDomain` | Assets are not installed. | | `201` | `kLSRErrorDomain` | Siri or Dictation is disabled. | | `300` | `kLSRErrorDomain` | Failed to initialize recognizer. | | `301` | `kLSRErrorDomain` | Request was canceled. | | `203` | `kAFAssistantErrorDomain` | Failure occurred during speech recognition. | | `1100` | `kAFAssistantErrorDomain` | Trying to start recognition while an earlier instance is still active. | | `1101` | `kAFAssistantErrorDomain` | Connection to speech process was invalidated. | | `1107` | `kAFAssistantErrorDomain` | Connection to speech process was interrupted. | | `1110` | `kAFAssistantErrorDomain` | Failed to recognize any speech. | | `1700` | `kAFAssistantErrorDomain` | Request is not authorized. |
func (*SFSpeechRecognitionTask) Finish ¶
func (o *SFSpeechRecognitionTask) Finish()
Stops accepting new audio and finishes processing on the audio input that has already been accepted.
func (*SFSpeechRecognitionTask) IsCancelled ¶
func (o *SFSpeechRecognitionTask) IsCancelled() bool
A Boolean value that indicates whether the speech recognition task was canceled. By default, the value of this property is `false`.
func (*SFSpeechRecognitionTask) IsFinishing ¶
func (o *SFSpeechRecognitionTask) IsFinishing() bool
A Boolean value that indicates whether audio input has stopped. By default, the value of this property is `false`.
func (*SFSpeechRecognitionTask) State ¶
func (o *SFSpeechRecognitionTask) State() SFSpeechRecognitionTaskState
The current state of the speech recognition task. Check the value of this property to get the state of the in-progress speech recognition session. For valid values, see “SFSpeechRecognitionTaskState“.
type SFSpeechRecognitionTaskDelegate ¶
type SFSpeechRecognitionTaskDelegate interface {
}
SFSpeechRecognitionTaskDelegate wraps the ObjC protocol SFSpeechRecognitionTaskDelegate.
type SFSpeechRecognitionTaskHint ¶
type SFSpeechRecognitionTaskHint int64
The type of task for which you are using speech recognition.
const ( // An unspecified type of task. SFSpeechRecognitionTaskHintUnspecified SFSpeechRecognitionTaskHint = 0 // A task that uses captured speech for text entry. SFSpeechRecognitionTaskHintDictation SFSpeechRecognitionTaskHint = 1 // A task that uses captured speech to specify search terms. SFSpeechRecognitionTaskHintSearch SFSpeechRecognitionTaskHint = 2 // A task that uses captured speech for short, confirmation-style requests. SFSpeechRecognitionTaskHintConfirmation SFSpeechRecognitionTaskHint = 3 )
func (SFSpeechRecognitionTaskHint) String ¶
func (e SFSpeechRecognitionTaskHint) String() string
type SFSpeechRecognitionTaskState ¶
type SFSpeechRecognitionTaskState int64
The state of the task associated with the recognition request.
const ( // Speech recognition (potentially including audio recording) has not yet started. SFSpeechRecognitionTaskStateStarting SFSpeechRecognitionTaskState = 0 // Speech recognition (potentially including audio recording) is in progress. SFSpeechRecognitionTaskStateRunning SFSpeechRecognitionTaskState = 1 // Audio recording has stopped, but delivery of recognition results may continue. SFSpeechRecognitionTaskStateFinishing SFSpeechRecognitionTaskState = 2 // Delivery of recognition results has finished, but audio recording may be ongoing. SFSpeechRecognitionTaskStateCanceling SFSpeechRecognitionTaskState = 3 // Delivery of recognition requests has finished and audio recording has stopped. SFSpeechRecognitionTaskStateCompleted SFSpeechRecognitionTaskState = 4 )
func (SFSpeechRecognitionTaskState) String ¶
func (e SFSpeechRecognitionTaskState) String() string
type SFSpeechRecognizer ¶
type SFSpeechRecognizer struct {
foundation.NSObject
}
An object you use to check for the availability of the speech recognition service, and to initiate the speech recognition process.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechrecognizer
func SFSpeechRecognizerFromID ¶
func SFSpeechRecognizerFromID(id objc.ID) *SFSpeechRecognizer
func (*SFSpeechRecognizer) DefaultTaskHint ¶
func (o *SFSpeechRecognizer) DefaultTaskHint() SFSpeechRecognitionTaskHint
A hint that indicates the type of speech recognition being requested. By default, the value of this property overrides the “SFSpeechRecognitionTaskHint/unspecified“ value for requests. For possible values, see “SFSpeechRecognitionTaskHint“.
func (*SFSpeechRecognizer) Delegate ¶
func (o *SFSpeechRecognizer) Delegate() SFSpeechRecognizerDelegate
The delegate object that handles changes to the availability of speech recognition services. Provide a delegate object when you want to monitor changes to the availability of speech recognition services. Your delegate object must conform to the “SFSpeechRecognizerDelegate“ protocol.
func (*SFSpeechRecognizer) Init ¶
func (o *SFSpeechRecognizer) Init() *SFSpeechRecognizer
Creates a speech recognizer associated with the user’s default language settings.
func (*SFSpeechRecognizer) InitWithLocale ¶
func (o *SFSpeechRecognizer) InitWithLocale(locale *foundation.NSLocale) *SFSpeechRecognizer
Creates a speech recognizer associated with the specified locale.
func (*SFSpeechRecognizer) IsAvailable ¶
func (o *SFSpeechRecognizer) IsAvailable() bool
A Boolean value that indicates whether the speech recognizer is currently available. When the value of this property is `true`, you may create new speech recognition tasks. When value of this property is `false`, speech recognition services are not available.
func (*SFSpeechRecognizer) Locale ¶
func (o *SFSpeechRecognizer) Locale() *foundation.NSLocale
The locale of the speech recognizer. The locale of the speech recognizer is an `NSLocale` object. The default value of this property is the system locale (that is, `+[NSLocale systemLocale]`).
func (*SFSpeechRecognizer) Queue ¶
func (o *SFSpeechRecognizer) Queue() *foundation.NSOperationQueue
The queue on which to execute recognition task handlers and delegate methods. The default value of this property is the app's main queue. Assign a different queue if you want delegate methods and handlers to be executed on a background queue. The handler you pass to the “requestAuthorization(_:)“ method does not use this queue.
func (*SFSpeechRecognizer) RecognitionTaskWithRequestDelegate ¶
func (o *SFSpeechRecognizer) RecognitionTaskWithRequestDelegate(request *SFSpeechRecognitionRequest, delegate SFSpeechRecognitionTaskDelegate) *SFSpeechRecognitionTask
Recognizes speech from the audio source associated with the specified request, using the specified delegate to manage the results.
func (*SFSpeechRecognizer) RecognitionTaskWithRequestResultHandler ¶
func (o *SFSpeechRecognizer) RecognitionTaskWithRequestResultHandler(request *SFSpeechRecognitionRequest, resultHandler func(*SFSpeechRecognitionResult, unsafe.Pointer)) *SFSpeechRecognitionTask
Executes the speech recognition request and delivers the results to the specified handler block.
func (*SFSpeechRecognizer) SetDefaultTaskHint ¶
func (o *SFSpeechRecognizer) SetDefaultTaskHint(defaultTaskHint SFSpeechRecognitionTaskHint)
func (*SFSpeechRecognizer) SetDelegate ¶
func (o *SFSpeechRecognizer) SetDelegate(delegate SFSpeechRecognizerDelegate)
func (*SFSpeechRecognizer) SetQueue ¶
func (o *SFSpeechRecognizer) SetQueue(queue *foundation.NSOperationQueue)
func (*SFSpeechRecognizer) SetSupportsOnDeviceRecognition ¶
func (o *SFSpeechRecognizer) SetSupportsOnDeviceRecognition(supportsOnDeviceRecognition bool)
func (*SFSpeechRecognizer) SupportsOnDeviceRecognition ¶
func (o *SFSpeechRecognizer) SupportsOnDeviceRecognition() bool
A Boolean value that indicates whether the speech recognizer can operate without network access. An “SFSpeechRecognitionRequest“ can only honor its “SFSpeechRecognitionRequest/requiresOnDeviceRecognition“ property if “supportsOnDeviceRecognition“ is `true`. If “supportsOnDeviceRecognition“ is `false`, the “SFSpeechRecognizer“ requires a network in order to recognize speech.
type SFSpeechRecognizerAuthorizationStatus ¶
type SFSpeechRecognizerAuthorizationStatus int64
The app’s authorization to perform speech recognition.
const ( // The app’s authorization status has not yet been determined. SFSpeechRecognizerAuthorizationStatusNotDetermined SFSpeechRecognizerAuthorizationStatus = 0 // The user denied your app’s request to perform speech recognition. SFSpeechRecognizerAuthorizationStatusDenied SFSpeechRecognizerAuthorizationStatus = 1 // The device prevents your app from performing speech recognition. SFSpeechRecognizerAuthorizationStatusRestricted SFSpeechRecognizerAuthorizationStatus = 2 // The user granted your app’s request to perform speech recognition. SFSpeechRecognizerAuthorizationStatusAuthorized SFSpeechRecognizerAuthorizationStatus = 3 )
func SFSpeechRecognizerAuthorizationStatusClass ¶
func SFSpeechRecognizerAuthorizationStatusClass() SFSpeechRecognizerAuthorizationStatus
Returns your app’s current authorization to perform speech recognition.
func (SFSpeechRecognizerAuthorizationStatus) String ¶
func (e SFSpeechRecognizerAuthorizationStatus) String() string
type SFSpeechRecognizerDelegate ¶
type SFSpeechRecognizerDelegate interface {
}
SFSpeechRecognizerDelegate wraps the ObjC protocol SFSpeechRecognizerDelegate.
type SFSpeechURLRecognitionRequest ¶
type SFSpeechURLRecognitionRequest struct {
SFSpeechRecognitionRequest
}
A request to recognize speech in a recorded audio file.
Apple documentation: https://developer.apple.com/documentation/speech/sfspeechurlrecognitionrequest
func SFSpeechURLRecognitionRequestFromID ¶
func SFSpeechURLRecognitionRequestFromID(id objc.ID) *SFSpeechURLRecognitionRequest
func (*SFSpeechURLRecognitionRequest) InitWithURL ¶
func (o *SFSpeechURLRecognitionRequest) InitWithURL(uRL *foundation.NSURL) *SFSpeechURLRecognitionRequest
Creates a speech recognition request, initialized with the specified URL.
func (*SFSpeechURLRecognitionRequest) URL ¶
func (o *SFSpeechURLRecognitionRequest) URL() *foundation.NSURL
type SFTranscription ¶
type SFTranscription struct {
foundation.NSObject
}
A textual representation of the specified speech in its entirety, as recognized by the speech recognizer.
Apple documentation: https://developer.apple.com/documentation/speech/sftranscription
func SFTranscriptionFromID ¶
func SFTranscriptionFromID(id objc.ID) *SFTranscription
func (*SFTranscription) AveragePauseDuration ¶
func (o *SFTranscription) AveragePauseDuration() float64
The average pause duration between words, measured in seconds. Deprecated: since macOS 11.3.
func (*SFTranscription) FormattedString ¶
func (o *SFTranscription) FormattedString() *foundation.NSString
The entire transcription of utterances, formatted into a single, user-displayable string.
func (*SFTranscription) Segments ¶
func (o *SFTranscription) Segments() *foundation.NSArray[*SFTranscriptionSegment]
An array of transcription segments that represent the parts of the transcription, as identified by the speech recognizer. The order of the segments in the array matches the order in which the corresponding utterances occur in the spoken content.
func (*SFTranscription) SpeakingRate ¶
func (o *SFTranscription) SpeakingRate() float64
The number of words spoken per minute. Deprecated: since macOS 11.3.
type SFTranscriptionSegment ¶
type SFTranscriptionSegment struct {
foundation.NSObject
}
A discrete part of an entire transcription, as identified by the speech recognizer.
Apple documentation: https://developer.apple.com/documentation/speech/sftranscriptionsegment
func SFTranscriptionSegmentFromID ¶
func SFTranscriptionSegmentFromID(id objc.ID) *SFTranscriptionSegment
func (*SFTranscriptionSegment) AlternativeSubstrings ¶
func (o *SFTranscriptionSegment) AlternativeSubstrings() *foundation.NSArray[*foundation.NSString]
An array of alternate interpretations of the utterance in the transcription segment.
func (*SFTranscriptionSegment) Confidence ¶
func (o *SFTranscriptionSegment) Confidence() float32
The level of confidence the speech recognizer has in its recognition of the speech transcribed for the segment. This property reflects the overall confidence in the recognition of the entire phrase. The value is `0` if there was no recognition, and it is closer to `1` when there is a high certainty that a transcription matches the user's speech exactly. For example, a confidence value of `0.94` represents a very high confidence level, and is more likely to be correct than a transcription with a confidence value of `0.72`.
func (*SFTranscriptionSegment) Duration ¶
func (o *SFTranscriptionSegment) Duration() float64
The number of seconds it took for the user to speak the utterance represented by the segment. The “duration“ contains the number of seconds it took for the user to speak the one or more words (utterance) represented by the segment. For example, the “SFSpeechRecognizer“ sets “duration“ to `0.6` if the user took `0.6` seconds to say `“time”` in the transcription of `“What time is it?"`.
func (*SFTranscriptionSegment) Substring ¶
func (o *SFTranscriptionSegment) Substring() *foundation.NSString
The string representation of the utterance in the transcription segment.
func (*SFTranscriptionSegment) SubstringRange ¶
func (o *SFTranscriptionSegment) SubstringRange() foundation.NSRange
The range information for the transcription segment's substring, relative to the overall transcription. Use the range information to find the position of the segment within the “SFTranscription/formattedString“ property of the “SFTranscription“ object containing this segment.
func (*SFTranscriptionSegment) Timestamp ¶
func (o *SFTranscriptionSegment) Timestamp() float64
The start time of the segment in the processed audio stream. The “timestamp“ is the number of seconds between the beginning of the audio content and when the user spoke the word represented by the segment. For example, if the user said the word "time" one second into the transcription "What time is it", the timestamp would be equal to `1.0`.
func (*SFTranscriptionSegment) VoiceAnalytics ¶
func (o *SFTranscriptionSegment) VoiceAnalytics() *SFVoiceAnalytics
An analysis of the transcription segment's vocal properties. Deprecated: since macOS 11.3.
type SFVoiceAnalytics ¶
type SFVoiceAnalytics struct {
foundation.NSObject
}
A collection of vocal analysis metrics.
Apple documentation: https://developer.apple.com/documentation/speech/sfvoiceanalytics
func SFVoiceAnalyticsFromID ¶
func SFVoiceAnalyticsFromID(id objc.ID) *SFVoiceAnalytics
func (*SFVoiceAnalytics) Jitter ¶
func (o *SFVoiceAnalytics) Jitter() *SFAcousticFeature
func (*SFVoiceAnalytics) Pitch ¶
func (o *SFVoiceAnalytics) Pitch() *SFAcousticFeature
The highness or lowness of the tone (fundamental frequency) in each frame of a transcription segment, expressed as a logarithm. The value is a logarithm (base `e`) of the normalized pitch estimate for each frame.
func (*SFVoiceAnalytics) Shimmer ¶
func (o *SFVoiceAnalytics) Shimmer() *SFAcousticFeature
The variation in vocal volume stability (amplitude) in each frame of a transcription segment, expressed in decibels.
func (*SFVoiceAnalytics) Voicing ¶
func (o *SFVoiceAnalytics) Voicing() *SFAcousticFeature
type Virtual_memory_guard_exception_code_t ¶
type Virtual_memory_guard_exception_code_t int64
const ( KGUARD_EXC_DEALLOC_GAP Virtual_memory_guard_exception_code_t = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE Virtual_memory_guard_exception_code_t = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE Virtual_memory_guard_exception_code_t = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE Virtual_memory_guard_exception_code_t = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE Virtual_memory_guard_exception_code_t = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE Virtual_memory_guard_exception_code_t = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE Virtual_memory_guard_exception_code_t = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION Virtual_memory_guard_exception_code_t = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY Virtual_memory_guard_exception_code_t = 13 KGUARD_EXC_SEC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 99 KGUARD_EXC_SEC_COPY_DENIED Virtual_memory_guard_exception_code_t = 100 KGUARD_EXC_SEC_SHARING_DENIED Virtual_memory_guard_exception_code_t = 101 KGUARD_EXC_MTE_SYNC_FAULT Virtual_memory_guard_exception_code_t = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204 )
func (Virtual_memory_guard_exception_code_t) String ¶
func (e Virtual_memory_guard_exception_code_t) String() string
type Xpc_listener_create_flags_t ¶
type Xpc_listener_create_flags_t int64
const ( XPC_LISTENER_CREATE_NONE Xpc_listener_create_flags_t = 0 XPC_LISTENER_CREATE_INACTIVE Xpc_listener_create_flags_t = 1 XPC_LISTENER_CREATE_FORCE_MACH Xpc_listener_create_flags_t = 2 XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4 )
func (Xpc_listener_create_flags_t) String ¶
func (e Xpc_listener_create_flags_t) String() string
type Xpc_session_create_flags_t ¶
type Xpc_session_create_flags_t int64
const ( XPC_SESSION_CREATE_NONE Xpc_session_create_flags_t = 0 XPC_SESSION_CREATE_INACTIVE Xpc_session_create_flags_t = 1 XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2 )
func (Xpc_session_create_flags_t) String ¶
func (e Xpc_session_create_flags_t) String() string
Source Files
¶
- SFAcousticFeature.go
- SFSpeechAudioBufferRecognitionRequest.go
- SFSpeechLanguageModel.go
- SFSpeechLanguageModelConfiguration.go
- SFSpeechRecognitionMetadata.go
- SFSpeechRecognitionRequest.go
- SFSpeechRecognitionResult.go
- SFSpeechRecognitionTask.go
- SFSpeechRecognizer.go
- SFSpeechURLRecognitionRequest.go
- SFTranscription.go
- SFTranscriptionSegment.go
- SFVoiceAnalytics.go
- doc.go
- speech_enums.go
- speech_externs.go
- speech_protocols.go
- speech_runtime.go