1 """ACSS --- Aural CSS.
2
3 Class ACSS defines a simple wrapper for holding ACSS voice
4 definitions. Speech engines implement the code for converting
5 ACSS definitions into engine-specific markup codes.
6
7 """
8
9 __id__ = "$Id: acss.py 3535 2005-11-17 14:32:59Z raman $"
10 __author__ = "$Author: raman $"
11 __version__ = "$Revision: 3535 $"
12 __date__ = "$Date: 2005-11-17 06:32:59 -0800 (Thu, 17 Nov 2005) $"
13 __copyright__ = "Copyright (c) 2005 T. V. Raman"
14 __license__ = "LGPL"
15
17
18 """Holds ACSS representation of a voice."""
19
20 settings = {
21 'family' : None,
22 'rate' : 50,
23 'gain' : 5,
24 'average-pitch' : 5,
25 'pitch-range' : 5,
26 'stress' : 5,
27 'richness' : 5,
28 'punctuations' : 'all'
29 }
30
32 """Create and initialize ACSS structure."""
33 for k in props:
34 if k in ACSS.settings: self[k] = props[k]
35 self.updateName()
36
41
46
48 """Update name based on settings."""
49 _name='acss-'
50 names = self.keys()
51 if names:
52 names.sort()
53 for k in names:
54 _name += "%s-%s:" % (k, self[k])
55 self._name = _name[:-1]
56
57 - def name(self): return self._name
58