403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/orca/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/orca/speech.pyc
Ñò
z#ÝJc@sìdZdZdZdZdZdZddkZeidƒZddk	Z	ddk
Z
ddkZddkZddk
Z
ddkZddkZddkZddkZddkZdd	klZdd
klZdae	idƒZe	idƒZe	id
ƒZd„Zd„Zdd„Zd„Z d„Z!de"d„Z#d„Z$dd„Z%d„Z&d„Z'd„Z(ddd„Z)ddd„Z*ddd„Z+ddd„Z,d„Z-ddd„Z.d„Z/d „Z0d!„Z1dS("s†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.s$Id$s
$Revision$s$Date$s-Copyright (c) 2005-2009 Sun Microsystems Inc.tLGPLiÿÿÿÿNtspeech(tACSS(t_s([a-z]+)([A-Z])s([A-Z][A-Z]+)([A-Z][a-z]+)s([A-Z])([A-Z][a-z]+)c	Csmg}ti}xW|D]O}y/t|tƒtƒdgƒ}|i|ƒWqtitiƒqXqW|S(sÀImports all known SpeechServer factory modules.  Returns a list
    of modules that implement the getSpeechServers method, which
    returns a list of speechserver.SpeechServer instances.
    t(	tsettingstspeechFactoryModulest
__import__tglobalstlocalstappendtdebugtprintExceptiont	LEVEL_OFF(t	factoriestmoduleNamest
moduleNametmodule((s//usr/lib/python2.6/site-packages/orca/speech.pytgetSpeechServerFactories9s	cCs
todSti}|otitid|ƒntitidƒdSd}y"t|tƒt	ƒdgƒ}WnXy7|i
dddƒ}t|tƒt	ƒdgƒ}WqÑtitiƒqÑXnXti
}|o|ii|ƒan|iiƒadS(NsUsing speech server factory: %ssSpeech not available.Rsorca.i(t
_speechserverRtspeechServerFactoryRtprintlntLEVEL_CONFIGURATIONtNoneRRR	treplaceRtLEVEL_SEVEREtspeechServerInfotSpeechServertgetSpeechServer(RtfactoryR((s//usr/lib/python2.6/site-packages/orca/speech.pytinitNs8		cCs$|o|Sti}|tiSdS(N(Rtvoicest
DEFAULT_VOICE(tacssR((s//usr/lib/python2.6/site-packages/orca/speech.pyt
__resolveACSS|s	cCsvtiodStoti||ƒnIxE|D]=\}}d|id}titi|ƒti	|ƒq1WdS(NsSPEECH OUTPUT: 't'(
Rt
silenceSpeechRtsayAllt	utteranceRRt
LEVEL_INFOtlogtinfo(tutteranceIteratortprogressCallbacktcontextR!tlogLine((s//usr/lib/python2.6/site-packages/orca/speech.pyR%ƒs
cCs'tiot|ƒ}ntio tiotii|ƒ}ntiot|ƒ}nd|d}d}|tiiƒjoOxLtiD]=}|ti|jo#|ti	jod|}nPq’q’Wnt
it
i||ƒt
i||ƒtoti|t|ƒ|ƒndS(s2Speaks the individual string using the given ACSS.sSPEECH OUTPUT: 'R#Rs	 voice=%sN(RtspeakMultiCaseStringsAsWordst_processMultiCaseStringt
orca_statetactiveScripttusePronunciationDictionarytadjustForPronunciationRtvaluesR RRR'R(R)RtspeakR"(ttextR!t	interruptR-t
extraDebugtkey((s//usr/lib/python2.6/site-packages/orca/speech.pyt_speakŽs&



cCsªtio$|otiƒtidj}ntiodSd}t|tƒo
|}n/t|tƒo°x|D]¡}t|tƒo#|o|d|7}q|}qtt|t	i
ƒoR|oG|ddjo|d7}ntiot|||ƒd}qqqtt|t	i
ƒo%|ot|||ƒd}qqtt|tiƒo/|ot|||ƒd}n|iƒqt|ot|||ƒnd}t|tƒot|||ƒqtt|tƒot|ƒ}|i|ƒqttitid|ƒqtWnot|tiƒo|iƒnNt|t	i
t	i
fƒon.titiƒtitidt|ƒƒ|ot|||ƒndS(sSpeaks the given content.  The content can be either a simple
    string or an array of arrays of objects returned by a speech
    generator.gà?Nt iÿÿÿÿt.sUNKNOWN speech element: '%s's&bad content sent to speech.speak: '%s'(R0tlastKeyEchoTimettimeRR$Rt
isinstancet
basestringtlisttspeech_generatortPausetenablePauseBreaksR:t	LineBreaktsoundtSoundtplayR5RtupdateRRt
LEVEL_WARNINGt
printStacktrepr(tcontentR!R7t	subStringtelement((s//usr/lib/python2.6/site-packages/orca/speech.pyR5§sf





cCsÁtiodStoti||ƒn”ti|ƒ}|tiijo|dt	dƒ7}n,|tii
jo|dt	dƒ7}nd|d}titi
|ƒti|ƒdS(sòSpeaks a key event immediately.

    Arguments:
    - event_string: string representing the key event as defined by
                    input_event.KeyboardEvent.
    - eventType:    key event type as one of orca.KeyEventType constants.

    NR;tontoffsSPEECH OUTPUT: 'R#(RR$Rt
speakKeyEventtkeynamest
getKeyNametorcatKeyEventTypetLOCKING_LOCKEDRtLOCKING_UNLOCKEDRRR'R(R)(tevent_stringt	eventTypeR-((s//usr/lib/python2.6/site-packages/orca/speech.pyRRès	
cCsltiodSti|ƒ}titid|dƒtid|ƒt	ot	i
|d|ƒndS(sSSpeaks 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.
    NsSPEECH OUTPUT: 'R#sSPEECH OUTPUT: '%s'R!(RR$tchnamestgetCharacterNameRRR'R(R)RtspeakCharacter(t	characterR!tspokenCharacter((s//usr/lib/python2.6/site-packages/orca/speech.pyR]s
cCstotiƒStSdS(s1Returns True if the system is currently speaking.N(Rt
isSpeakingtFalse(((s//usr/lib/python2.6/site-packages/orca/speech.pyR` scCs!d}totiƒ}n|S(N(RRtgetInfo(R)((s//usr/lib/python2.6/site-packages/orca/speech.pyRb'scCstotiƒndS(N(Rtstop(((s//usr/lib/python2.6/site-packages/orca/speech.pyRc.scCs?totiƒn'd}titi|ƒti|ƒtS(NsSPEECH OUTPUT: 'faster'(RtincreaseSpeechRateRRR'R(R)tTrue(tscriptt
inputEventR-((s//usr/lib/python2.6/site-packages/orca/speech.pyRd2s
cCs?totiƒn'd}titi|ƒti|ƒtS(NsSPEECH OUTPUT: 'slower'(RtdecreaseSpeechRateRRR'R(R)Re(RfRgR-((s//usr/lib/python2.6/site-packages/orca/speech.pyRh<s
cCs?totiƒn'd}titi|ƒti|ƒtS(NsSPEECH OUTPUT: 'higher'(RtincreaseSpeechPitchRRR'R(R)Re(RfRgR-((s//usr/lib/python2.6/site-packages/orca/speech.pyRiFs
cCs?totiƒn'd}titi|ƒti|ƒtS(NsSPEECH OUTPUT: 'lower'(RtdecreaseSpeechPitchRRR'R(R)Re(RfRgR-((s//usr/lib/python2.6/site-packages/orca/speech.pyRjPs
cCstotiƒdandS(N(RtshutdownActiveServersR(((s//usr/lib/python2.6/site-packages/orca/speech.pytshutdownZs
cCstoti||ƒndS(N(Rtreset(R6R!((s//usr/lib/python2.6/site-packages/orca/speech.pyRm`scCs¡tƒtdƒtdthdd6ƒƒtdthdd6ƒƒtdthd	d6ƒƒtd
thdd6ƒƒtd
thdd6ƒƒtdƒdS(Nttestingsthis is higheris
average-pitchsthis is sloweritratesthis is fasteriPs
this is quietitgainsthis is loudi
sthis is normal(RR5R(((s//usr/lib/python2.6/site-packages/orca/speech.pyttestNoSettingsInitds
cCsìddk}tƒ}xÐ|D]È}|iGH|iiƒ}x¨|D] }y€dG|iƒGHx`|iƒD]R}||ii}dG|GHt	h|t	i
6ƒ}|i||ƒ|idƒqeW|iƒWq@t
it
iƒq@Xq@WqWdS(Niÿÿÿÿs    s      Rn(tspeechserverRt__name__RtgetSpeechServersRbtgetVoiceFamiliestVoiceFamilytNAMERtFAMILYR5RlRRR
(RrRRtserverstservertfamilytnameR!((s//usr/lib/python2.6/site-packages/orca/speech.pyttestns(	
	cCs:tid|ƒ}tid|ƒ}tid|ƒ}|S(sZHelper function, applies the regexes to split multiCaseStrings
    to multiple words.
    s\1 \2(t
multiCaseReg1tsubt
multiCaseReg2t
multiCaseReg3(tstring((s//usr/lib/python2.6/site-packages/orca/speech.pyR/s(2t__doc__t__id__t__version__t__date__t
__copyright__t__license__tloggingt	getLoggerR(treR>R[RRSRUR0RRFRBR!Rt	orca_i18nRRRtcompileR~R€RRRR"R%R:ReR5RRR]R`RbRcRdRhRiRjRlRmRqR}R/(((s//usr/lib/python2.6/site-packages/orca/speech.pyt<module>sV		.		A	#			



		
	

Youez - 2016 - github.com/yon3zu
LinuXploit