Gets information about available text-to-speech engines on the device.
Usage #
package main
import (
"fmt"
t "github.com/hugmouse/gotermux"
)
func main() {
engines := t.TermuxTTSEngines()
fmt.Printf("Default Engine: %s\n", engines.DefaultEngine)
for _, engine := range engines.Engines {
fmt.Printf("Engine: %s, Label: %s\n", engine.Name, engine.Label)
}
}
Output:
Default Engine: com.google.android.tts
Engine: com.google.android.tts, Label: Google Text-to-speech Engine
Return Value #
Returns TTSEngine
containing information about available TTS engines.
Struct TTSEngine #
Field | Type | Description |
---|---|---|
DefaultEngine | string | Default TTS engine package name |
Engines | []TTSEngineInfo | Array of available engines |
Struct TTSEngineInfo #
Field | Type | Description |
---|---|---|
Name | string | Engine package name |
Label | string | Human-readable engine name |