Merge branch 'master' into event

This commit is contained in:
chrys 2017-05-07 20:00:50 +02:00
commit de7aedf102
2 changed files with 7 additions and 5 deletions

View File

@ -9,7 +9,8 @@ genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine
[speech] [speech]
enabled=True enabled=True
driver=speechdDriver #driver=speechdDriver
driver=genericDriver
rate=0.85 rate=0.85
pitch=0.5 pitch=0.5
# Pitch for capital letters # Pitch for capital letters
@ -40,6 +41,7 @@ fenrirMinPitch=0
fenrirMaxPitch=99 fenrirMaxPitch=99
fenrirMinRate=80 fenrirMinRate=80
fenrirMaxRate=450 fenrirMaxRate=450
fenrirVoice=en-us
[braille] [braille]
@ -97,7 +99,7 @@ interruptOnKeyPressFilter=
doubleTapTimeout=0.2 doubleTapTimeout=0.2
[general] [general]
debugLevel=0 debugLevel=1
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -148,14 +148,14 @@ class driver():
popenSpeechCommand = popenSpeechCommand.replace('fenrirPitch', str(utterance['pitch']).replace('"','')) popenSpeechCommand = popenSpeechCommand.replace('fenrirPitch', str(utterance['pitch']).replace('"',''))
popenSpeechCommand = popenSpeechCommand.replace('fenrirRate', str(utterance['rate']).replace('"','')) popenSpeechCommand = popenSpeechCommand.replace('fenrirRate', str(utterance['rate']).replace('"',''))
popenSpeechCommand = popenSpeechCommand.replace('fenrirText', str(utterance['text']).replace('"','').replace('\n','')) popenSpeechCommand = popenSpeechCommand.replace('fenrirText', str(utterance['text']).replace('"','').replace('\n',''))
try: try:
self.lock.acquire(True) self.lock.acquire(True)
self.proc = Popen(popenSpeechCommand, shell=True) self.proc = Popen(popenSpeechCommand, shell=True)
self.lock.release() self.lock.release()
self.proc.wait() # critical for MT? - if we lock it we deadlock it maybe. self.proc.wait()
except Exception as e: except Exception as e:
self.env['runtime']['debug'].writeDebugOut('speechDriver:worker:'str(e),debug.debugLevel.ERROR) self.env['runtime']['debug'].writeDebugOut('speechDriver:worker:' + str(e),debug.debugLevel.ERROR)
self.lock.acquire(True) self.lock.acquire(True)
self.proc = None self.proc = None
self.lock.release() self.lock.release()