speech

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package speech provides a fluent Go API over the macOS Speech framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Errors

Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.

Delegates

A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

This section is empty.

Variables

View Source
var ErrCodeAudioReadFailed = errkit.New("SFSpeechErrorDomain", 2)

ErrCodeAudioReadFailed matches the Speech error SFSpeechErrorCodeAudioReadFailed.

View Source
var ErrCodeInternalServiceError = errkit.New("SFSpeechErrorDomain", 1)

ErrCodeInternalServiceError matches the Speech error SFSpeechErrorCodeInternalServiceError.

View Source
var ErrCodeMalformedSupplementalModel = errkit.New("SFSpeechErrorDomain", 8)

ErrCodeMalformedSupplementalModel matches the Speech error SFSpeechErrorCodeMalformedSupplementalModel.

View Source
var ErrCodeMissingParameter = errkit.New("SFSpeechErrorDomain", 13)

ErrCodeMissingParameter matches the Speech error SFSpeechErrorCodeMissingParameter.

View Source
var ErrCodeTimeout = errkit.New("SFSpeechErrorDomain", 12)

ErrCodeTimeout matches the Speech error SFSpeechErrorCodeTimeout.

View Source
var ErrCodeUndefinedTemplateClassName = errkit.New("SFSpeechErrorDomain", 7)

ErrCodeUndefinedTemplateClassName matches the Speech error SFSpeechErrorCodeUndefinedTemplateClassName.

Functions

func PrepareCustomLanguageModelForUrlClientIdentifierConfigurationCompletion added in v0.17.0

func PrepareCustomLanguageModelForUrlClientIdentifierConfigurationCompletion(ctx context.Context, asset string, clientIdentifier string, configuration *SpeechLanguageModelConfiguration) error

PrepareCustomLanguageModelForUrlClientIdentifierConfigurationCompletion prepares custom language model for URL client identifier configuration completion.

PrepareCustomLanguageModelForUrlClientIdentifierConfigurationCompletion blocks until the operation completes or ctx is cancelled.

func PrepareCustomLanguageModelForUrlClientIdentifierConfigurationIgnoresCacheCompletion added in v0.17.0

func PrepareCustomLanguageModelForUrlClientIdentifierConfigurationIgnoresCacheCompletion(ctx context.Context, asset string, clientIdentifier string, configuration *SpeechLanguageModelConfiguration, ignoresCache bool) error

PrepareCustomLanguageModelForUrlClientIdentifierConfigurationIgnoresCacheCompletion prepares custom language model for URL client identifier configuration ignores cache completion.

PrepareCustomLanguageModelForUrlClientIdentifierConfigurationIgnoresCacheCompletion blocks until the operation completes or ctx is cancelled.

func PrepareCustomLanguageModelForUrlConfigurationCompletion added in v0.17.0

func PrepareCustomLanguageModelForUrlConfigurationCompletion(ctx context.Context, asset string, configuration *SpeechLanguageModelConfiguration) error

PrepareCustomLanguageModelForUrlConfigurationCompletion creates a language model from custom training data.

PrepareCustomLanguageModelForUrlConfigurationCompletion blocks until the operation completes or ctx is cancelled.

func PrepareCustomLanguageModelForUrlConfigurationIgnoresCacheCompletion added in v0.17.0

func PrepareCustomLanguageModelForUrlConfigurationIgnoresCacheCompletion(ctx context.Context, asset string, configuration *SpeechLanguageModelConfiguration, ignoresCache bool) error

PrepareCustomLanguageModelForUrlConfigurationIgnoresCacheCompletion creates a language model from custom training data.

PrepareCustomLanguageModelForUrlConfigurationIgnoresCacheCompletion blocks until the operation completes or ctx is cancelled.

func RequestAuthorization added in v0.18.0

func RequestAuthorization(handler func(SpeechRecognizerAuthorizationStatus))

RequestAuthorization asks the user to allow your app to perform speech recognition.

func SFSpeechErrorDomain

func SFSpeechErrorDomain() obj.Object

SFSpeechErrorDomain returns the string constant SFSpeechErrorDomain, for use as a dictionary key or argument.

func SupportedLocales added in v0.17.0

func SupportedLocales() []*foundation.Locale

SupportedLocales returns the set of locales that are supported by the speech recognizer.

Types

type AcousticFeature added in v0.17.0

type AcousticFeature struct {
	objref.Handle
}

AcousticFeature is an idiomatic wrapper over the Objective-C class SFAcousticFeature.

The value of a voice analysis metric.

func AcousticFeatureFromID added in v0.17.0

func AcousticFeatureFromID(id objc.ID) *AcousticFeature

AcousticFeatureFromID adopts an existing Objective-C object as a AcousticFeature (nil for 0), retaining it and registering a release finalizer.

func NewAcousticFeature added in v0.17.0

func NewAcousticFeature() *AcousticFeature

NewAcousticFeature creates a new AcousticFeature.

func (*AcousticFeature) AcousticFeatureValuePerFrame added in v0.17.0

func (af *AcousticFeature) AcousticFeatureValuePerFrame() []obj.Object

AcousticFeatureValuePerFrame returns an array of feature values, one value per audio frame, corresponding to a transcript segment of recorded audio.

AcousticFeatureValuePerFrame returns the collection as a Go slice.

func (*AcousticFeature) Description added in v0.17.0

func (af *AcousticFeature) Description() string

Description returns the object's -description text.

func (*AcousticFeature) FrameDuration added in v0.17.0

func (af *AcousticFeature) FrameDuration() float64

FrameDuration returns the duration of the audio frame.

func (*AcousticFeature) IsEqual added in v0.17.0

