diff --git a/README.md b/README.md index ec3a0279..aaa99aa7 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,12 @@ the [speech dispatcher documentation](http://htmlpreview.github.io/?https://gith the [spd-say documentation](http://htmlpreview.github.io/?https://github.com/brailcom/speechd/blob/master/doc/spd-say.html), and the [SSIP protocol documentation](http://htmlpreview.github.io/?https://github.com/brailcom/speechd/blob/master/doc/ssip.html). -The python binding documentation is available with `pydoc3 speechd` (or `pydoc speechd`) +The python binding documentation is available on the shell with +`pydoc3 speechd` (or `pydoc speechd`) +and online, both the documentation for the +[direct mapping of the SSIP commands and logic](http://htmlpreview.github.io/?https://github.com/brailcom/speechd/blob/master/doc/speechd.client.SSIPClient.html) +and the +[more convenient interface](http://htmlpreview.github.io/?https://github.com/brailcom/speechd/blob/master/doc/speechd.client.Speaker.html) The key features and the supported TTS engines, output subsystems, client interfaces and client applications known to work with Speech Dispatcher are diff --git a/doc/.gitignore b/doc/.gitignore index d2ec9548..b22a6dc2 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -29,6 +29,9 @@ /speech-dispatcher.dvi /speech-dispatcher.html /speech-dispatcher.info +/speechd.client.SSIPClient.html +/speechd.client.Speaker.html +/speechd.html /ssip.dvi /ssip.html /ssip.info diff --git a/doc/Makefile.am b/doc/Makefile.am index 3bdb84f9..01fbaeca 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -19,6 +19,11 @@ if BUILD_HTML_DOC all: html endif +if HAVE_PYTHON +PYTHON_HTML = speechd.html speechd.client.SSIPClient.html speechd.client.Speaker.html +all: $(PYTHON_HTML) +endif + MAKEINFOHTML = $(MAKEINFO) --html --no-split info_TEXINFOS = ssip.texi speech-dispatcher.texi spd-say.texi speech-dispatcher-cs.texi @@ -28,6 +33,9 @@ speech_dispatcher_TEXINFOS = gpl.texi fdl.texi speech-dispatcher.texi speech_dispatcher_cs_TEXINFOS = gpl.texi fdl.texi speech-dispatcher-cs.texi ssip_TEXINFOS = gpl.texi fdl.texi +$(PYTHON_HTML): %.html: $(top_srcdir)/src/api/python/speechd/__init__.py $(top_srcdir)/src/api/python/speechd/client.py + PYTHONPATH=$(top_builddir)/src/api/python pydoc3 -w $* + CLEANFILES = spd-say.info \ speech-dispatcher-cs.info \ speech-dispatcher.info \ @@ -44,6 +52,7 @@ DISTCLEANFILES = \ speech-dispatcher-cs.dvi \ speech-dispatcher.html \ speech-dispatcher.dvi \ + $(PYTHON_HTML) \ ssip.html \ ssip.dvi \ mdate-sh \ diff --git a/doc/speechd.client.SSIPClient.html b/doc/speechd.client.SSIPClient.html new file mode 100644 index 00000000..1162fa89 --- /dev/null +++ b/doc/speechd.client.SSIPClient.html @@ -0,0 +1,351 @@ + + + + +Python: class SSIPClient + +

+ + + + + + + +
 
speechd.client.SSIPClient = class SSIPClient(builtins.object)
   speechd.client.SSIPClient(
+    name,
+    component='default',
+    user='unknown',
+    address=None,
+    autospawn=None,
+    host=None,
+    port=None,
+    method=None,
+    socket_path=None
+)

+Basic Speech Dispatcher client interface.

+This class provides a Python interface to Speech Dispatcher functionality
+over an SSIP connection.  The API maps directly to available SSIP commands.
+Each connection to Speech Dispatcher is represented by one instance of this
+class.

+Many commands take the 'scope' argument, thus it is shortly documented
+here.  It is either one of 'Scope' constants or a number of connection.  By
+specifying the connection number, you are applying the command to a
+particular connection.  This feature is only meant to be used by Speech
+Dispatcher control application, however.  More datails can be found in
+Speech Dispatcher documentation.

+Here is a simple example:

+from speechd import client
+c = client.SSIPClient("mytest")
+c.speak("hello, world!")
 
 Methods defined here:
+
__del__(self)
Close the connection
+ +
__init__( + self, + name, + component='default', + user='unknown', + address=None, + autospawn=None, + host=None, + port=None, + method=None, + socket_path=None +)
Initialize the instance and connect to the server.

+Arguments:
+  name -- client identification string
+  component -- connection identification string.  When one client opens
+    multiple connections, this can be used to identify each of them.
+  user -- user identification string (user name).  When multi-user
+    access is expected, this can be used to identify their connections.
+  address -- server address as specified in Speech Dispatcher
+    documentation (e.g. "unix:/run/user/joe/speech-dispatcher/speechd.sock"
+    or "inet:192.168.0.85:6561")
+  autospawn -- a flag to specify whether the library should
+    try to start the server if it determines its not already
+    running or not

+Deprecated arguments:
+  method -- communication method to use, one of the constants defined in class
+    CommunicationMethod
+  socket_path -- for CommunicationMethod.UNIX_SOCKET, socket
+    path in filesystem. By default, this is $XDG_RUNTIME_DIR/speech-dispatcher/speechd.sock
+    where $XDG_RUNTIME_DIR is determined using the XDG Base Directory
+    Specification.
+  host -- for CommunicationMethod.INET_SOCKET, server hostname
+    or IP address as a string.  If None, the default value is
+    taken from SPEECHD_HOST environment variable (if it
+    exists) or from the DEFAULT_HOST attribute of this class.
+  port -- for CommunicationMethod.INET_SOCKET method, server
+    port as number or None.  If None, the default value is
+    taken from SPEECHD_PORT environment variable (if it
+    exists) or from the DEFAULT_PORT attribute of this class.

+For more information on client identification strings see Speech
+Dispatcher documentation.
+ +
block_begin(self)
Begin an SSIP block.

+See SSIP documentation for more details about blocks.
+ +
block_end(self)
Close an SSIP block.

+See SSIP documentation for more details about blocks.
+ +
cancel(self, scope='self')
Immediately stop speaking and discard messages in queues.

+Arguments:
+  scope -- see the documentation of this class.
+ +
char(self, char)
Say given character.

+Arguments:
+  char -- a character to be spoken.  Either a Python unicode string or
+    a UTF-8 encoded byte string.

+This method is non-blocking;  it just sends the command, given
+message is queued on the server and the method returns immediately.
+ +
close(self)
Close the connection to Speech Dispatcher.
+ +
get_language(self)
Get the current language.
+ +
get_output_module(self)
Get the current output module.
+ +
get_pitch(self)
Get the current pitch.
+ +
get_punctuation(self)
Get the punctuation pronunciation level.
+ +
get_rate(self)
Get the current speech rate (speed).
+ +
get_volume(self)
Get the speech volume.
+ +
key(self, key)
Say given key name.

+Arguments:
+  key -- the key name (as defined in SSIP); string.

+This method is non-blocking;  it just sends the command, given
+message is queued on the server and the method returns immediately.
+ +
list_output_modules(self)
Return names of all active output modules as a tuple of strings.
+ +
list_synthesis_voices(self, language=None, variant=None)
Return names of all available voices for the current output module.

+If language (possibly even variant) is set, only the list matching that
+language (possibly even variant) is returned.

+Returns a tuple of tripplets (name, language, variant).

+'name' is a string, 'language' is an ISO 639-1 Alpha-2/3 language code
+and 'variant' is a string.  Language and variant may be None.
+ +
pause(self, scope='self')
Pause speaking and postpone other messages until resume.

+This method is non-blocking.  However, speaking can continue for a
+short while even after it's called (typically to the end of the
+sentence).

+Arguments:
+  scope -- see the documentation of this class.
+ +
resume(self, scope='self')
Resume speaking of the currently paused messages.

+This method is non-blocking.  However, speaking can continue for a
+short while even after it's called (typically to the end of the
+sentence).

+Arguments:
+  scope -- see the documentation of this class.
+ +
set_cap_let_recogn(self, value, scope='self')
Set capital letter recognition mode.

+Arguments:
+  value -- one of 'none', 'spell', 'icon'. None means no signalization
+    of capital letters, 'spell' means capital letters will be spelled
+    with a synthetic voice and 'icon' means that the capital-letter icon
+    will be prepended before each capital letter.
+  scope -- see the documentation of this class.
+ +
set_data_mode(self, value)
Set the data mode for further speech commands.

+Arguments:
+  value - one of the constants defined by the DataMode class.
+ +
set_debug(self, val)
Switch debugging on and off. When switched on,
+debugging files will be created in the chosen destination
+(see set_debug_destination()) for Speech Dispatcher and all
+its running modules. All logging information will then be
+written into these files with maximal verbosity until switched
+off. You should always first call set_debug_destination.

+The intended use of this functionality is to switch debugging
+on for a period of time while the user will repeat the behavior
+and then send the logs to the appropriate bug-reporting place.

+Arguments:
+  val -- a boolean value determining whether debugging
+         is switched on or off
+  scope -- see the documentation of this class.
+ +
set_debug_destination(self, path)
Set debug destination.

+Arguments:
+  path -- path (string) to the directory where debugging
+          files will be created
+  scope -- see the documentation of this class.
+ +
set_language(self, language, scope='self')
Switch to a particular language for further speech commands.

+Arguments:
+  language -- two/three letter language code according to RFC 1766 as string, possibly with a region qualification.
+  scope -- see the documentation of this class.
+ +
set_output_module(self, name, scope='self')
Switch to a particular output module.

+Arguments:
+  name -- module (string) as returned by 'list_output_modules()'.
+  scope -- see the documentation of this class.
+ +
set_pause_context(self, value, scope='self')
Set the amount of context when resuming a paused message.

+Arguments:
+  value -- a positive or negative value meaning how many chunks of data
+    after or before the pause should be read when resume() is executed.
+  scope -- see the documentation of this class.
+ +
set_pitch(self, value, scope='self')
Set the pitch for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 0
+    corresponding to the default pitch of the current speech synthesis
+    output module, lower values meaning lower pitch and higher values
+    meaning higher pitch.
+  scope -- see the documentation of this class.
+ +
set_pitch_range(self, value, scope='self')
Set the pitch range for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 0
+    corresponding to the default pitch range of the current speech synthesis
+    output module, lower values meaning lower pitch range and higher values
+    meaning higher pitch range.
+  scope -- see the documentation of this class.
+ +
set_priority(self, priority)
Set the priority category for the following messages.

+Arguments:
+  priority -- one of the 'Priority' constants.
+ +
set_punctuation(self, value, scope='self')
Set the punctuation pronunciation level.

+Arguments:
+  value -- one of the 'PunctuationMode' constants.
+  scope -- see the documentation of this class.
+ +
set_rate(self, value, scope='self')
Set the speech rate (speed) for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 0
+    corresponding to the default speech rate of the current speech
+    synthesis output module, lower values meaning slower speech and
+    higher values meaning faster speech.
+  scope -- see the documentation of this class.
+ +
set_spelling(self, value, scope='self')
Toggle the spelling mode or on off.

+Arguments:
+  value -- if 'True', all incoming messages will be spelled
+    instead of being read as normal words. 'False' switches
+    this behavior off.
+  scope -- see the documentation of this class.
+ +
set_synthesis_voice(self, value, scope='self')
Set voice by its real name.

+Arguments:
+  value -- voice name as returned by 'list_synthesis_voices()'
+  scope -- see the documentation of this class.
+ +
set_voice(self, value, scope='self')
Set voice by a symbolic name.

+Arguments:
+  value -- one of the SSIP symbolic voice names: 'MALE1' .. 'MALE3',
+    'FEMALE1' ... 'FEMALE3', 'CHILD_MALE', 'CHILD_FEMALE'
+  scope -- see the documentation of this class.

+Symbolic voice names are mapped to real synthesizer voices in the
+configuration of the output module.  Use the method
+'set_synthesis_voice()' if you want to work with real voices.
+ +
set_volume(self, value, scope='self')
Set the speech volume for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 100
+    corresponding to the default speech volume of the current speech
+    synthesis output module, lower values meaning softer speech.
+  scope -- see the documentation of this class.
+ +
sound_icon(self, sound_icon)
Output given sound_icon.

+Arguments:
+  sound_icon -- the name of the sound icon as defined by SSIP; string.

+This method is non-blocking; it just sends the command, given message
+is queued on the server and the method returns immediately.
+ +
speak(self, text, callback=None, event_types=None)
Say given message.

+Arguments:
+  text -- message text to be spoken.  This may be either a UTF-8
+    encoded byte string or a Python unicode string.
+  callback -- a callback handler for asynchronous event notifications.
+    A callable object (function) which accepts one positional argument
+    `type' and one keyword argument `index_mark'.  See below for more
+    details.
+  event_types -- a tuple of event types for which the callback should
+    be called.  Each item must be one of `CallbackType' constants.
+    None (the default value) means to handle all event types.  This
+    argument is irrelevant when `callback' is not used.

+The callback function will be called whenever one of the events occurs.
+The event type will be passed as argument.  Its value is one of the
+`CallbackType' constants.  In case of an index mark event, additional
+keyword argument `index_mark' will be passed and will contain the index
+mark identifier as specified within the text.

+The callback function should not perform anything complicated and is
+not allowed to issue any further SSIP client commands.  An attempt to
+do so would lead to a deadlock in SSIP communication.

+This method is non-blocking;  it just sends the command, given
+message is queued on the server and the method returns immediately.
+ +
stop(self, scope='self')
Immediately stop speaking the currently spoken message.

+Arguments:
+  scope -- see the documentation of this class.
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables
+
+
__weakref__
+
list of weak references to the object
+
+
+Data and other attributes defined here:
+
DEFAULT_HOST = '127.0.0.1'
+ +
DEFAULT_PORT = 6560
+ +
DEFAULT_SOCKET_PATH = 'speech-dispatcher/speechd.sock'
+ +
+ \ No newline at end of file diff --git a/doc/speechd.client.Speaker.html b/doc/speechd.client.Speaker.html new file mode 100644 index 00000000..26d462fd --- /dev/null +++ b/doc/speechd.client.Speaker.html @@ -0,0 +1,352 @@ + + + + +Python: class Speaker + +

+ + + + + + + +
 
speechd.client.Speaker = class Speaker(SSIPClient)
   speechd.client.Speaker(
+    name,
+    component='default',
+    user='unknown',
+    address=None,
+    autospawn=None,
+    host=None,
+    port=None,
+    method=None,
+    socket_path=None
+)

+Extended Speech Dispatcher Interface.

+This class provides an extended intercace to Speech Dispatcher
+functionality and tries to hide most of the lower level details of SSIP
+(such as a more sophisticated handling of blocks and priorities and
+advanced event notifications) under a more convenient API.

+Please note that the API is not yet stabilized and thus is subject to
+change!  Please contact the authors if you plan using it and/or if you have
+any suggestions.

+Well, in fact this class is currently not implemented at all.  It is just a
+draft.  The intention is to hide the SSIP details and provide a generic
+interface practical for screen readers.
 
 
Method resolution order:
+
Speaker
+
SSIPClient
+
builtins.object
+
+
+Methods inherited from SSIPClient:
+
__del__(self)
Close the connection
+ +
__init__( + self, + name, + component='default', + user='unknown', + address=None, + autospawn=None, + host=None, + port=None, + method=None, + socket_path=None +)
Initialize the instance and connect to the server.

+Arguments:
+  name -- client identification string
+  component -- connection identification string.  When one client opens
+    multiple connections, this can be used to identify each of them.
+  user -- user identification string (user name).  When multi-user
+    access is expected, this can be used to identify their connections.
+  address -- server address as specified in Speech Dispatcher
+    documentation (e.g. "unix:/run/user/joe/speech-dispatcher/speechd.sock"
+    or "inet:192.168.0.85:6561")
+  autospawn -- a flag to specify whether the library should
+    try to start the server if it determines its not already
+    running or not

+Deprecated arguments:
+  method -- communication method to use, one of the constants defined in class
+    CommunicationMethod
+  socket_path -- for CommunicationMethod.UNIX_SOCKET, socket
+    path in filesystem. By default, this is $XDG_RUNTIME_DIR/speech-dispatcher/speechd.sock
+    where $XDG_RUNTIME_DIR is determined using the XDG Base Directory
+    Specification.
+  host -- for CommunicationMethod.INET_SOCKET, server hostname
+    or IP address as a string.  If None, the default value is
+    taken from SPEECHD_HOST environment variable (if it
+    exists) or from the DEFAULT_HOST attribute of this class.
+  port -- for CommunicationMethod.INET_SOCKET method, server
+    port as number or None.  If None, the default value is
+    taken from SPEECHD_PORT environment variable (if it
+    exists) or from the DEFAULT_PORT attribute of this class.

+For more information on client identification strings see Speech
+Dispatcher documentation.
+ +
block_begin(self)
Begin an SSIP block.

+See SSIP documentation for more details about blocks.
+ +
block_end(self)
Close an SSIP block.

+See SSIP documentation for more details about blocks.
+ +
cancel(self, scope='self')
Immediately stop speaking and discard messages in queues.

+Arguments:
+  scope -- see the documentation of this class.
+ +
char(self, char)
Say given character.

+Arguments:
+  char -- a character to be spoken.  Either a Python unicode string or
+    a UTF-8 encoded byte string.

+This method is non-blocking;  it just sends the command, given
+message is queued on the server and the method returns immediately.
+ +
close(self)
Close the connection to Speech Dispatcher.
+ +
get_language(self)
Get the current language.
+ +
get_output_module(self)
Get the current output module.
+ +
get_pitch(self)
Get the current pitch.
+ +
get_punctuation(self)
Get the punctuation pronunciation level.
+ +
get_rate(self)
Get the current speech rate (speed).
+ +
get_volume(self)
Get the speech volume.
+ +
key(self, key)
Say given key name.

+Arguments:
+  key -- the key name (as defined in SSIP); string.

+This method is non-blocking;  it just sends the command, given
+message is queued on the server and the method returns immediately.
+ +
list_output_modules(self)
Return names of all active output modules as a tuple of strings.
+ +
list_synthesis_voices(self, language=None, variant=None)
Return names of all available voices for the current output module.

+If language (possibly even variant) is set, only the list matching that
+language (possibly even variant) is returned.

+Returns a tuple of tripplets (name, language, variant).

+'name' is a string, 'language' is an ISO 639-1 Alpha-2/3 language code
+and 'variant' is a string.  Language and variant may be None.
+ +
pause(self, scope='self')
Pause speaking and postpone other messages until resume.

+This method is non-blocking.  However, speaking can continue for a
+short while even after it's called (typically to the end of the
+sentence).

+Arguments:
+  scope -- see the documentation of this class.
+ +
resume(self, scope='self')
Resume speaking of the currently paused messages.

+This method is non-blocking.  However, speaking can continue for a
+short while even after it's called (typically to the end of the
+sentence).

+Arguments:
+  scope -- see the documentation of this class.
+ +
set_cap_let_recogn(self, value, scope='self')
Set capital letter recognition mode.

+Arguments:
+  value -- one of 'none', 'spell', 'icon'. None means no signalization
+    of capital letters, 'spell' means capital letters will be spelled
+    with a synthetic voice and 'icon' means that the capital-letter icon
+    will be prepended before each capital letter.
+  scope -- see the documentation of this class.
+ +
set_data_mode(self, value)
Set the data mode for further speech commands.

+Arguments:
+  value - one of the constants defined by the DataMode class.
+ +
set_debug(self, val)
Switch debugging on and off. When switched on,
+debugging files will be created in the chosen destination
+(see set_debug_destination()) for Speech Dispatcher and all
+its running modules. All logging information will then be
+written into these files with maximal verbosity until switched
+off. You should always first call set_debug_destination.

+The intended use of this functionality is to switch debugging
+on for a period of time while the user will repeat the behavior
+and then send the logs to the appropriate bug-reporting place.

+Arguments:
+  val -- a boolean value determining whether debugging
+         is switched on or off
+  scope -- see the documentation of this class.
+ +
set_debug_destination(self, path)
Set debug destination.

+Arguments:
+  path -- path (string) to the directory where debugging
+          files will be created
+  scope -- see the documentation of this class.
+ +
set_language(self, language, scope='self')
Switch to a particular language for further speech commands.

+Arguments:
+  language -- two/three letter language code according to RFC 1766 as string, possibly with a region qualification.
+  scope -- see the documentation of this class.
+ +
set_output_module(self, name, scope='self')
Switch to a particular output module.

+Arguments:
+  name -- module (string) as returned by 'list_output_modules()'.
+  scope -- see the documentation of this class.
+ +
set_pause_context(self, value, scope='self')
Set the amount of context when resuming a paused message.

+Arguments:
+  value -- a positive or negative value meaning how many chunks of data
+    after or before the pause should be read when resume() is executed.
+  scope -- see the documentation of this class.
+ +
set_pitch(self, value, scope='self')
Set the pitch for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 0
+    corresponding to the default pitch of the current speech synthesis
+    output module, lower values meaning lower pitch and higher values
+    meaning higher pitch.
+  scope -- see the documentation of this class.
+ +
set_pitch_range(self, value, scope='self')
Set the pitch range for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 0
+    corresponding to the default pitch range of the current speech synthesis
+    output module, lower values meaning lower pitch range and higher values
+    meaning higher pitch range.
+  scope -- see the documentation of this class.
+ +
set_priority(self, priority)
Set the priority category for the following messages.

+Arguments:
+  priority -- one of the 'Priority' constants.
+ +
set_punctuation(self, value, scope='self')
Set the punctuation pronunciation level.

+Arguments:
+  value -- one of the 'PunctuationMode' constants.
+  scope -- see the documentation of this class.
+ +
set_rate(self, value, scope='self')
Set the speech rate (speed) for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 0
+    corresponding to the default speech rate of the current speech
+    synthesis output module, lower values meaning slower speech and
+    higher values meaning faster speech.
+  scope -- see the documentation of this class.
+ +
set_spelling(self, value, scope='self')
Toggle the spelling mode or on off.

+Arguments:
+  value -- if 'True', all incoming messages will be spelled
+    instead of being read as normal words. 'False' switches
+    this behavior off.
+  scope -- see the documentation of this class.
+ +
set_synthesis_voice(self, value, scope='self')
Set voice by its real name.

+Arguments:
+  value -- voice name as returned by 'list_synthesis_voices()'
+  scope -- see the documentation of this class.
+ +
set_voice(self, value, scope='self')
Set voice by a symbolic name.

+Arguments:
+  value -- one of the SSIP symbolic voice names: 'MALE1' .. 'MALE3',
+    'FEMALE1' ... 'FEMALE3', 'CHILD_MALE', 'CHILD_FEMALE'
+  scope -- see the documentation of this class.

+Symbolic voice names are mapped to real synthesizer voices in the
+configuration of the output module.  Use the method
+'set_synthesis_voice()' if you want to work with real voices.
+ +
set_volume(self, value, scope='self')
Set the speech volume for further speech commands.

+Arguments:
+  value -- integer value within the range from -100 to 100, with 100
+    corresponding to the default speech volume of the current speech
+    synthesis output module, lower values meaning softer speech.
+  scope -- see the documentation of this class.
+ +
sound_icon(self, sound_icon)
Output given sound_icon.

+Arguments:
+  sound_icon -- the name of the sound icon as defined by SSIP; string.

+This method is non-blocking; it just sends the command, given message
+is queued on the server and the method returns immediately.
+ +
speak(self, text, callback=None, event_types=None)
Say given message.

+Arguments:
+  text -- message text to be spoken.  This may be either a UTF-8
+    encoded byte string or a Python unicode string.
+  callback -- a callback handler for asynchronous event notifications.
+    A callable object (function) which accepts one positional argument
+    `type' and one keyword argument `index_mark'.  See below for more
+    details.
+  event_types -- a tuple of event types for which the callback should
+    be called.  Each item must be one of `CallbackType' constants.
+    None (the default value) means to handle all event types.  This
+    argument is irrelevant when `callback' is not used.

+The callback function will be called whenever one of the events occurs.
+The event type will be passed as argument.  Its value is one of the
+`CallbackType' constants.  In case of an index mark event, additional
+keyword argument `index_mark' will be passed and will contain the index
+mark identifier as specified within the text.

+The callback function should not perform anything complicated and is
+not allowed to issue any further SSIP client commands.  An attempt to
+do so would lead to a deadlock in SSIP communication.

+This method is non-blocking;  it just sends the command, given
+message is queued on the server and the method returns immediately.
+ +
stop(self, scope='self')
Immediately stop speaking the currently spoken message.

+Arguments:
+  scope -- see the documentation of this class.
+ +
+Data descriptors inherited from SSIPClient:
+
__dict__
+
dictionary for instance variables
+
+
__weakref__
+
list of weak references to the object
+
+
+Data and other attributes inherited from SSIPClient:
+
DEFAULT_HOST = '127.0.0.1'
+ +
DEFAULT_PORT = 6560
+ +
DEFAULT_SOCKET_PATH = 'speech-dispatcher/speechd.sock'
+ +
+ \ No newline at end of file diff --git a/doc/speechd.html b/doc/speechd.html new file mode 100644 index 00000000..6b65e8c7 --- /dev/null +++ b/doc/speechd.html @@ -0,0 +1,37 @@ + + + + +Python: package speechd + + + + + +
 
speechd
index
/home/samy/ens/projet/1/speech/speech-dispatcher-git/src/api/python/speechd/__init__.py
+

Python API to Speech Dispatcher

+This is the Python client API to Speech Dispatcher.

+Two main classes are provided:

+- speechd.client.SSIPClient : direct mapping of the SSIP commands and logic
+- speechd.client.Speaker : a more convenient interface.

+You can use

+pydoc3 speechd.client.SSIPClient
+pydoc3 speechd.client.Speaker

+to get their documentation.

+

+ + + + + +
 
Package Contents
       
_test
+
client
+
paths
+
+ \ No newline at end of file