diff --git a/config/settings/settings.conf b/config/settings/settings.conf index ccaa2813..be7b6058 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -5,13 +5,13 @@ theme=default [speech] enabled=True -driver=espeak -rate=800 +driver=speechd +rate=50 +volume=100 pitch=50 module=espeak -voice=en-us -language=en-us -volume=200 +voice=de +language=de [braille] enabled=False @@ -22,8 +22,8 @@ driver=linux [keyboard] keyboardLayout=desktop -charEcho=False -wordEcho=False +charEcho=True +wordEcho=True interruptOnKeyPress=False [general] diff --git a/src/fenrir-package/commands/onInput/10000-shut_up.py b/src/fenrir-package/commands/onInput/10000-shut_up.py index 6834699d..0ac09e49 100644 --- a/src/fenrir-package/commands/onInput/10000-shut_up.py +++ b/src/fenrir-package/commands/onInput/10000-shut_up.py @@ -5,7 +5,9 @@ class command(): pass def run(self, environment): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'interruptOnKeyPress'): - return environment + return environment + if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: + return environment # if environment['screenData']['newCursor'] == environment['screenData']['oldCursor'] and\ # environment['screenData']['newDelta'] == environment['screenData']['oldDelta']: # return environment diff --git a/src/fenrir-package/commands/onScreenChanged/54000-read_char_if_cursor_change_horizontal.py b/src/fenrir-package/commands/onScreenChanged/54000-read_char_if_cursor_change_horizontal.py deleted file mode 100644 index 05890302..00000000 --- a/src/fenrir-package/commands/onScreenChanged/54000-read_char_if_cursor_change_horizontal.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/python -import time -class command(): - def __init__(self): - pass - def run(self, environment): - - if environment['screenData']['newDelta'] != environment['screenData']['oldDelta']: - return environment - if environment['screenData']['newCursor']['y'] != environment['screenData']['oldCursor']['y'] or\ - environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x']: - return environment - if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']].strip(" \t\n") == '': - pass - #environment['runtime']['outputManager'].presentText(environment, "blank",True) - else: - environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']],interrupt=True) - - return environment - def setCallback(self, callback): - pass - def shutdown(self): - pass diff --git a/src/fenrir-package/commands/onScreenChanged/55000-read_line_if_cursor_change_vertical.py b/src/fenrir-package/commands/onScreenChanged/55000-read_line_if_cursor_change_vertical.py deleted file mode 100644 index 9d7a4536..00000000 --- a/src/fenrir-package/commands/onScreenChanged/55000-read_line_if_cursor_change_vertical.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/python - -class command(): - def __init__(self): - pass - def run(self, environment): - - if environment['screenData']['newDelta'] != environment['screenData']['oldDelta']: - return environment - if environment['screenData']['newCursor']['y'] == environment['screenData']['oldCursor']['y']: - return environment - if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']].strip(" \t\n") == '': - environment['runtime']['outputManager'].presentText(environment, "blank", soundIconName='EmptyLine', interrupt=True) - else: - environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']], True) - return environment - def setCallback(self, callback): - pass - def shutdown(self): - pass diff --git a/src/fenrir-package/commands/onScreenChanged/69000-speak_word_echo.py b/src/fenrir-package/commands/onScreenChanged/69000-speak_word_echo.py index af124c32..045e8340 100644 --- a/src/fenrir-package/commands/onScreenChanged/69000-speak_word_echo.py +++ b/src/fenrir-package/commands/onScreenChanged/69000-speak_word_echo.py @@ -5,20 +5,23 @@ class command(): def __init__(self): pass def run(self, environment): - return environment - if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'wordEcho') and\ - environment['screenData']['newCursor']['x'] <= environment['screenData']['oldCursor']['x']: + #return environment + if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'wordEcho'): + return environment + + if environment['screenData']['newCursor']['x'] <= environment['screenData']['oldCursor']['x']: return environment - #if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: - # return environment - #print('drin') - if environment['screenData']['newDelta'] == environment['screenData']['oldDelta']: + if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: + return environment + + if environment['screenData']['newDelta'] == environment['screenData']['oldDelta'] and \ + environment['screenData']['newNegativeDelta'] == '': return environment newContent = environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']] x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursor']['x'], 0, newContent) - print(len(currWord) + x + 2, environment['screenData']['newCursor']['x'],'|',newContent[environment['screenData']['newCursor']['x'] - 1],'|',x, y, currWord) + print('|',environment['screenData']['newNegativeDelta'] ,'|',len(currWord) + x + 2, environment['screenData']['newCursor']['x'],'|',newContent[environment['screenData']['newCursor']['x'] - 1],'|',x, y, currWord) print(newContent ) #len(currWord) + x + 2 == environment['screenData']['newCursor']['x']: if environment['screenData']['newCursor']['x'] > 0 and \ diff --git a/src/fenrir-package/sound/gstreamer.py b/src/fenrir-package/sound/gstreamer.py index 9e0cd93b..f6906bb5 100644 --- a/src/fenrir-package/sound/gstreamer.py +++ b/src/fenrir-package/sound/gstreamer.py @@ -27,7 +27,7 @@ class sound: self._player.set_state(Gst.State.NULL) error, info = message.parse_error() print(error, info) - print('drin') + print('_onPlayerMessage') def _onPipelineMessage(self, bus, message): if message.type == Gst.MessageType.EOS: self._pipeline.set_state(Gst.State.NULL) @@ -35,7 +35,7 @@ class sound: self._pipeline.set_state(Gst.State.NULL) error, info = message.parse_error() print(error, info) - print('drin') + print('_onPipelineMessage') def _onTimeout(self, element): element.set_state(Gst.State.NULL) @@ -46,7 +46,7 @@ class sound: self.cancel() self._player.set_property('uri', 'file://%s' % fileName) self._player.set_state(Gst.State.PLAYING) - + print('playSoundFile') def playFrequence(self, frequence, duration, adjustVolume, interrupt=True): if interrupt: self.cancel()