soundtrigger

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIRecognitionStatusCallbackOnKeyphraseDetected           = binder.FirstCallTransaction + 0
	TransactionIRecognitionStatusCallbackOnGenericSoundTriggerDetected = binder.FirstCallTransaction + 1
	TransactionIRecognitionStatusCallbackOnRecognitionPaused           = binder.FirstCallTransaction + 2
	TransactionIRecognitionStatusCallbackOnRecognitionResumed          = binder.FirstCallTransaction + 3
	TransactionIRecognitionStatusCallbackOnPreempted                   = binder.FirstCallTransaction + 4
	TransactionIRecognitionStatusCallbackOnModuleDied                  = binder.FirstCallTransaction + 5
	TransactionIRecognitionStatusCallbackOnResumeFailed                = binder.FirstCallTransaction + 6
	TransactionIRecognitionStatusCallbackOnPauseFailed                 = binder.FirstCallTransaction + 7
)
View Source
const (
	MethodIRecognitionStatusCallbackOnKeyphraseDetected           = "onKeyphraseDetected"
	MethodIRecognitionStatusCallbackOnGenericSoundTriggerDetected = "onGenericSoundTriggerDetected"
	MethodIRecognitionStatusCallbackOnRecognitionPaused           = "onRecognitionPaused"
	MethodIRecognitionStatusCallbackOnRecognitionResumed          = "onRecognitionResumed"
	MethodIRecognitionStatusCallbackOnPreempted                   = "onPreempted"
	MethodIRecognitionStatusCallbackOnModuleDied                  = "onModuleDied"
	MethodIRecognitionStatusCallbackOnResumeFailed                = "onResumeFailed"
	MethodIRecognitionStatusCallbackOnPauseFailed                 = "onPauseFailed"
)
View Source
const DescriptorIRecognitionStatusCallback = "android.hardware.soundtrigger.IRecognitionStatusCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type IRecognitionStatusCallback

type IRecognitionStatusCallback interface {
	AsBinder() binder.IBinder
	OnKeyphraseDetected(ctx context.Context, recognitionEvent SoundTriggerKeyphraseRecognitionEvent) error
	OnGenericSoundTriggerDetected(ctx context.Context, recognitionEvent SoundTriggerGenericRecognitionEvent) error
	OnRecognitionPaused(ctx context.Context) error
	OnRecognitionResumed(ctx context.Context) error
	OnPreempted(ctx context.Context) error
	OnModuleDied(ctx context.Context) error
	OnResumeFailed(ctx context.Context, status int32) error
	OnPauseFailed(ctx context.Context, status int32) error
}

func NewRecognitionStatusCallbackStub

func NewRecognitionStatusCallbackStub(
	impl IRecognitionStatusCallbackServer,
) IRecognitionStatusCallback

NewRecognitionStatusCallbackStub creates a server-side IRecognitionStatusCallback wrapping the given server implementation. The returned value satisfies IRecognitionStatusCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IRecognitionStatusCallbackServer

type IRecognitionStatusCallbackServer interface {
	OnKeyphraseDetected(ctx context.Context, recognitionEvent SoundTriggerKeyphraseRecognitionEvent) error
	OnGenericSoundTriggerDetected(ctx context.Context, recognitionEvent SoundTriggerGenericRecognitionEvent) error
	OnRecognitionPaused(ctx context.Context) error
	OnRecognitionResumed(ctx context.Context) error
	OnPreempted(ctx context.Context) error
	OnModuleDied(ctx context.Context) error
	OnResumeFailed(ctx context.Context, status int32) error
	OnPauseFailed(ctx context.Context, status int32) error
}

IRecognitionStatusCallbackServer is the server-side interface that user implementations provide to NewRecognitionStatusCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type KeyphraseMetadata

type KeyphraseMetadata struct {
	Id                   int32
	Keyphrase            string
	RecognitionModeFlags int32
}

func (*KeyphraseMetadata) MarshalParcel

func (s *KeyphraseMetadata) MarshalParcel(
	p *parcel.Parcel,
) error

func (*KeyphraseMetadata) UnmarshalParcel

func (s *KeyphraseMetadata) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ModelParams

type ModelParams int32
const (
	ModelParamsINVALID         ModelParams = -1
	ModelParamsThresholdFactor ModelParams = 0
)

type RecognitionStatusCallbackProxy

type RecognitionStatusCallbackProxy struct {
	Remote binder.IBinder
}

func NewRecognitionStatusCallbackProxy

func NewRecognitionStatusCallbackProxy(
	remote binder.IBinder,
) *RecognitionStatusCallbackProxy

func (*RecognitionStatusCallbackProxy) AsBinder

func (*RecognitionStatusCallbackProxy) OnGenericSoundTriggerDetected

func (p *RecognitionStatusCallbackProxy) OnGenericSoundTriggerDetected(
	ctx context.Context,
	recognitionEvent SoundTriggerGenericRecognitionEvent,
) error

func (*RecognitionStatusCallbackProxy) OnKeyphraseDetected

func (p *RecognitionStatusCallbackProxy) OnKeyphraseDetected(
	ctx context.Context,
	recognitionEvent SoundTriggerKeyphraseRecognitionEvent,
) error

func (*RecognitionStatusCallbackProxy) OnModuleDied

func (p *RecognitionStatusCallbackProxy) OnModuleDied(
	ctx context.Context,
) error

func (*RecognitionStatusCallbackProxy) OnPauseFailed

func (p *RecognitionStatusCallbackProxy) OnPauseFailed(
	ctx context.Context,
	status int32,
) error

func (*RecognitionStatusCallbackProxy) OnPreempted

func (p *RecognitionStatusCallbackProxy) OnPreempted(
	ctx context.Context,
) error

func (*RecognitionStatusCallbackProxy) OnRecognitionPaused

func (p *RecognitionStatusCallbackProxy) OnRecognitionPaused(
	ctx context.Context,
) error

func (*RecognitionStatusCallbackProxy) OnRecognitionResumed

func (p *RecognitionStatusCallbackProxy) OnRecognitionResumed(
	ctx context.Context,
) error

func (*RecognitionStatusCallbackProxy) OnResumeFailed

func (p *RecognitionStatusCallbackProxy) OnResumeFailed(
	ctx context.Context,
	status int32,
) error

type RecognitionStatusCallbackStub

type RecognitionStatusCallbackStub struct {
	Impl      IRecognitionStatusCallback
	Transport binder.VersionAwareTransport
}

RecognitionStatusCallbackStub dispatches incoming binder transactions to a typed IRecognitionStatusCallback implementation.

func (*RecognitionStatusCallbackStub) Descriptor

func (s *RecognitionStatusCallbackStub) Descriptor() string

func (*RecognitionStatusCallbackStub) OnTransaction

type SoundTriggerConfidenceLevel

type SoundTriggerConfidenceLevel struct {
}

func (*SoundTriggerConfidenceLevel) MarshalParcel

func (s *SoundTriggerConfidenceLevel) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerConfidenceLevel) UnmarshalParcel

func (s *SoundTriggerConfidenceLevel) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerGenericRecognitionEvent

type SoundTriggerGenericRecognitionEvent struct {
}

func (*SoundTriggerGenericRecognitionEvent) MarshalParcel

func (s *SoundTriggerGenericRecognitionEvent) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerGenericRecognitionEvent) UnmarshalParcel

func (s *SoundTriggerGenericRecognitionEvent) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerGenericSoundModel

type SoundTriggerGenericSoundModel struct {
}

func (*SoundTriggerGenericSoundModel) MarshalParcel

func (s *SoundTriggerGenericSoundModel) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerGenericSoundModel) UnmarshalParcel

func (s *SoundTriggerGenericSoundModel) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerKeyphrase

type SoundTriggerKeyphrase struct {
}

func (*SoundTriggerKeyphrase) MarshalParcel

func (s *SoundTriggerKeyphrase) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerKeyphrase) UnmarshalParcel

func (s *SoundTriggerKeyphrase) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerKeyphraseRecognitionEvent

type SoundTriggerKeyphraseRecognitionEvent struct {
}

func (*SoundTriggerKeyphraseRecognitionEvent) MarshalParcel

func (s *SoundTriggerKeyphraseRecognitionEvent) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerKeyphraseRecognitionEvent) UnmarshalParcel

func (s *SoundTriggerKeyphraseRecognitionEvent) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerKeyphraseRecognitionExtra

type SoundTriggerKeyphraseRecognitionExtra struct {
}

func (*SoundTriggerKeyphraseRecognitionExtra) MarshalParcel

func (s *SoundTriggerKeyphraseRecognitionExtra) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerKeyphraseRecognitionExtra) UnmarshalParcel

func (s *SoundTriggerKeyphraseRecognitionExtra) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerKeyphraseSoundModel

type SoundTriggerKeyphraseSoundModel struct {
}

func (*SoundTriggerKeyphraseSoundModel) MarshalParcel

func (s *SoundTriggerKeyphraseSoundModel) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerKeyphraseSoundModel) UnmarshalParcel

func (s *SoundTriggerKeyphraseSoundModel) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerModelParamRange

type SoundTriggerModelParamRange struct {
}

func (*SoundTriggerModelParamRange) MarshalParcel

func (s *SoundTriggerModelParamRange) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerModelParamRange) UnmarshalParcel

func (s *SoundTriggerModelParamRange) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerModuleProperties

type SoundTriggerModuleProperties struct {
}

func (*SoundTriggerModuleProperties) MarshalParcel

func (s *SoundTriggerModuleProperties) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerModuleProperties) UnmarshalParcel

func (s *SoundTriggerModuleProperties) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerRecognitionConfig

type SoundTriggerRecognitionConfig struct {
}

func (*SoundTriggerRecognitionConfig) MarshalParcel

func (s *SoundTriggerRecognitionConfig) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerRecognitionConfig) UnmarshalParcel

func (s *SoundTriggerRecognitionConfig) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SoundTriggerRecognitionEvent

type SoundTriggerRecognitionEvent struct {
}

func (*SoundTriggerRecognitionEvent) MarshalParcel

func (s *SoundTriggerRecognitionEvent) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SoundTriggerRecognitionEvent) UnmarshalParcel

func (s *SoundTriggerRecognitionEvent) UnmarshalParcel(
	p *parcel.Parcel,
) error

Jump to

Keyboard shortcuts

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