Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
orca /
[ HOME SHELL ]
Name
Size
Permission
Action
backends
[ DIR ]
drwxr-xr-x
__pycache__
[ DIR ]
drwxr-xr-x
scripts
[ DIR ]
drwxr-xr-x
acss.py
3.49
KB
-rw-r--r--
bookmarks.py
8.37
KB
-rw-r--r--
braille_generator.py
21
KB
-rw-r--r--
braille.py
70.54
KB
-rw-r--r--
braille_rolenames.py
10.33
KB
-rw-r--r--
brlmon.py
6.45
KB
-rw-r--r--
brltablenames.py
7.3
KB
-rw-r--r--
caret_navigation.py
13.66
KB
-rw-r--r--
chat.py
33.71
KB
-rw-r--r--
chnames.py
23.03
KB
-rw-r--r--
cmdnames.py
55.23
KB
-rw-r--r--
colornames.py
38.13
KB
-rw-r--r--
common_keyboardmap.py
6.64
KB
-rw-r--r--
debug.py
17.79
KB
-rw-r--r--
desktop_keyboardmap.py
4.62
KB
-rw-r--r--
event_manager.py
41.45
KB
-rw-r--r--
eventsynthesizer.py
18.13
KB
-rw-r--r--
find.py
12.77
KB
-rw-r--r--
flat_review.py
48.16
KB
-rw-r--r--
formatting.py
55.22
KB
-rw-r--r--
generator.py
60.81
KB
-rw-r--r--
guilabels.py
46.35
KB
-rw-r--r--
__init__.py
115
B
-rw-r--r--
input_event.py
40.29
KB
-rw-r--r--
keybindings.py
17.82
KB
-rw-r--r--
keynames.py
9.71
KB
-rw-r--r--
label_inference.py
21.29
KB
-rw-r--r--
laptop_keyboardmap.py
4.61
KB
-rw-r--r--
liveregions.py
21.77
KB
-rw-r--r--
logger.py
1.97
KB
-rw-r--r--
mathsymbols.py
88.14
KB
-rw-r--r--
messages.py
141.35
KB
-rw-r--r--
mouse_review.py
21.57
KB
-rw-r--r--
notification_messages.py
6.18
KB
-rw-r--r--
object_properties.py
33.38
KB
-rw-r--r--
orca_gtkbuilder.py
5.35
KB
-rw-r--r--
orca_gui_commandlist.py
4.19
KB
-rw-r--r--
orca_gui_find.py
8.12
KB
-rw-r--r--
orca_gui_navlist.py
6.66
KB
-rw-r--r--
orca_gui_prefs.py
139.1
KB
-rw-r--r--
orca_gui_profile.py
4.06
KB
-rw-r--r--
orca_i18n.py
3.18
KB
-rw-r--r--
orca_platform.py
1.44
KB
-rw-r--r--
orca.py
27.86
KB
-rw-r--r--
orca_state.py
2.4
KB
-rw-r--r--
phonnames.py
2.76
KB
-rw-r--r--
pronunciation_dict.py
2.61
KB
-rw-r--r--
punctuation_settings.py
13.64
KB
-rw-r--r--
script_manager.py
14.37
KB
-rw-r--r--
script.py
19.04
KB
-rw-r--r--
script_utilities.py
201.5
KB
-rw-r--r--
settings_manager.py
24.55
KB
-rw-r--r--
settings.py
12.88
KB
-rw-r--r--
sound_generator.py
11.99
KB
-rw-r--r--
sound.py
5.47
KB
-rw-r--r--
speechdispatcherfactory.py
26.19
KB
-rw-r--r--
speech_generator.py
113.82
KB
-rw-r--r--
speech.py
10.22
KB
-rw-r--r--
speechserver.py
6.92
KB
-rw-r--r--
spellcheck.py
10.07
KB
-rw-r--r--
structural_navigation.py
124.25
KB
-rw-r--r--
text_attribute_names.py
28.62
KB
-rw-r--r--
tutorialgenerator.py
30.41
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : speech.py
# Orca # # Copyright 2004-2009 Sun Microsystems Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., Franklin Street, Fifth Floor, # Boston MA 02110-1301 USA. """Manages the default speech server for orca. A script can use this as its speech server, or it can feel free to create one of its own.""" __id__ = "$Id$" __version__ = "$Revision$" __date__ = "$Date$" __copyright__ = "Copyright (c) 2005-2009 Sun Microsystems Inc." __license__ = "LGPL" import importlib import time from . import debug from . import logger from . import orca_state from . import settings from . import speech_generator from .speechserver import VoiceFamily from .acss import ACSS _logger = logger.getLogger() log = _logger.newLog("speech") # The speech server to use for all speech operations. # _speechserver = None # The last time something was spoken. _timestamp = 0 def _initSpeechServer(moduleName, speechServerInfo): global _speechserver if not moduleName: return factory = None try: factory = importlib.import_module('orca.%s' % moduleName) except: try: factory = importlib.import_module(moduleName) except: debug.printException(debug.LEVEL_SEVERE) # Now, get the speech server we care about. # speechServerInfo = settings.speechServerInfo if speechServerInfo: _speechserver = factory.SpeechServer.getSpeechServer(speechServerInfo) if not _speechserver: _speechserver = factory.SpeechServer.getSpeechServer() if speechServerInfo: msg = 'SPEECH: Invalid speechServerInfo: %s' % speechServerInfo debug.println(debug.LEVEL_INFO, msg, True) if not _speechserver: raise Exception("ERROR: No speech server for factory: %s" % moduleName) def init(): debug.println(debug.LEVEL_INFO, 'SPEECH: Initializing', True) if _speechserver: debug.println(debug.LEVEL_INFO, 'SPEECH: Already initialized', True) return try: moduleName = settings.speechServerFactory _initSpeechServer(moduleName, settings.speechServerInfo) except: moduleNames = settings.speechFactoryModules for moduleName in moduleNames: if moduleName != settings.speechServerFactory: try: _initSpeechServer(moduleName, None) if _speechserver: break except: debug.printException(debug.LEVEL_SEVERE) if _speechserver: msg = 'SPEECH: Using speech server factory: %s' % moduleName debug.println(debug.LEVEL_INFO, msg, True) else: msg = 'SPEECH: Not available' debug.println(debug.LEVEL_INFO, msg, True) debug.println(debug.LEVEL_INFO, 'SPEECH: Initialized', True) def checkSpeechSetting(): msg = "SPEECH: Checking speech setting." debug.println(debug.LEVEL_INFO, msg, True) if not settings.enableSpeech: shutdown() else: init() def __resolveACSS(acss=None): if isinstance(acss, ACSS): family = acss.get(acss.FAMILY) try: family = VoiceFamily(family) except: family = VoiceFamily({}) acss[acss.FAMILY] = family return acss elif isinstance(acss, list) and len(acss) == 1: return ACSS(acss[0]) elif isinstance(acss, dict): return ACSS(acss) else: voices = settings.voices return ACSS(voices[settings.DEFAULT_VOICE]) def sayAll(utteranceIterator, progressCallback): if settings.silenceSpeech: return if _speechserver: _speechserver.sayAll(utteranceIterator, progressCallback) else: for [context, acss] in utteranceIterator: logLine = "SPEECH OUTPUT: '" + context.utterance + "'" debug.println(debug.LEVEL_INFO, logLine, True) log.info(logLine) def _speak(text, acss, interrupt): """Speaks the individual string using the given ACSS.""" logLine = "SPEECH OUTPUT: '" + text + "'" extraDebug = "" if acss in list(settings.voices.values()): for key in settings.voices: if acss == settings.voices[key]: if key != settings.DEFAULT_VOICE: extraDebug = " voice=%s" % key break debug.println(debug.LEVEL_INFO, logLine + extraDebug + str(acss), True) log.info(logLine + extraDebug) if _speechserver: voice = ACSS(settings.voices.get(settings.DEFAULT_VOICE)) try: voice.update(__resolveACSS(acss)) except: pass _speechserver.speak(text, __resolveACSS(voice), interrupt) def speak(content, acss=None, interrupt=True): """Speaks the given content. The content can be either a simple string or an array of arrays of objects returned by a speech generator.""" if settings.silenceSpeech: return validTypes = (str, list, speech_generator.Pause, speech_generator.LineBreak, ACSS) error = "SPEECH: bad content sent to speak(): '%s'" if not isinstance(content, validTypes): debug.printStack(debug.LEVEL_WARNING) debug.println(debug.LEVEL_WARNING, error % content, True) return global _timestamp if _timestamp: msg = "SPEECH: Last spoke %.4f seconds ago" % (time.time() - _timestamp) debug.println(debug.LEVEL_INFO, msg, True) _timestamp = time.time() if isinstance(content, str): _speak(content, acss, interrupt) if not isinstance(content, list): return toSpeak = [] activeVoice = ACSS(acss) for element in content: if not isinstance(element, validTypes): debug.println(debug.LEVEL_WARNING, error % element, True) elif isinstance(element, list): speak(element, acss, interrupt) elif isinstance(element, str): if len(element): toSpeak.append(element) elif toSpeak: newVoice = ACSS(acss) newItemsToSpeak = [] if isinstance(element, speech_generator.Pause): if toSpeak[-1] and toSpeak[-1][-1].isalnum(): toSpeak[-1] += '.' elif isinstance(element, ACSS): newVoice.update(element) if newVoice == activeVoice: continue newItemsToSpeak.append(toSpeak.pop()) if toSpeak: string = " ".join(toSpeak) _speak(string, activeVoice, interrupt) activeVoice = newVoice toSpeak = newItemsToSpeak if toSpeak: string = " ".join(toSpeak) _speak(string, activeVoice, interrupt) def speakKeyEvent(event, acss=None): """Speaks a key event immediately. Arguments: - event: input_event.KeyboardEvent to speak. """ if settings.silenceSpeech: return keyname = event.getKeyName() lockingStateString = event.getLockingStateString() acss = __resolveACSS(acss) msg = "%s %s" % (keyname, lockingStateString) logLine = "SPEECH OUTPUT: '%s' %s" % (msg, acss) debug.println(debug.LEVEL_INFO, logLine, True) log.info(logLine) if _speechserver: _speechserver.speakKeyEvent(event, acss) def speakCharacter(character, acss=None): """Speaks a single character immediately. Arguments: - character: text to be spoken - acss: acss.ACSS instance; if None, the default voice settings will be used. Otherwise, the acss settings will be used to augment/override the default voice settings. """ if settings.silenceSpeech: return acss = __resolveACSS(acss) msg = "SPEECH OUTPUT: '" + character + "' " + str(acss) debug.println(debug.LEVEL_INFO, msg, True) log.info("SPEECH OUTPUT: '%s'" % character) if _speechserver: _speechserver.speakCharacter(character, acss=acss) def getInfo(): info = None if _speechserver: info = _speechserver.getInfo() return info def stop(): if _speechserver: _speechserver.stop() def updateCapitalizationStyle(script=None, inputEvent=None): if _speechserver: _speechserver.updateCapitalizationStyle() return True def updatePunctuationLevel(script=None, inputEvent=None): """ Punctuation level changed, inform this speechServer. """ if _speechserver: _speechserver.updatePunctuationLevel() return True def increaseSpeechRate(script=None, inputEvent=None): if _speechserver: _speechserver.increaseSpeechRate() return True def decreaseSpeechRate(script=None, inputEvent=None): if _speechserver: _speechserver.decreaseSpeechRate() else: logLine = "SPEECH OUTPUT: 'slower'" debug.println(debug.LEVEL_INFO, logLine) log.info(logLine) return True def increaseSpeechPitch(script=None, inputEvent=None): if _speechserver: _speechserver.increaseSpeechPitch() return True def decreaseSpeechPitch(script=None, inputEvent=None): if _speechserver: _speechserver.decreaseSpeechPitch() return True def increaseSpeechVolume(script=None, inputEvent=None): if _speechserver: _speechserver.increaseSpeechVolume() return True def decreaseSpeechVolume(script=None, inputEvent=None): if _speechserver: _speechserver.decreaseSpeechVolume() return True def shutdown(): debug.println(debug.LEVEL_INFO, 'SPEECH: Shutting down', True) global _speechserver if _speechserver: _speechserver.shutdownActiveServers() _speechserver = None def reset(text=None, acss=None): if _speechserver: _speechserver.reset(text, acss)
Close