func (af *AcousticFeature) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*AcousticFeature) IsKind added in v0.17.0

func (af *AcousticFeature) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*AcousticFeature) String added in v0.17.0

func (af *AcousticFeature) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int32
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type EvCmd

type EvCmd int32
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

String returns the EvCmd constant's name, or its numeric form when the value is not a known constant.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

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

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type NXMouseButton

type NXMouseButton int32
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type PMPageToPaperMappingType

type PMPageToPaperMappingType int32
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type SpeechAudioBufferRecognitionRequest added in v0.17.0

type SpeechAudioBufferRecognitionRequest struct {
	SpeechRecognitionRequest
}

SpeechAudioBufferRecognitionRequest is an idiomatic wrapper over the Objective-C class SFSpeechAudioBufferRecognitionRequest.

It embeds SpeechRecognitionRequest, promoting that type's methods.

A request to recognize speech from captured audio content, such as audio from the device’s microphone.

func NewSpeechAudioBufferRecognitionRequest added in v0.17.0

func NewSpeechAudioBufferRecognitionRequest() *SpeechAudioBufferRecognitionRequest

NewSpeechAudioBufferRecognitionRequest creates a new SpeechAudioBufferRecognitionRequest.

func SpeechAudioBufferRecognitionRequestFromID added in v0.17.0

func SpeechAudioBufferRecognitionRequestFromID(id objc.ID) *SpeechAudioBufferRecognitionRequest

SpeechAudioBufferRecognitionRequestFromID adopts an existing Objective-C object as a SpeechAudioBufferRecognitionRequest (nil for 0), retaining it and registering a release finalizer.

func (*SpeechAudioBufferRecognitionRequest) AppendAudioPCMBuffer added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) AppendAudioPCMBuffer(audioPCMBuffer obj.Object)

AppendAudioPCMBuffer appends audio in the PCM format to the end of the recognition request.

func (*SpeechAudioBufferRecognitionRequest) AppendAudioSampleBuffer added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) AppendAudioSampleBuffer(sampleBuffer obj.Object)

AppendAudioSampleBuffer appends audio to the end of the recognition request.

func (*SpeechAudioBufferRecognitionRequest) EndAudio added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) EndAudio()

EndAudio marks the end of audio input for the recognition request.

func (*SpeechAudioBufferRecognitionRequest) NativeAudioFormat added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) NativeAudioFormat() obj.Object

NativeAudioFormat returns 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.

func (*SpeechAudioBufferRecognitionRequest) WithAddsPunctuation added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) WithAddsPunctuation(addsPunctuation bool) *SpeechAudioBufferRecognitionRequest

WithAddsPunctuation sets a Boolean value that indicates whether to add punctuation to speech recognition results.

func (*SpeechAudioBufferRecognitionRequest) WithContextualStrings added in v0.17.0

WithContextualStrings sets an array of phrases that should be recognized, even if they are not in the system vocabulary.

func (*SpeechAudioBufferRecognitionRequest) WithCustomizedLanguageModel added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) WithCustomizedLanguageModel(customizedLanguageModel *SpeechLanguageModelConfiguration) *SpeechAudioBufferRecognitionRequest

WithCustomizedLanguageModel sets the customized language model.

func (*SpeechAudioBufferRecognitionRequest) WithInteractionIdentifier added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) WithInteractionIdentifier(interactionIdentifier string) *SpeechAudioBufferRecognitionRequest

WithInteractionIdentifier sets an identifier string that you use to describe the type of interaction associated with the speech recognition request.

func (*SpeechAudioBufferRecognitionRequest) WithRequiresOnDeviceRecognition added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) WithRequiresOnDeviceRecognition(requiresOnDeviceRecognition bool) *SpeechAudioBufferRecognitionRequest

WithRequiresOnDeviceRecognition sets a Boolean value that determines whether a request must keep its audio data on the device.

func (*SpeechAudioBufferRecognitionRequest) WithShouldReportPartialResults added in v0.17.0

func (sabrr *SpeechAudioBufferRecognitionRequest) WithShouldReportPartialResults(shouldReportPartialResults bool) *SpeechAudioBufferRecognitionRequest

WithShouldReportPartialResults sets a Boolean value that indicates whether you want intermediate results returned for each utterance.

func (*SpeechAudioBufferRecognitionRequest) WithTaskHint added in v0.17.0

WithTaskHint sets a value that indicates the type of speech recognition being performed.

type SpeechErrorCode added in v0.17.0

type SpeechErrorCode int64

Error codes that can be thrown under the Speech framework’s error domain.

const (
	// There was an internal error.
	SpeechErrorCodeInternalServiceError SpeechErrorCode = 1
	// The audio file could not be read.
	SpeechErrorCodeAudioReadFailed SpeechErrorCode = 2
	// The custom language model templates were malformed.
	SpeechErrorCodeUndefinedTemplateClassName SpeechErrorCode = 7
	// The custom language model file was malformed.
	SpeechErrorCodeMalformedSupplementalModel SpeechErrorCode = 8
	// The operation timed out.
	SpeechErrorCodeTimeout SpeechErrorCode = 12
	// A required parameter is missing/nil.
	SpeechErrorCodeMissingParameter SpeechErrorCode = 13
)

func (SpeechErrorCode) String added in v0.17.0

func (e SpeechErrorCode) String() string

String returns the SpeechErrorCode constant's name, or its numeric form when the value is not a known constant.

type SpeechLanguageModel added in v0.17.0

type SpeechLanguageModel struct {
	objref.Handle
}

SpeechLanguageModel is an idiomatic wrapper over the Objective-C class SFSpeechLanguageModel.

