Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/face.py
diff options
context:
space:
mode:
authorflavio <fdanesse@gmail.com>2012-07-31 13:10:22 (GMT)
committer flavio <fdanesse@gmail.com>2012-07-31 13:10:22 (GMT)
commit777d75ee9daedc65e37f4b15e924feb2f6b6dcb6 (patch)
tree6676aa86b792fb00edd42303fcdd24c34a906063 /face.py
parent3e5ee5c748d751ff1a3ffc346389bd1c454aebea (diff)
Modularization of the mouth
Diffstat (limited to 'face.py')
-rw-r--r--face.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/face.py b/face.py
index 9768157..7dd0498 100644
--- a/face.py
+++ b/face.py
@@ -32,10 +32,10 @@ import sugar3.graphics.style as style
import espeak
import eye
import glasses
-import mouth
+from mouth import Mouth
+from mouth import FFTMouth
+from mouth import WaveformMouth
import voice
-import fft_mouth
-import waveform_mouth
logger = logging.getLogger('speak')
@@ -49,14 +49,14 @@ class Status():
self.rate = espeak.RATE_MAX / 2
self.eyes = [eye.Eye] * 2
- self.mouth = mouth.Mouth
+ self.mouth = Mouth
def serialize(self):
eyes = {eye.Eye: 1, glasses.Glasses: 2}
- mouths = {mouth.Mouth: 1,
- fft_mouth.FFTMouth: 2,
- waveform_mouth.WaveformMouth: 3}
+ mouths = {Mouth: 1,
+ FFTMouth: 2,
+ WaveformMouth: 3}
return cjson.encode({
'voice': {'language': self.voice.language,
@@ -69,9 +69,9 @@ class Status():
def deserialize(self, buf):
eyes = {1: eye.Eye, 2: glasses.Glasses}
- mouths = {1: mouth.Mouth,
- 2: fft_mouth.FFTMouth,
- 3: waveform_mouth.WaveformMouth}
+ mouths = {1: Mouth,
+ 2: FFTMouth,
+ 3: WaveformMouth}
data = cjson.decode(buf)
self.voice = voice.Voice(data['voice']['language'],