tts

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Overview

Package tts provides Go bindings for android.speech.tts.

Index

Constants

View Source
const (
	Creator         = consts.Creator
	LatencyHigh     = consts.LatencyHigh
	LatencyLow      = consts.LatencyLow
	LatencyNormal   = consts.LatencyNormal
	LatencyVeryHigh = consts.LatencyVeryHigh
	LatencyVeryLow  = consts.LatencyVeryLow
	QualityHigh     = consts.QualityHigh
	QualityLow      = consts.QualityLow
	QualityNormal   = consts.QualityNormal
	QualityVeryHigh = consts.QualityVeryHigh
	QualityVeryLow  = consts.QualityVeryLow
)

Variables

This section is empty.

Functions

func Init

func Init(env *jni.Env) error

Init resolves all JNI class and method references for this package. It is safe to call multiple times (uses sync.Once internally). Exported for E2E testing on Android.

Types

type SynthesisCallback

type SynthesisCallback struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

SynthesisCallback wraps android.speech.tts.SynthesisCallback.

func (*SynthesisCallback) AudioAvailable

func (m *SynthesisCallback) AudioAvailable(
	arg0 *jni.Object,
	arg1 int32,
	arg2 int32,
) (int32, error)

AudioAvailable calls android.speech.tts.SynthesisCallback.audioAvailable.

func (*SynthesisCallback) Done

func (m *SynthesisCallback) Done() (int32, error)

Done calls android.speech.tts.SynthesisCallback.done.

func (*SynthesisCallback) Error0

func (m *SynthesisCallback) Error0() error

Error0 calls android.speech.tts.SynthesisCallback.error.

func (*SynthesisCallback) Error1_1

func (m *SynthesisCallback) Error1_1(arg0 int32) error

Error1_1 calls android.speech.tts.SynthesisCallback.error.

func (*SynthesisCallback) GetMaxBufferSize

func (m *SynthesisCallback) GetMaxBufferSize() (int32, error)

GetMaxBufferSize calls android.speech.tts.SynthesisCallback.getMaxBufferSize.

func (*SynthesisCallback) HasFinished

func (m *SynthesisCallback) HasFinished() (bool, error)

HasFinished calls android.speech.tts.SynthesisCallback.hasFinished.

func (*SynthesisCallback) HasStarted

func (m *SynthesisCallback) HasStarted() (bool, error)

HasStarted calls android.speech.tts.SynthesisCallback.hasStarted.

func (*SynthesisCallback) Start

func (m *SynthesisCallback) Start(
	arg0 int32,
	arg1 int32,
	arg2 int32,
) (int32, error)

Start calls android.speech.tts.SynthesisCallback.start.

type SynthesisRequest

type SynthesisRequest struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

SynthesisRequest wraps android.speech.tts.SynthesisRequest.

func NewSynthesisRequest

func NewSynthesisRequest(vm *jni.VM, arg0 string, arg1 *jni.Object) (*SynthesisRequest, error)

NewSynthesisRequest creates a new android.speech.tts.SynthesisRequest instance.

func (*SynthesisRequest) GetCallerUid

func (m *SynthesisRequest) GetCallerUid() (int32, error)

GetCallerUid calls android.speech.tts.SynthesisRequest.getCallerUid.

func (*SynthesisRequest) GetCharSequenceText

func (m *SynthesisRequest) GetCharSequenceText() (*jni.Object, error)

GetCharSequenceText calls android.speech.tts.SynthesisRequest.getCharSequenceText.

func (*SynthesisRequest) GetCountry

func (m *SynthesisRequest) GetCountry() (string, error)

GetCountry calls android.speech.tts.SynthesisRequest.getCountry.

func (*SynthesisRequest) GetLanguage

func (m *SynthesisRequest) GetLanguage() (string, error)

GetLanguage calls android.speech.tts.SynthesisRequest.getLanguage.

func (*SynthesisRequest) GetParams

func (m *SynthesisRequest) GetParams() (*jni.Object, error)

GetParams calls android.speech.tts.SynthesisRequest.getParams.

func (*SynthesisRequest) GetPitch

func (m *SynthesisRequest) GetPitch() (int32, error)

GetPitch calls android.speech.tts.SynthesisRequest.getPitch.

func (*SynthesisRequest) GetSpeechRate

func (m *SynthesisRequest) GetSpeechRate() (int32, error)

GetSpeechRate calls android.speech.tts.SynthesisRequest.getSpeechRate.

func (*SynthesisRequest) GetText

func (m *SynthesisRequest) GetText() (string, error)

GetText calls android.speech.tts.SynthesisRequest.getText.

func (*SynthesisRequest) GetVariant

func (m *SynthesisRequest) GetVariant() (string, error)

GetVariant calls android.speech.tts.SynthesisRequest.getVariant.

func (*SynthesisRequest) GetVoiceName

func (m *SynthesisRequest) GetVoiceName() (string, error)

GetVoiceName calls android.speech.tts.SynthesisRequest.getVoiceName.

type TextToSpeechService

type TextToSpeechService struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

TextToSpeechService wraps android.speech.tts.TextToSpeechService.

func (*TextToSpeechService) OnBind

func (m *TextToSpeechService) OnBind(arg0 *jni.Object) (*jni.Object, error)

OnBind calls android.speech.tts.TextToSpeechService.onBind.

func (*TextToSpeechService) OnCreate

func (m *TextToSpeechService) OnCreate() error

OnCreate calls android.speech.tts.TextToSpeechService.onCreate.

func (*TextToSpeechService) OnDestroy

func (m *TextToSpeechService) OnDestroy() error

OnDestroy calls android.speech.tts.TextToSpeechService.onDestroy.

func (*TextToSpeechService) OnGetDefaultVoiceNameFor

func (m *TextToSpeechService) OnGetDefaultVoiceNameFor(
	arg0 string,
	arg1 string,
	arg2 string,
) (string, error)

OnGetDefaultVoiceNameFor calls android.speech.tts.TextToSpeechService.onGetDefaultVoiceNameFor.

func (*TextToSpeechService) OnIsValidVoiceName

func (m *TextToSpeechService) OnIsValidVoiceName(arg0 string) (int32, error)

OnIsValidVoiceName calls android.speech.tts.TextToSpeechService.onIsValidVoiceName.

func (*TextToSpeechService) OnLoadVoice

func (m *TextToSpeechService) OnLoadVoice(arg0 string) (int32, error)

OnLoadVoice calls android.speech.tts.TextToSpeechService.onLoadVoice.

type UtteranceProgressListener

type UtteranceProgressListener struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

UtteranceProgressListener wraps android.speech.tts.UtteranceProgressListener.

func (*UtteranceProgressListener) OnAudioAvailable

func (m *UtteranceProgressListener) OnAudioAvailable(arg0 string, arg1 *jni.Object) error

OnAudioAvailable calls android.speech.tts.UtteranceProgressListener.onAudioAvailable.

func (*UtteranceProgressListener) OnBeginSynthesis

func (m *UtteranceProgressListener) OnBeginSynthesis(
	arg0 string,
	arg1 int32,
	arg2 int32,
	arg3 int32,
) error

OnBeginSynthesis calls android.speech.tts.UtteranceProgressListener.onBeginSynthesis.

func (*UtteranceProgressListener) OnDone

func (m *UtteranceProgressListener) OnDone(arg0 string) error

OnDone calls android.speech.tts.UtteranceProgressListener.onDone.

func (*UtteranceProgressListener) OnError1

func (m *UtteranceProgressListener) OnError1(arg0 string) error

OnError1 calls android.speech.tts.UtteranceProgressListener.onError.

func (*UtteranceProgressListener) OnError2_1

func (m *UtteranceProgressListener) OnError2_1(arg0 string, arg1 int32) error

OnError2_1 calls android.speech.tts.UtteranceProgressListener.onError.

func (*UtteranceProgressListener) OnRangeStart

func (m *UtteranceProgressListener) OnRangeStart(
	arg0 string,
	arg1 int32,
	arg2 int32,
	arg3 int32,
) error

OnRangeStart calls android.speech.tts.UtteranceProgressListener.onRangeStart.

func (*UtteranceProgressListener) OnStart

func (m *UtteranceProgressListener) OnStart(arg0 string) error

OnStart calls android.speech.tts.UtteranceProgressListener.onStart.

func (*UtteranceProgressListener) OnStop

func (m *UtteranceProgressListener) OnStop(arg0 string, arg1 bool) error

OnStop calls android.speech.tts.UtteranceProgressListener.onStop.

type Voice

type Voice struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

Voice wraps android.speech.tts.Voice.

func NewVoice

func NewVoice(vm *jni.VM, arg0 string, arg1 *jni.Object, arg2 int32, arg3 int32, arg4 bool, arg5 *jni.Object) (*Voice, error)

NewVoice creates a new android.speech.tts.Voice instance.

func (*Voice) DescribeContents

func (m *Voice) DescribeContents() (int32, error)

DescribeContents calls android.speech.tts.Voice.describeContents.

func (*Voice) Equals

func (m *Voice) Equals(arg0 *jni.Object) (bool, error)

Equals calls android.speech.tts.Voice.equals.

func (*Voice) GetLatency

func (m *Voice) GetLatency() (int32, error)

GetLatency calls android.speech.tts.Voice.getLatency.

func (*Voice) GetLocale

func (m *Voice) GetLocale() (*jni.Object, error)

GetLocale calls android.speech.tts.Voice.getLocale.

func (*Voice) GetName

func (m *Voice) GetName() (string, error)

GetName calls android.speech.tts.Voice.getName.

func (*Voice) GetQuality

func (m *Voice) GetQuality() (int32, error)

GetQuality calls android.speech.tts.Voice.getQuality.

func (*Voice) HashCode

func (m *Voice) HashCode() (int32, error)

HashCode calls android.speech.tts.Voice.hashCode.

func (*Voice) IsNetworkConnectionRequired

func (m *Voice) IsNetworkConnectionRequired() (bool, error)

IsNetworkConnectionRequired calls android.speech.tts.Voice.isNetworkConnectionRequired.

func (*Voice) ToString

func (m *Voice) ToString() (string, error)

ToString calls android.speech.tts.Voice.toString.

func (*Voice) WriteToParcel

func (m *Voice) WriteToParcel(arg0 *jni.Object, arg1 int32) error

WriteToParcel calls android.speech.tts.Voice.writeToParcel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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