A language model built from custom training data.

func NewSpeechLanguageModel added in v0.17.0

func NewSpeechLanguageModel() *SpeechLanguageModel

NewSpeechLanguageModel creates a new SpeechLanguageModel.

func SpeechLanguageModelFromID added in v0.17.0

func SpeechLanguageModelFromID(id objc.ID) *SpeechLanguageModel

SpeechLanguageModelFromID adopts an existing Objective-C object as a SpeechLanguageModel (nil for 0), retaining it and registering a release finalizer.

func (*SpeechLanguageModel) Description added in v0.17.0

func (slm *SpeechLanguageModel) Description() string

Description returns the object's -description text.

func (*SpeechLanguageModel) IsEqual added in v0.17.0

func (slm *SpeechLanguageModel) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SpeechLanguageModel) IsKind added in v0.17.0

func (slm *SpeechLanguageModel) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SpeechLanguageModel) String added in v0.17.0

func (slm *SpeechLanguageModel) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type SpeechLanguageModelConfiguration added in v0.17.0

type SpeechLanguageModelConfiguration struct {
	objref.Handle
}

SpeechLanguageModelConfiguration is an idiomatic wrapper over the Objective-C class SFSpeechLanguageModelConfiguration.

An object describing the location of a custom language model and specialized vocabulary.

func NewSpeechLanguageModelConfigurationWithLanguageModel added in v0.17.0

func NewSpeechLanguageModelConfigurationWithLanguageModel(languageModel string) *SpeechLanguageModelConfiguration

NewSpeechLanguageModelConfigurationWithLanguageModel creates a configuration with the location of a language model file.

func NewSpeechLanguageModelConfigurationWithLanguageModelVocabulary added in v0.17.0

func NewSpeechLanguageModelConfigurationWithLanguageModelVocabulary(languageModel string, vocabulary string) *SpeechLanguageModelConfiguration

NewSpeechLanguageModelConfigurationWithLanguageModelVocabulary creates a configuration with the locations of language model and vocabulary files.

func NewSpeechLanguageModelConfigurationWithLanguageModelVocabularyWeight added in v0.17.0

func NewSpeechLanguageModelConfigurationWithLanguageModelVocabularyWeight(languageModel string, vocabulary string, weight obj.Object) *SpeechLanguageModelConfiguration

NewSpeechLanguageModelConfigurationWithLanguageModelVocabularyWeight creates a configuration with the locations of language model and vocabulary files, and custom weight.

func SpeechLanguageModelConfigurationFromID added in v0.17.0

func SpeechLanguageModelConfigurationFromID(id objc.ID) *SpeechLanguageModelConfiguration

SpeechLanguageModelConfigurationFromID adopts an existing Objective-C object as a SpeechLanguageModelConfiguration (nil for 0), retaining it and registering a release finalizer.

func (*SpeechLanguageModelConfiguration) Description added in v0.17.0

func (slmc *SpeechLanguageModelConfiguration) Description() string

Description returns the object's -description text.

func (*SpeechLanguageModelConfiguration) IsEqual added in v0.17.0

func (slmc *SpeechLanguageModelConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SpeechLanguageModelConfiguration) IsKind added in v0.17.0

func (slmc *SpeechLanguageModelConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SpeechLanguageModelConfiguration) LanguageModel added in v0.17.0

func (slmc *SpeechLanguageModelConfiguration) LanguageModel() string

LanguageModel returns the location of a compiled language model file.

func (*SpeechLanguageModelConfiguration) String added in v0.17.0

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SpeechLanguageModelConfiguration) Vocabulary added in v0.17.0

func (slmc *SpeechLanguageModelConfiguration) Vocabulary() string

Vocabulary returns the location of a compiled vocabulary file.

func (*SpeechLanguageModelConfiguration) Weight added in v0.17.0

Weight returns the relative weight of the language model customization. Value must be between 0.0 and 1.0 inclusive.

type SpeechRecognitionMetadata added in v0.17.0

type SpeechRecognitionMetadata struct {
	objref.Handle
}

SpeechRecognitionMetadata is an idiomatic wrapper over the Objective-C class SFSpeechRecognitionMetadata.

The metadata of speech in the audio of a speech recognition request.

func NewSpeechRecognitionMetadata added in v0.17.0

func NewSpeechRecognitionMetadata() *SpeechRecognitionMetadata

NewSpeechRecognitionMetadata creates a new SpeechRecognitionMetadata.

func SpeechRecognitionMetadataFromID added in v0.17.0

func SpeechRecognitionMetadataFromID(id objc.ID) *SpeechRecognitionMetadata

SpeechRecognitionMetadataFromID adopts an existing Objective-C object as a SpeechRecognitionMetadata (nil for 0), retaining it and registering a release finalizer.

func (*SpeechRecognitionMetadata) AveragePauseDuration added in v0.17.0

func (srm *SpeechRecognitionMetadata) AveragePauseDuration() float64

AveragePauseDuration returns the average pause duration between words, measured in seconds.

func (*SpeechRecognitionMetadata) Description added in v0.17.0

func (srm *SpeechRecognitionMetadata) Description() string

Description returns the object's -description text.

func (*SpeechRecognitionMetadata) IsEqual added in v0.17.0

func (srm *SpeechRecognitionMetadata) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SpeechRecognitionMetadata) IsKind added in v0.17.0

func (srm *SpeechRecognitionMetadata) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SpeechRecognitionMetadata) SpeakingRate added in v0.17.0

func (srm *SpeechRecognitionMetadata) SpeakingRate() float64

SpeakingRate returns the number of words spoken per minute.

func (*SpeechRecognitionMetadata) SpeechDuration added in v0.17.0

