Module characterProcessing :: Class SpeechSymbols
[hide private]
[frames] | no frames]

Class SpeechSymbols

source code

object --+
         |
        SpeechSymbols

Contains raw information about the pronunciation of symbols. It does not handle inheritance of data from other sources, processing of text, etc. This is all handled by SpeechSymbolProcessor.

Instance Methods [hide private]
 
__init__(self)
Constructor.
source code
 
load(self, fileName, allowComplexSymbols=True)
Load symbol information from a file.
source code
 
_loadComplexSymbol(self, line) source code
 
_loadSymbolField(self, input, inputMap=None) source code
 
_loadSymbol(self, line) source code
 
save(self, fileName=None)
Save symbol information to a file.
source code
 
_saveSymbolField(self, output, outputMap=None) source code
 
_saveSymbol(self, symbol) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  IDENTIFIER_ESCAPES_INPUT = {"0": "\0", "t": "\t", "n": "\n", "...
  IDENTIFIER_ESCAPES_OUTPUT = {v: k for k, v in IDENTIFIER_ESCAP...
  LEVEL_INPUT = {"none": SYMLVL_NONE, "some": SYMLVL_SOME, "most...
  LEVEL_OUTPUT = {v: k for k, v in LEVEL_INPUT.iteritems()}
  PRESERVE_INPUT = {"never": SYMPRES_NEVER, "always": SYMPRES_AL...
  PRESERVE_OUTPUT = {v: k for k, v in PRESERVE_INPUT.iteritems()}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor.

Overrides: object.__init__

load(self, fileName, allowComplexSymbols=True)

source code 

Load symbol information from a file.

Parameters:
  • fileName (str) - The name of the file from which to load symbol information.
  • allowComplexSymbols (bool) - Whether to allow complex symbols.
Raises:
  • IOError - If the file cannot be read.

save(self, fileName=None)

source code 

Save symbol information to a file.

Parameters:
  • fileName (str) - The name of the file to which to save symbol information, None to use the file name last passed to load or save.
Raises:
  • IOError - If the file cannot be written.
  • ValueError - If fileName is None and load or save has not been called.

Class Variable Details [hide private]

IDENTIFIER_ESCAPES_INPUT

Value:
{"0": "\0", "t": "\t", "n": "\n", "r": "\r", "f": "\f", "v": "\v", "#"\
: "#", "\\": "\\",}

IDENTIFIER_ESCAPES_OUTPUT

Value:
{v: k for k, v in IDENTIFIER_ESCAPES_INPUT.iteritems()}

LEVEL_INPUT

Value:
{"none": SYMLVL_NONE, "some": SYMLVL_SOME, "most": SYMLVL_MOST, "all":\
 SYMLVL_ALL, "char": SYMLVL_CHAR,}

PRESERVE_INPUT

Value:
{"never": SYMPRES_NEVER, "always": SYMPRES_ALWAYS, "norep": SYMPRES_NO\
REP,}