Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/espeak_cmd.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2010-10-01 18:42:45 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2010-10-01 18:42:45 (GMT)
commit683877910d9194253dc6f46fe0021f038e92578b (patch)
treeda028c6adef3dd193c0599a980cb68a39c0b64eb /espeak_cmd.py
parenta95fbe84fe7e58b3c01cc3d6fd7fa0d5cc67d6a1 (diff)
Use the same default rate in espeak command mode like in gst mode #2182
Diffstat (limited to 'espeak_cmd.py')
-rw-r--r--espeak_cmd.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/espeak_cmd.py b/espeak_cmd.py
index 8f7bb9f..48a27a0 100644
--- a/espeak_cmd.py
+++ b/espeak_cmd.py
@@ -24,15 +24,13 @@ import espeak
PITCH_MAX = 99
RATE_MAX = 99
-PITCH_DEFAULT = PITCH_MAX/2
-RATE_DEFAULT = RATE_MAX/3
class AudioGrabCmd(espeak.BaseAudioGrab):
def speak(self, status, text):
self.make_pipeline('filesrc name=file-source')
- # espeak uses 80 to 370
- rate = 80 + (370-80) * int(status.rate) / 100
+ # 175 is default value, min is 80
+ rate = 80 + int(((175 - 80) * 2) * status.rate / RATE_MAX)
wavpath = "/tmp/speak.wav"
subprocess.call(["espeak", "-w", wavpath, "-p", str(status.pitch),