func (srm *SpeechRecognitionMetadata) SpeechDuration() float64

SpeechDuration returns the duration in seconds of speech in the audio.

func (*SpeechRecognitionMetadata) SpeechStartTimestamp added in v0.17.0

func (srm *SpeechRecognitionMetadata) SpeechStartTimestamp() float64

SpeechStartTimestamp returns the start timestamp of speech in the audio.

func (*SpeechRecognitionMetadata) String added in v0.17.0

func (srm *SpeechRecognitionMetadata) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SpeechRecognitionMetadata) VoiceAnalytics added in v0.17.0

func (srm *SpeechRecognitionMetadata) VoiceAnalytics() *VoiceAnalytics

VoiceAnalytics returns an analysis of the transcription segment's vocal properties.

type SpeechRecognitionRequest added in v0.17.0

type SpeechRecognitionRequest struct {
	objref.Handle
}

SpeechRecognitionRequest is an idiomatic wrapper over the Objective-C class SFSpeechRecognitionRequest.

SpeechRecognitionRequest is an abstract base — you do not construct it directly. Construct one of SpeechAudioBufferRecognitionRequest, SpeechURLRecognitionRequest and pass it where a SpeechRecognitionRequest is accepted.

An abstract class that represents a request to recognize speech from an audio source.

func SpeechRecognitionRequestFromID added in v0.17.0

func SpeechRecognitionRequestFromID(id objc.ID) *SpeechRecognitionRequest

SpeechRecognitionRequestFromID adopts an existing Objective-C object as a SpeechRecognitionRequest (nil for 0), retaining it and registering a release finalizer.

func (*SpeechRecognitionRequest) AddsPunctuation added in v0.17.0

func (srr *SpeechRecognitionRequest) AddsPunctuation() bool

AddsPunctuation reports 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 (*SpeechRecognitionRequest) ContextualStrings added in v0.17.0

func (srr *SpeechRecognitionRequest) ContextualStrings() []string

ContextualStrings returns 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.

ContextualStrings returns the collection as a Go slice.

func (*SpeechRecognitionRequest) CustomizedLanguageModel added in v0.17.0

func (srr *SpeechRecognitionRequest) CustomizedLanguageModel() *SpeechLanguageModelConfiguration

CustomizedLanguageModel returns the customized language model.

func (*SpeechRecognitionRequest) Description added in v0.17.0

func (srr *SpeechRecognitionRequest) Description() string

Description returns the object's -description text.

func (*SpeechRecognitionRequest) InteractionIdentifier added in v0.17.0

func (srr *SpeechRecognitionRequest) InteractionIdentifier() string

InteractionIdentifier returns 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.

func (*SpeechRecognitionRequest) IsEqual added in v0.17.0

func (srr *SpeechRecognitionRequest) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SpeechRecognitionRequest) IsKind added in v0.17.0

func (srr *SpeechRecognitionRequest) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SpeechRecognitionRequest) RequiresOnDeviceRecognition added in v0.17.0

func (srr *SpeechRecognitionRequest) RequiresOnDeviceRecognition() bool

RequiresOnDeviceRecognition reports whether 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 (*SpeechRecognitionRequest) ShouldReportPartialResults added in v0.17.0

func (srr *SpeechRecognitionRequest) ShouldReportPartialResults() bool

ShouldReportPartialResults wraps the corresponding Objective-C method.

func (*SpeechRecognitionRequest) String added in v0.17.0

func (srr *SpeechRecognitionRequest) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SpeechRecognitionRequest) TaskHint added in v0.17.0

TaskHint returns 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“.

func (*SpeechRecognitionRequest) WithAddsPunctuation added in v0.17.0

func (srr *SpeechRecognitionRequest) WithAddsPunctuation(addsPunctuation bool) *SpeechRecognitionRequest

WithAddsPunctuation sets a Boolean value that indicates whether to add punctuation to speech recognition results.

func (*SpeechRecognitionRequest) WithContextualStrings added in v0.17.0

func (srr *SpeechRecognitionRequest) WithContextualStrings(items ...obj.Object) *SpeechRecognitionRequest

WithContextualStrings sets an array of phrases that should be recognized, even if they are not in the system vocabulary.

func (*SpeechRecognitionRequest) WithCustomizedLanguageModel added in v0.17.0

func (srr *SpeechRecognitionRequest) WithCustomizedLanguageModel(customizedLanguageModel *SpeechLanguageModelConfiguration) *SpeechRecognitionRequest

WithCustomizedLanguageModel sets the customized language model.

func (*SpeechRecognitionRequest) WithInteractionIdentifier added in v0.17.0

func (srr *SpeechRecognitionRequest) WithInteractionIdentifier(interactionIdentifier string) *SpeechRecognitionRequest

WithInteractionIdentifier sets an identifier string that you use to describe the type of interaction associated with the speech recognition request.

func (*SpeechRecognitionRequest) WithRequiresOnDeviceRecognition added in v0.17.0

func (srr *SpeechRecognitionRequest) WithRequiresOnDeviceRecognition(requiresOnDeviceRecognition bool) *SpeechRecognitionRequest

WithRequiresOnDeviceRecognition sets a Boolean value that determines whether a request must keep its audio data on the device.

func (*SpeechRecognitionRequest) WithShouldReportPartialResults added in v0.17.0

func (srr *SpeechRecognitionRequest) WithShouldReportPartialResults(shouldReportPartialResults bool) *SpeechRecognitionRequest

WithShouldReportPartialResults sets a Boolean value that indicates whether you want intermediate results returned for each utterance.

func (*SpeechRecognitionRequest) WithTaskHint added in v0.17.0

WithTaskHint sets a value that indicates the type of speech recognition being performed.

type SpeechRecognitionRequestProvider added in v0.17.0

type SpeechRecognitionRequestProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

SpeechRecognitionRequestProvider is accepted wherever a SFSpeechRecognitionRequest (or one of its subclasses) is expected.

type SpeechRecognitionResult added in v0.17.0

type SpeechRecognitionResult struct {
	objref.Handle
}

SpeechRecognitionResult is an idiomatic wrapper over the Objective-C class SFSpeechRecognitionResult.

An object that contains the partial or final results of a speech recognition request.

func NewSpeechRecognitionResult added in v0.17.0

func NewSpeechRecognitionResult() *SpeechRecognitionResult

NewSpeechRecognitionResult creates a new SpeechRecognitionResult.

func SpeechRecognitionResultFromID added in v0.17.0

func SpeechRecognitionResultFromID(id objc.ID) *SpeechRecognitionResult

SpeechRecognitionResultFromID adopts an existing Objective-C object as a SpeechRecognitionResult (nil for 0), retaining it and registering a release finalizer.

func (*SpeechRecognitionResult) BestTranscription added in v0.17.0

func (srr *SpeechRecognitionResult) BestTranscription() *Transcription

BestTranscription returns the transcription with the highest confidence level.

func (*SpeechRecognitionResult) Description added in v0.17.0

func (srr *SpeechRecognitionResult) Description() string

Description returns the object's -description text.

func (*SpeechRecognitionResult) IsEqual added in v0.17.0

func (srr *SpeechRecognitionResult) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SpeechRecognitionResult) IsFinal added in v0.17.0

func (srr *SpeechRecognitionResult) IsFinal() bool

IsFinal reports whether speech recognition is complete and whether the transcriptions are final. When a speech recognition request is final, its transcriptions don't change.

func (*SpeechRecognitionResult) IsKind added in v0.17.0

func (srr *SpeechRecognitionResult) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SpeechRecognitionResult) SpeechRecognitionMetadata added in v0.17.0

func (srr *SpeechRecognitionResult) SpeechRecognitionMetadata() *SpeechRecognitionMetadata

SpeechRecognitionMetadata returns an object that contains the metadata results for a speech recognition request.

func (*SpeechRecognitionResult) String added in v0.17.0

func (srr *SpeechRecognitionResult) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SpeechRecognitionResult) Transcriptions added in v0.17.0

func (srr *SpeechRecognitionResult) Transcriptions() []*Transcription

Transcriptions returns 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.

Transcriptions returns the collection as a Go slice.

type SpeechRecognitionTask added in v0.17.0

type SpeechRecognitionTask struct {
	objref.Handle
}

SpeechRecognitionTask is an idiomatic wrapper over the Objective-C class SFSpeechRecognitionTask.

A task object for monitoring the speech recognition progress.

func NewSpeechRecognitionTask added in v0.17.0

func NewSpeechRecognitionTask() *SpeechRecognitionTask

NewSpeechRecognitionTask creates a new SpeechRecognitionTask.

func SpeechRecognitionTaskFromID added in v0.17.0

func SpeechRecognitionTaskFromID(id objc.ID) *SpeechRecognitionTask

SpeechRecognitionTaskFromID adopts an existing Objective-C object as a SpeechRecognitionTask (nil for 0), retaining it and registering a release finalizer.

func (*SpeechRecognitionTask) Cancel added in v0.17.0

func (srt *SpeechRecognitionTask) Cancel()

Cancel cancels the current speech recognition task.

func (*SpeechRecognitionTask) Description added in v0.17.0

func (srt *SpeechRecognitionTask) Description() string

Description returns the object's -description text.

func (*SpeechRecognitionTask) Error added in v0.18.0

func (srt *SpeechRecognitionTask) Error() unsafe.Pointer

Error returns 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 (*SpeechRecognitionTask) Finish added in v0.17.0

func (srt *SpeechRecognitionTask) Finish()

Finish stops accepting new audio and finishes processing on the audio input that has already been accepted.

func (*SpeechRecognitionTask) IsCancelled added in v0.17.0

func (srt *SpeechRecognitionTask) IsCancelled() bool

IsCancelled reports whether the speech recognition task was canceled. By default, the value of this property is `false`.

func (*SpeechRecognitionTask) IsEqual added in v0.17.0

func (srt *SpeechRecognitionTask) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SpeechRecognitionTask) IsFinishing added in v0.17.0

func (srt *SpeechRecognitionTask) IsFinishing() bool

IsFinishing reports whether audio input has stopped. By default, the value of this property is `false`.

func (*SpeechRecognitionTask) IsKind added in v0.17.0

func (srt *SpeechRecognitionTask) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SpeechRecognitionTask) State added in v0.17.0

State returns 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“.

func (*SpeechRecognitionTask) String added in v0.17.0

func (srt *SpeechRecognitionTask) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type SpeechRecognitionTaskDelegate added in v0.17.0

type SpeechRecognitionTaskDelegate interface {
}

SpeechRecognitionTaskDelegate is the Go form of the Objective-C protocol SFSpeechRecognitionTaskDelegate.

type SpeechRecognitionTaskHint added in v0.17.0

type SpeechRecognitionTaskHint int64

The type of task for which you are using speech recognition.

const (
	// An unspecified type of task.
	SpeechRecognitionTaskHintUnspecified SpeechRecognitionTaskHint = 0
	// A task that uses captured speech for text entry.
	SpeechRecognitionTaskHintDictation SpeechRecognitionTaskHint = 1
	// A task that uses captured speech to specify search terms.
	SpeechRecognitionTaskHintSearch SpeechRecognitionTaskHint = 2
	// A task that uses captured speech for short, confirmation-style requests.
	SpeechRecognitionTaskHintConfirmation SpeechRecognitionTaskHint = 3
)

func (SpeechRecognitionTaskHint) String added in v0.17.0

func (e SpeechRecognitionTaskHint) String() string

String returns the SpeechRecognitionTaskHint constant's name, or its numeric form when the value is not a known constant.

type SpeechRecognitionTaskState added in v0.17.0

type SpeechRecognitionTaskState int64

The state of the task associated with the recognition request.

const (
	// Speech recognition (potentially including audio recording) has not yet started.
	SpeechRecognitionTaskStateStarting SpeechRecognitionTaskState = 0
	// Speech recognition (potentially including audio recording) is in progress.
	SpeechRecognitionTaskStateRunning SpeechRecognitionTaskState = 1
	// Audio recording has stopped, but delivery of recognition results may continue.
	SpeechRecognitionTaskStateFinishing SpeechRecognitionTaskState = 2
	// Delivery of recognition results has finished, but audio recording may be ongoing.
	SpeechRecognitionTaskStateCanceling SpeechRecognitionTaskState = 3
	// Delivery of recognition requests has finished and audio recording has stopped.
	SpeechRecognitionTaskStateCompleted SpeechRecognitionTaskState = 4
)

func (SpeechRecognitionTaskState) String added in v0.17.0

String returns the SpeechRecognitionTaskState constant's name, or its numeric form when the value is not a known constant.

type SpeechRecognizer added in v0.17.0

type SpeechRecognizer struct {
	objref.Handle
}

SpeechRecognizer is an idiomatic wrapper over the Objective-C class SFSpeechRecognizer.

An object you use to check for the availability of the speech recognition service, and to initiate the speech recognition process.

func NewSpeechRecognizer added in v0.17.0

func NewSpeechRecognizer() *SpeechRecognizer

NewSpeechRecognizer creates a new SpeechRecognizer.

func NewSpeechRecognizerWithLocale added in v0.17.0

func NewSpeechRecognizerWithLocale(locale obj.Object) *SpeechRecognizer

NewSpeechRecognizerWithLocale creates a speech recognizer associated with the specified locale.

func SpeechRecognizerFromID added in v0.17.0

func SpeechRecognizerFromID(id objc.ID) *SpeechRecognizer

SpeechRecognizerFromID adopts an existing Objective-C object as a SpeechRecognizer (nil for 0), retaining it and registering a release finalizer.

func (*SpeechRecognizer) DefaultTaskHint added in v0.17.0

func (sr *SpeechRecognizer) DefaultTaskHint() SpeechRecognitionTaskHint

DefaultTaskHint returns 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 (*SpeechRecognizer) Description added in v0.17.0

func (sr *SpeechRecognizer) Description() string

Description returns the object's -description text.

func (*SpeechRecognizer) IsAvailable added in v0.17.0

func (sr *SpeechRecognizer) IsAvailable() bool

IsAvailable reports 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 (*SpeechRecognizer) IsEqual added in v0.17.0

func (sr *SpeechRecognizer) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SpeechRecognizer) IsKind added in v0.17.0

func (sr *SpeechRecognizer) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SpeechRecognizer) Locale added in v0.17.0

func (sr *SpeechRecognizer) Locale() *foundation.Locale

Locale returns 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 (*SpeechRecognizer) Queue added in v0.17.0

Queue returns 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 (*SpeechRecognizer) RecognitionTaskWithRequestResultHandler added in v0.18.0

func (sr *SpeechRecognizer) RecognitionTaskWithRequestResultHandler(request *SpeechRecognitionRequest, resultHandler func(obj.Object, unsafe.Pointer)) *SpeechRecognitionTask

RecognitionTaskWithRequestResultHandler executes the speech recognition request and delivers the results to the specified handler block.

func (*SpeechRecognizer) String added in v0.17.0

func (sr *SpeechRecognizer) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SpeechRecognizer) SupportsOnDeviceRecognition added in v0.17.0

func (sr *SpeechRecognizer) SupportsOnDeviceRecognition() bool

SupportsOnDeviceRecognition reports 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.

func (*SpeechRecognizer) WithDefaultTaskHint added in v0.17.0

func (sr *SpeechRecognizer) WithDefaultTaskHint(defaultTaskHint SpeechRecognitionTaskHint) *SpeechRecognizer

WithDefaultTaskHint sets a hint that indicates the type of speech recognition being requested.

func (*SpeechRecognizer) WithDelegate added in v0.17.0

func (sr *SpeechRecognizer) WithDelegate(delegate SpeechRecognizerDelegate) *SpeechRecognizer

WithDelegate sets the delegate object that handles changes to the availability of speech recognition services.

func (*SpeechRecognizer) WithQueue added in v0.17.0

func (sr *SpeechRecognizer) WithQueue(queue obj.Object) *SpeechRecognizer

WithQueue sets the queue on which to execute recognition task handlers and delegate methods.

func (*SpeechRecognizer) WithSupportsOnDeviceRecognition added in v0.17.0

func (sr *SpeechRecognizer) WithSupportsOnDeviceRecognition(supportsOnDeviceRecognition bool) *SpeechRecognizer

WithSupportsOnDeviceRecognition sets a Boolean value that indicates whether the speech recognizer can operate without network access.

type SpeechRecognizerAuthorizationStatus added in v0.17.0

type SpeechRecognizerAuthorizationStatus int64

The app’s authorization to perform speech recognition.

const (
	// The app’s authorization status has not yet been determined.
	SpeechRecognizerAuthorizationStatusNotDetermined SpeechRecognizerAuthorizationStatus = 0
	// The user denied your app’s request to perform speech recognition.
	SpeechRecognizerAuthorizationStatusDenied SpeechRecognizerAuthorizationStatus = 1
	// The device prevents your app from performing speech recognition.
	SpeechRecognizerAuthorizationStatusRestricted SpeechRecognizerAuthorizationStatus = 2
	// The user granted your app’s request to perform speech recognition.
	SpeechRecognizerAuthorizationStatusAuthorized SpeechRecognizerAuthorizationStatus = 3
)

func AuthorizationStatusClass added in v0.17.0

func AuthorizationStatusClass() SpeechRecognizerAuthorizationStatus

AuthorizationStatusClass returns your app’s current authorization to perform speech recognition.

func (SpeechRecognizerAuthorizationStatus) String added in v0.17.0

String returns the SpeechRecognizerAuthorizationStatus constant's name, or its numeric form when the value is not a known constant.

type SpeechRecognizerDelegate added in v0.17.0

type SpeechRecognizerDelegate interface {
}

SpeechRecognizerDelegate receives the callbacks of the Objective-C protocol SFSpeechRecognizerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (SpeechRecognizerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type SpeechRecognizerDelegateSpeechRecognizerAvailabilityDidChangeHandler added in v0.17.0

type SpeechRecognizerDelegateSpeechRecognizerAvailabilityDidChangeHandler interface {
	SpeechRecognizerAvailabilityDidChange(speechRecognizer *SpeechRecognizer, available bool)
}

SpeechRecognizerDelegateSpeechRecognizerAvailabilityDidChangeHandler is the optional SFSpeechRecognizerDelegate method speechRecognizer:availabilityDidChange:. Implement it on a SpeechRecognizerDelegate value to receive that callback; a value without it is simply never sent one.

type SpeechURLRecognitionRequest added in v0.17.0

type SpeechURLRecognitionRequest struct {
	SpeechRecognitionRequest
}

SpeechURLRecognitionRequest is an idiomatic wrapper over the Objective-C class SFSpeechURLRecognitionRequest.

It embeds SpeechRecognitionRequest, promoting that type's methods.

A request to recognize speech in a recorded audio file.

func NewSpeechURLRecognitionRequestWithURL added in v0.17.0

func NewSpeechURLRecognitionRequestWithURL(url string) *SpeechURLRecognitionRequest

NewSpeechURLRecognitionRequestWithURL creates a speech recognition request, initialized with the specified URL.

func SpeechURLRecognitionRequestFromID added in v0.17.0

func SpeechURLRecognitionRequestFromID(id objc.ID) *SpeechURLRecognitionRequest

SpeechURLRecognitionRequestFromID adopts an existing Objective-C object as a SpeechURLRecognitionRequest (nil for 0), retaining it and registering a release finalizer.

func (*SpeechURLRecognitionRequest) URL added in v0.17.0

func (surr *SpeechURLRecognitionRequest) URL() string

URL returns the URL.

func (*SpeechURLRecognitionRequest) WithAddsPunctuation added in v0.17.0

func (surr *SpeechURLRecognitionRequest) WithAddsPunctuation(addsPunctuation bool) *SpeechURLRecognitionRequest

WithAddsPunctuation sets a Boolean value that indicates whether to add punctuation to speech recognition results.

func (*SpeechURLRecognitionRequest) WithContextualStrings added in v0.17.0

func (surr *SpeechURLRecognitionRequest) WithContextualStrings(items ...obj.Object) *SpeechURLRecognitionRequest

WithContextualStrings sets an array of phrases that should be recognized, even if they are not in the system vocabulary.

func (*SpeechURLRecognitionRequest) WithCustomizedLanguageModel added in v0.17.0

func (surr *SpeechURLRecognitionRequest) WithCustomizedLanguageModel(customizedLanguageModel *SpeechLanguageModelConfiguration) *SpeechURLRecognitionRequest

WithCustomizedLanguageModel sets the customized language model.

func (*SpeechURLRecognitionRequest) WithInteractionIdentifier added in v0.17.0

func (surr *SpeechURLRecognitionRequest) WithInteractionIdentifier(interactionIdentifier string) *SpeechURLRecognitionRequest

WithInteractionIdentifier sets an identifier string that you use to describe the type of interaction associated with the speech recognition request.

func (*SpeechURLRecognitionRequest) WithRequiresOnDeviceRecognition added in v0.17.0

func (surr *SpeechURLRecognitionRequest) WithRequiresOnDeviceRecognition(requiresOnDeviceRecognition bool) *SpeechURLRecognitionRequest

WithRequiresOnDeviceRecognition sets a Boolean value that determines whether a request must keep its audio data on the device.

func (*SpeechURLRecognitionRequest) WithShouldReportPartialResults added in v0.17.0

func (surr *SpeechURLRecognitionRequest) WithShouldReportPartialResults(shouldReportPartialResults bool) *SpeechURLRecognitionRequest

WithShouldReportPartialResults sets a Boolean value that indicates whether you want intermediate results returned for each utterance.

func (*SpeechURLRecognitionRequest) WithTaskHint added in v0.17.0

WithTaskHint sets a value that indicates the type of speech recognition being performed.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Transcription added in v0.17.0

type Transcription struct {
	objref.Handle
}

Transcription is an idiomatic wrapper over the Objective-C class SFTranscription.

A textual representation of the specified speech in its entirety, as recognized by the speech recognizer.

func NewTranscription added in v0.17.0

func NewTranscription() *Transcription

NewTranscription creates a new Transcription.

func TranscriptionFromID added in v0.17.0

func TranscriptionFromID(id objc.ID) *Transcription

TranscriptionFromID adopts an existing Objective-C object as a Transcription (nil for 0), retaining it and registering a release finalizer.

func (*Transcription) AveragePauseDuration added in v0.17.0

func (t *Transcription) AveragePauseDuration() float64

AveragePauseDuration returns the average pause duration between words, measured in seconds.

func (*Transcription) Description added in v0.17.0

func (t *Transcription) Description() string

Description returns the object's -description text.

func (*Transcription) FormattedString added in v0.17.0

func (t *Transcription) FormattedString() string

FormattedString returns the entire transcription of utterances, formatted into a single, user-displayable string.

func (*Transcription) IsEqual added in v0.17.0

func (t *Transcription) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Transcription) IsKind added in v0.17.0

func (t *Transcription) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Transcription) Segments added in v0.17.0

func (t *Transcription) Segments() []*TranscriptionSegment

Segments returns 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.

Segments returns the collection as a Go slice.

func (*Transcription) SpeakingRate added in v0.17.0

func (t *Transcription) SpeakingRate() float64

SpeakingRate returns the number of words spoken per minute.

func (*Transcription) String added in v0.17.0

func (t *Transcription) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type TranscriptionSegment added in v0.17.0

type TranscriptionSegment struct {
	objref.Handle
}

TranscriptionSegment is an idiomatic wrapper over the Objective-C class SFTranscriptionSegment.

A discrete part of an entire transcription, as identified by the speech recognizer.

func NewTranscriptionSegment added in v0.17.0

func NewTranscriptionSegment() *TranscriptionSegment

NewTranscriptionSegment creates a new TranscriptionSegment.

func TranscriptionSegmentFromID added in v0.17.0

func TranscriptionSegmentFromID(id objc.ID) *TranscriptionSegment

TranscriptionSegmentFromID adopts an existing Objective-C object as a TranscriptionSegment (nil for 0), retaining it and registering a release finalizer.

func (*TranscriptionSegment) AlternativeSubstrings added in v0.17.0

func (ts *TranscriptionSegment) AlternativeSubstrings() []string

AlternativeSubstrings returns an array of alternate interpretations of the utterance in the transcription segment.

AlternativeSubstrings returns the collection as a Go slice.

func (*TranscriptionSegment) Confidence added in v0.17.0

func (ts *TranscriptionSegment) Confidence() float32

Confidence returns 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 (*TranscriptionSegment) Description added in v0.17.0

func (ts *TranscriptionSegment) Description() string

Description returns the object's -description text.

func (*TranscriptionSegment) Duration added in v0.17.0

func (ts *TranscriptionSegment) Duration() float64

Duration returns 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 (*TranscriptionSegment) IsEqual added in v0.17.0

func (ts *TranscriptionSegment) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TranscriptionSegment) IsKind added in v0.17.0

func (ts *TranscriptionSegment) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TranscriptionSegment) String added in v0.17.0

func (ts *TranscriptionSegment) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TranscriptionSegment) Substring added in v0.17.0

func (ts *TranscriptionSegment) Substring() string

Substring returns the string representation of the utterance in the transcription segment.

func (*TranscriptionSegment) SubstringRange added in v0.17.0

func (ts *TranscriptionSegment) SubstringRange() foundation.NSRange

SubstringRange returns 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 (*TranscriptionSegment) Timestamp added in v0.17.0

func (ts *TranscriptionSegment) Timestamp() float64

Timestamp returns 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 (*TranscriptionSegment) VoiceAnalytics added in v0.17.0

func (ts *TranscriptionSegment) VoiceAnalytics() *VoiceAnalytics

VoiceAnalytics returns an analysis of the transcription segment's vocal properties.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type VoiceAnalytics added in v0.17.0

type VoiceAnalytics struct {
	objref.Handle
}

VoiceAnalytics is an idiomatic wrapper over the Objective-C class SFVoiceAnalytics.

A collection of vocal analysis metrics.

func NewVoiceAnalytics added in v0.17.0

func NewVoiceAnalytics() *VoiceAnalytics

NewVoiceAnalytics creates a new VoiceAnalytics.

func VoiceAnalyticsFromID added in v0.17.0

func VoiceAnalyticsFromID(id objc.ID) *VoiceAnalytics

VoiceAnalyticsFromID adopts an existing Objective-C object as a VoiceAnalytics (nil for 0), retaining it and registering a release finalizer.

func (*VoiceAnalytics) Description added in v0.17.0

func (va *VoiceAnalytics) Description() string

Description returns the object's -description text.

func (*VoiceAnalytics) IsEqual added in v0.17.0

func (va *VoiceAnalytics) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*VoiceAnalytics) IsKind added in v0.17.0

func (va *VoiceAnalytics) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*VoiceAnalytics) Jitter added in v0.17.0

func (va *VoiceAnalytics) Jitter() *AcousticFeature

Jitter returns the jitter.

func (*VoiceAnalytics) Pitch added in v0.17.0

func (va *VoiceAnalytics) Pitch() *AcousticFeature

Pitch returns 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 (*VoiceAnalytics) Shimmer added in v0.17.0

func (va *VoiceAnalytics) Shimmer() *AcousticFeature

Shimmer returns the variation in vocal volume stability (amplitude) in each frame of a transcription segment, expressed in decibels.

func (*VoiceAnalytics) String added in v0.17.0

func (va *VoiceAnalytics) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*VoiceAnalytics) Voicing added in v0.17.0

func (va *VoiceAnalytics) Voicing() *AcousticFeature

Voicing returns the voicing.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL