OSDN Git Service

JTalk: work around nvdajp 32590
authorTakuya Nishimoto <nishimotz@gmail.com>
Wed, 18 Dec 2013 12:56:01 +0000 (21:56 +0900)
committerTakuya Nishimoto <nishimotz@gmail.com>
Wed, 18 Dec 2013 12:56:01 +0000 (21:56 +0900)
source/synthDrivers/jtalk/_nvdajp_jtalk.py

index 2f379bc..b16bb2c 100644 (file)
@@ -272,18 +272,14 @@ def terminate():
        player = None
        _espeak.terminate()
 
+rate_percent = 50
+
 def get_rate(rateBoost):
-       f = fperiod
-       if not rateBoost:
-               f = fperiod / RATE_BOOST_MULTIPLIER
-       if voice_args['samp_rate'] == 16000:
-               return int(160 - 2 * f)
-       if voice_args['samp_rate'] == 48000:
-               return int((240 - f) / 1.5)
-       return 0
+       return rate_percent
 
 def set_rate(rate, rateBoost):
-       global fperiod
+       global fperiod, rate_percent
+       rate_percent = rate
        if voice_args['samp_rate'] == 16000:
                fperiod = int(80 - int(rate) / 2) # 80..30
        if voice_args['samp_rate'] == 48000: