Help us shape the future of Go! Take the 2026 Go Developer Survey

soundtrigger

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionISoundTriggerDetectionServiceSetClient                 = binder.FirstCallTransaction + 0
	TransactionISoundTriggerDetectionServiceRemoveClient              = binder.FirstCallTransaction + 1
	TransactionISoundTriggerDetectionServiceOnGenericRecognitionEvent = binder.FirstCallTransaction + 2
	TransactionISoundTriggerDetectionServiceOnError                   = binder.FirstCallTransaction + 3
	TransactionISoundTriggerDetectionServiceOnStopOperation           = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodISoundTriggerDetectionServiceSetClient                 = "setClient"
	MethodISoundTriggerDetectionServiceRemoveClient              = "removeClient"
	MethodISoundTriggerDetectionServiceOnGenericRecognitionEvent = "onGenericRecognitionEvent"
	MethodISoundTriggerDetectionServiceOnError                   = "onError"
	MethodISoundTriggerDetectionServiceOnStopOperation           = "onStopOperation"
)
View Source
const DescriptorISoundTriggerDetectionService = "android.media.soundtrigger.ISoundTriggerDetectionService"
View Source
const DescriptorISoundTriggerDetectionServiceClient = "android.media.soundtrigger.ISoundTriggerDetectionServiceClient"
View Source
const (
	MethodISoundTriggerDetectionServiceClientOnOpFinished = "onOpFinished"
)
View Source
const (
	TransactionISoundTriggerDetectionServiceClientOnOpFinished = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioCapabilities

type AudioCapabilities int32
const (
	AudioCapabilitiesEchoCancellation AudioCapabilities = (1 << 0)
	AudioCapabilitiesNoiseSuppression AudioCapabilities = (1 << 1)
)

type ConfidenceLevel

type ConfidenceLevel struct {
	UserId       int32
	LevelPercent int32
}

func (*ConfidenceLevel) MarshalParcel

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

func (*ConfidenceLevel) UnmarshalParcel

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

type ISoundTriggerDetectionService

type ISoundTriggerDetectionService interface {
	AsBinder() binder.IBinder
	SetClient(ctx context.Context, uuid os.ParcelUuid, params os.Bundle, client ISoundTriggerDetectionServiceClient) error
	RemoveClient(ctx context.Context, uuid os.ParcelUuid) error
	OnGenericRecognitionEvent(ctx context.Context, uuid os.ParcelUuid, opId int32, event hardwareSoundtrigger.SoundTriggerGenericRecognitionEvent) error
	OnError(ctx context.Context, uuid os.ParcelUuid, opId int32, status int32) error
	OnStopOperation(ctx context.Context, uuid os.ParcelUuid, opId int32) error
}

func NewSoundTriggerDetectionServiceStub

func NewSoundTriggerDetectionServiceStub(
	impl ISoundTriggerDetectionServiceServer,
) ISoundTriggerDetectionService

NewSoundTriggerDetectionServiceStub creates a server-side ISoundTriggerDetectionService wrapping the given server implementation. The returned value satisfies ISoundTriggerDetectionService 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 ISoundTriggerDetectionServiceClient

type ISoundTriggerDetectionServiceClient interface {
	AsBinder() binder.IBinder
	OnOpFinished(ctx context.Context, opId int32) error
}

func NewSoundTriggerDetectionServiceClientStub

func NewSoundTriggerDetectionServiceClientStub(
	impl ISoundTriggerDetectionServiceClientServer,
) ISoundTriggerDetectionServiceClient

NewSoundTriggerDetectionServiceClientStub creates a server-side ISoundTriggerDetectionServiceClient wrapping the given server implementation. The returned value satisfies ISoundTriggerDetectionServiceClient 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 ISoundTriggerDetectionServiceClientServer

type ISoundTriggerDetectionServiceClientServer interface {
	OnOpFinished(ctx context.Context, opId int32) error
}

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

type ISoundTriggerDetectionServiceServer

type ISoundTriggerDetectionServiceServer interface {
	SetClient(ctx context.Context, uuid os.ParcelUuid, params os.Bundle, client ISoundTriggerDetectionServiceClient) error
	RemoveClient(ctx context.Context, uuid os.ParcelUuid) error
	OnGenericRecognitionEvent(ctx context.Context, uuid os.ParcelUuid, opId int32, event hardwareSoundtrigger.SoundTriggerGenericRecognitionEvent) error
	OnError(ctx context.Context, uuid os.ParcelUuid, opId int32, status int32) error
	OnStopOperation(ctx context.Context, uuid os.ParcelUuid, opId int32) error
}

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

type ModelParameter

type ModelParameter int32
const (
	ModelParameterINVALID         ModelParameter = -1
	ModelParameterThresholdFactor ModelParameter = 0
)

type ModelParameterRange

type ModelParameterRange struct {
	MinInclusive int32
	MaxInclusive int32
}

func (*ModelParameterRange) MarshalParcel

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

func (*ModelParameterRange) UnmarshalParcel

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

type Phrase

type Phrase struct {
	Id               int32
	RecognitionModes int32
	Users            []int32
	Locale           string
	Text             string
}

func (*Phrase) MarshalParcel

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

func (*Phrase) UnmarshalParcel

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

type PhraseRecognitionEvent

type PhraseRecognitionEvent struct {
	Common       RecognitionEvent
	PhraseExtras []PhraseRecognitionExtra
}

func (*PhraseRecognitionEvent) MarshalParcel

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

func (*PhraseRecognitionEvent) UnmarshalParcel

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

type PhraseRecognitionExtra

type PhraseRecognitionExtra struct {
	Id               int32
	RecognitionModes int32
	ConfidenceLevel  int32
	Levels           []ConfidenceLevel
}

func (*PhraseRecognitionExtra) MarshalParcel

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

func (*PhraseRecognitionExtra) UnmarshalParcel

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

type PhraseSoundModel

type PhraseSoundModel struct {
	Common  SoundModel
	Phrases []Phrase
}

func (*PhraseSoundModel) MarshalParcel

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

func (*PhraseSoundModel) UnmarshalParcel

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

type Properties

type Properties struct {
	Implementor        string
	Description        string
	Version            int32
	Uuid               string
	SupportedModelArch string
	MaxSoundModels     int32
	MaxKeyPhrases      int32
	MaxUsers           int32
	RecognitionModes   int32
	CaptureTransition  bool
	MaxBufferMs        int32
	ConcurrentCapture  bool
	TriggerInEvent     bool
	PowerConsumptionMw int32
	AudioCapabilities  int32
}

func (*Properties) MarshalParcel

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

func (*Properties) UnmarshalParcel

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

type RecognitionConfig

type RecognitionConfig struct {
	CaptureRequested        bool
	PhraseRecognitionExtras []PhraseRecognitionExtra
	AudioCapabilities       int32
	Data                    []byte
}

func (*RecognitionConfig) MarshalParcel

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

func (*RecognitionConfig) UnmarshalParcel

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

type RecognitionEvent

type RecognitionEvent struct {
	Status                 RecognitionStatus
	Type                   SoundModelType
	CaptureAvailable       bool
	CaptureDelayMs         int32
	CapturePreambleMs      int32
	TriggerInData          bool
	AudioConfig            *common.AudioConfig
	Data                   []byte
	RecognitionStillActive bool
}

func (*RecognitionEvent) MarshalParcel

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

func (*RecognitionEvent) UnmarshalParcel

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

type RecognitionMode

type RecognitionMode int32
const (
	RecognitionModeVoiceTrigger       RecognitionMode = 1
	RecognitionModeUserIdentification RecognitionMode = 2
	RecognitionModeUserAuthentication RecognitionMode = 4
	RecognitionModeGenericTrigger     RecognitionMode = 8
)

type RecognitionStatus

type RecognitionStatus int32
const (
	RecognitionStatusINVALID RecognitionStatus = -1
	RecognitionStatusSUCCESS RecognitionStatus = 0
	RecognitionStatusABORTED RecognitionStatus = 1
	RecognitionStatusFAILURE RecognitionStatus = 2
	RecognitionStatusFORCED  RecognitionStatus = 3
)

type SoundModel

type SoundModel struct {
	Type       SoundModelType
	Uuid       string
	VendorUuid string
	Data       int32
	DataSize   int32
}

func (*SoundModel) MarshalParcel

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

func (*SoundModel) UnmarshalParcel

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

type SoundModelType

type SoundModelType int32
const (
	SoundModelTypeINVALID   SoundModelType = -1
	SoundModelTypeKEYPHRASE SoundModelType = 0
	SoundModelTypeGENERIC   SoundModelType = 1
)

type SoundTriggerDetectionServiceClientProxy

type SoundTriggerDetectionServiceClientProxy struct {
	Remote binder.IBinder
}

func NewSoundTriggerDetectionServiceClientProxy

func NewSoundTriggerDetectionServiceClientProxy(
	remote binder.IBinder,
) *SoundTriggerDetectionServiceClientProxy

func (*SoundTriggerDetectionServiceClientProxy) AsBinder

func (*SoundTriggerDetectionServiceClientProxy) OnOpFinished

func (p *SoundTriggerDetectionServiceClientProxy) OnOpFinished(
	ctx context.Context,
	opId int32,
) error

type SoundTriggerDetectionServiceClientStub

type SoundTriggerDetectionServiceClientStub struct {
	Impl      ISoundTriggerDetectionServiceClient
	Transport binder.VersionAwareTransport
}

SoundTriggerDetectionServiceClientStub dispatches incoming binder transactions to a typed ISoundTriggerDetectionServiceClient implementation.

func (*SoundTriggerDetectionServiceClientStub) Descriptor

func (*SoundTriggerDetectionServiceClientStub) OnTransaction

type SoundTriggerDetectionServiceProxy

type SoundTriggerDetectionServiceProxy struct {
	Remote binder.IBinder
}

func NewSoundTriggerDetectionServiceProxy

func NewSoundTriggerDetectionServiceProxy(
	remote binder.IBinder,
) *SoundTriggerDetectionServiceProxy

func (*SoundTriggerDetectionServiceProxy) AsBinder

func (*SoundTriggerDetectionServiceProxy) OnError

func (p *SoundTriggerDetectionServiceProxy) OnError(
	ctx context.Context,
	uuid os.ParcelUuid,
	opId int32,
	status int32,
) error

func (*SoundTriggerDetectionServiceProxy) OnGenericRecognitionEvent

func (*SoundTriggerDetectionServiceProxy) OnStopOperation

func (p *SoundTriggerDetectionServiceProxy) OnStopOperation(
	ctx context.Context,
	uuid os.ParcelUuid,
	opId int32,
) error

func (*SoundTriggerDetectionServiceProxy) RemoveClient

func (p *SoundTriggerDetectionServiceProxy) RemoveClient(
	ctx context.Context,
	uuid os.ParcelUuid,
) error

func (*SoundTriggerDetectionServiceProxy) SetClient

type SoundTriggerDetectionServiceStub

type SoundTriggerDetectionServiceStub struct {
	Impl      ISoundTriggerDetectionService
	Transport binder.VersionAwareTransport
}

SoundTriggerDetectionServiceStub dispatches incoming binder transactions to a typed ISoundTriggerDetectionService implementation.

func (*SoundTriggerDetectionServiceStub) Descriptor

func (s *SoundTriggerDetectionServiceStub) Descriptor() string

func (*SoundTriggerDetectionServiceStub) OnTransaction

type Status

type Status int32
const (
	StatusINVALID                   Status = -1
	StatusSUCCESS                   Status = 0
	StatusResourceContention        Status = 1
	StatusOperationNotSupported     Status = 2
	StatusTemporaryPermissionDenied Status = 3
	StatusDeadObject                Status = 4
	StatusInternalError             Status = 5
)

Jump to

Keyboard shortcuts

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