Changeset 2351
- Timestamp:
- 08/19/08 12:17:15 (3 months ago)
- Location:
- trunk/source
- Files:
-
- 2 modified
-
api.py (modified) (1 diff)
-
speechDictHandler.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/api.py
r2314 r2351 268 268 text = "" 269 269 return text + " ".join(chunk for child in obj.children for chunk in (child.name, child.value) if chunk and isinstance(chunk, basestring) and not chunk.isspace()) 270 271 def validateFile(name): 272 """Replaces invalid characters in a given string to make a windows compatible filename. 273 @returns: A string holding altered name. 274 @rtype: string 275 @param name: text to makea file name of 276 @type text: string 277 """ 278 invalidChars=':?*\|<>/"' 279 for c in invalidChars: 280 name=name.replace(c,'_') 281 return name -
trunk/source/speechDictHandler.py
r2328 r2351 11 11 import codecs 12 12 import synthDriverHandler 13 import api 13 14 14 15 dictionaries = {} … … 91 92 elif type is "voice": 92 93 s=synthDriverHandler.getSynth() 93 return "%s/%s-%s.dic"%(speechDictsPath, s.name,s.getVoiceName(s.voice))94 return "%s/%s-%s.dic"%(speechDictsPath,api.validateFile(s.name),validateFile(s.getVoiceName(s.voice))) 94 95 return None 95 96

NVDA is supported by