~ubuntu-branches/ubuntu/hardy/gnome-orca/hardy

« back to all changes in this revision

Viewing changes to src/orca/speech.py

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2007-07-10 21:54:54 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20070710215454-trky3o11pcc78qg4
Tags: 2.19.5-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Orca
2
2
#
3
 
# Copyright 2004-2006 Sun Microsystems Inc.
 
3
# Copyright 2004-2007 Sun Microsystems Inc.
4
4
#
5
5
# This library is free software; you can redistribute it and/or
6
6
# modify it under the terms of the GNU Library General Public
20
20
"""Manages the default speech server for orca.  A script can use this
21
21
as its speech server, or it can feel free to create one of its own."""
22
22
 
23
 
__id__        = "$Id: speech.py 1973 2007-02-02 23:22:35Z wwalker $"
24
 
__version__   = "$Revision: 1973 $"
25
 
__date__      = "$Date: 2007-02-02 18:22:35 -0500 (Fri, 02 Feb 2007) $"
26
 
__copyright__ = "Copyright (c) 2005-2006 Sun Microsystems Inc."
 
23
__id__        = "$Id: speech.py 2528 2007-07-09 14:41:22Z wwalker $"
 
24
__version__   = "$Revision: 2528 $"
 
25
__date__      = "$Date: 2007-07-09 10:41:22 -0400 (Mon, 09 Jul 2007) $"
 
26
__copyright__ = "Copyright (c) 2005-2007 Sun Microsystems Inc."
27
27
__license__   = "LGPL"
28
28
 
29
29
import logging
153
153
    if _speechserver:
154
154
        _speechserver.speak(text, __resolveACSS(acss), interrupt)
155
155
 
 
156
def speakKeyEvent(event_string, type):
 
157
    """Speaks a key event immediately.
 
158
 
 
159
    Arguments:
 
160
    - event_string: string representing the key event as defined by
 
161
                    input_event.KeyboardEvent.
 
162
    - type:         key event type as one of orca.KeyEventType constants.
 
163
 
 
164
    """
 
165
    if settings.silenceSpeech:
 
166
        return
 
167
 
 
168
    if _speechserver:
 
169
        _speechserver.speakKeyEvent(event_string, type)
 
170
 
156
171
def isSpeaking():
157
172
    """"Returns True if the system is currently speaking."""
158
173
    if _speechserver: