gespeaker dbus interface - /org/gtk/gespeaker/espeak

org.gtk.gespeaker
Prev | gespeaker dbus interfaces | Next

## Shell examples

Manage gespeaker through shell commands.
All DBus commands are sent with dbus-send utility from the dbus package.

To shorten typing the commands and to avoid repetitions the following variable is assumed:

OPTIONS="--print-reply --session --dest=org.gtk.gespeaker"

It will be used this way:

dbus-send $OPTIONS <interface> <method> [arguments]

## Examples

bool org.gtk.gespeaker.espeak.is_playing() void org.gtk.gespeaker.espeak.pause() void org.gtk.gespeaker.espeak.play() void org.gtk.gespeaker.espeak.stop()

### Get Gespeaker version

Retrieve the application version number

dbus-send $OPTIONS /org/gtk/gespeaker org.gtk.gespeaker.get_version

Returns: | string "0.8"

### Get temporary filename

Read the temporary filename

dbus-send $OPTIONS /org/gtk/gespeaker org.gtk.gespeaker.get_tempfilename

Returns: | string "/tmp/gespeakerCLPQQ"

### Set new text and play it at once

dbus-send $OPTIONS /org/gtk/gespeaker/ui org.gtk.gespeaker.ui.play_text string:"Hello world"

### Set new text and play it with multiple steps

Clear previous text

dbus-send $OPTIONS /org/gtk/gespeaker/text org.gtk.gespeaker.text.clear

Add new text at the end

dbus-send $OPTIONS /org/gtk/gespeaker/text org.gtk.gespeaker.text.append string:"world"

Add some other text at the begin

dbus-send $OPTIONS /org/gtk/gespeaker/text org.gtk.gespeaker.text.prepend string:"Hello "

Play the whole text

dbus-send $OPTIONS /org/gtk/gespeaker/espeak org.gtk.gespeaker.espeak.play

Replace the text

dbus-send $OPTIONS /org/gtk/gespeaker/text org.gtk.gespeaker.text.replace string:"Hello again"

Play it again

dbus-send $OPTIONS /org/gtk/gespeaker/espeak org.gtk.gespeaker.espeak.play

### Get and set voices

List all available voices

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.list_all_voices

Returns: | array [ string "afrikaans" string "albanian" ... ]

List all availale mbrola voices

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.list_mbrola_voices

Returns: | array [ string "english-mb-en1" string "french-mbrola-4" string "italian-mbrola-3" ... ]

Get the number of available voices

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.get_voices_count

Returns: | int32 59

Get the index of the currently selected voice

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.get_voice

Returns: | int32 31

Set the current voice by its index

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.set_voice int32:32

Returns: | boolean true

Get the name of the requested voice

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.get_voice_name int32:32

Returns: | string "italian-mbrola-3"

Set the current voice by its name

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.set_voice_by_name string:english

Returns: | boolean true

Get the short name of the requested voice

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.get_voice_short int32:32

Returns: | string "mb-it3"

Returns if the requested voice is a mbrola

dbus-send $OPTIONS /org/gtk/gespeaker/voice org.gtk.gespeaker.voice.get_voice_is_mbrola int32:32

Returns: | boolean true

Prev | Up | Next
Examples | Home | Python Examples