chrys87 / fenrir

An TTY screenreader for Linux.
GNU Lesser General Public License v3.0
47 stars 13 forks source link

Fenrir in Raspbian #5

Closed manuelcortez closed 7 years ago

manuelcortez commented 7 years ago

Hi, I have been trying to use Fenrir in Raspbian.

I have changed in src/fenrir/fenrir:

!/bin/env

for

!/usr/bin/env

But when I try to run the application, I get the following:

... ANY INFO 2017-01-25 19:31:02.972524: Punctuation: EMOTICONDICT.;) :twinker ANY INFO 2017-01-25 19:31:02.972795: Punctuation: EMOTICONDICT.XD :loool ANY INFO 2017-01-25 19:31:02.973071: Punctuation: EMOTICONDICT.:D :lought ERROR 2017-01-25 19:31:02.973758: Loading inputDriver Driver : 'module' object has no attribute 'module_from_spec' Traceback (most recent call last): File "./fenrir", line 21, in main() File "./fenrir", line 16, in main app = fenrir.fenrir() File "/home/pi/code/fenrir/src/fenrir/fenrir.py", line 19, in init self.environment = settingsManager.settingsManager().initFenrirConfig() File "/home/pi/code/fenrir/src/fenrir/core/settingsManager.py", line 260, in initFenrirConfig environment['runtime']['inputManager'].initialize(environment) File "/home/pi/code/fenrir/src/fenrir/core/inputManager.py", line 19, in initialize self.env['input']['newNumLock'] = self.env['runtime']['inputDriver'].getLedState() AttributeError: 'NoneType' object has no attribute 'getLedState'

Do you have any idea about why this is happening?

manuelcortez commented 7 years ago

Update: I am using python 3.4, so I tried to use SourceFileLoader as stated in This Answer. After this, the program was being loaded and it shown something like:

ANY INFO 2017-01-25 20:21:16.971260: OrderedDict([('sound', OrderedDict([('enabled', 'False'), ('driver', 'generic'), ('theme', '/usr/share/sounds/fenrir/default'), ('volume', '1.0'), ('genericplayfilecommand', 'play -q -v fenrirVolume fenrirSoundFile'), ('genericfrequencycommand', 'play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence')])), ('speech', OrderedDict([('enabled', 'True'), ('driver', 'espeak'), ('rate', '0.65'), ('pitch', '0.5'), ('capitalpitch', '0.9'), ('volume', '1.0'), ('module', 'espeak'), ('voice', ''), ('language', 'english-us'), ('autoreadincoming', 'True')])), ('braille', OrderedDict([('enabled', 'False'), ('driver', 'brlapi'), ('layout', 'en')])), ('screen', OrderedDict([('driver', 'vcsa'), ('encoding', 'cp850'), ('screenupdatedelay', '0.05'), ('suspendingscreen', ''), ('autodetectsuspendingscreen', 'True')])), ('keyboard', OrderedDict([('driver', 'evdev'), ('device', 'ALL'), ('grabdevices', 'True'), ('ignoreshortcuts', 'False'), ('keyboardlayout', '/etc/fenrir/keyboard/desktop.conf'), ('charecho', 'False'), ('chardeleteecho', 'True'), ('wordecho', 'False'), ('interruptonkeypress', 'False'), ('interruptonkeypressfilter', ''), ('doubletaptimeout', '0.2')])), ('general', OrderedDict([('debuglevel', '1'), ('punctuationprofile', '/etc/fenrir/punctuation/default.conf'), ('punctuationlevel', 'some'), ('respectpunctuationpause', 'True'), ('newlinepause', 'True'), ('numberofclipboards', '10'), ('emoticons', 'True'), ('fenrirkeys', 'KEY_KP0,KEY_META,KEY_INSERT'), ('scriptkey', 'KEY_COMPOSE'), ('timeformat', '%H:%M:%P'), ('dateformat', '%A, %B %d, %Y'), ('autospellcheck', 'True'), ('spellchecklanguage', 'en_US'), ('scriptpath', '/usr/share/fenrir/scripts')])), ('focus', OrderedDict([('cursor', 'True'), ('highlight', 'False')])), ('review', OrderedDict([('linebreak', 'True'), ('endofscreen', 'True')])), ('promote', OrderedDict([('enabled', 'True'), ('inactivetimeoutsec', '120'), ('list', '')])), ('time', OrderedDict([('enabled', 'False'), ('presenttime', 'True'), ('presentdate', 'True'), ('delaysec', '0'), ('onminutes', '00,30'), ('announce', 'True'), ('interrupt', 'False')]))])

After this, nothing happened. The application was still taking the prompt so I couldn't do anything else. I've tried to use other console (I was connected via SSH and tried to use the keyboard connected to the pi), but the result was the same. I've tried both with the speechd and espeak drivers and of course as root.

chrys87 commented 7 years ago

Howdy, What python version is running on respian? Did you installed python-evdev? Did you run fenrir as root? Cheers chrys

manuelcortez commented 7 years ago

Hi,

Raspbian comes with python 3.4.2 and I have evdev installed, uinput loaded in the kernel, sox, python3-speechd, python3-espeak.

What should Fenrir do when started? should it say something or what would be the normal behaviour?

Thanks, Manuel.

chrys87 commented 7 years ago

Ah, sorry seems that you was faster than me with answering than i with asking lol.

I used python 3.5 to implement it.

Just to get sure that i understand you correctly. It talks but it does not react to the keyboard? If that is the case, does the keyboard react overall so can you type and it apears on the screen or does fenrir locking they keyboard already? Fenrir needs the most current python-evdev because i use some stuff that was just added (>version 0.6.4) Your output is not the complete start screen. Can you post me the complete output to se what fenrir does while starting?

Cheers chrys

chrys87 commented 7 years ago

Fenrir bells a soundicon on start.sox is used for that by default. The sound icons are provided as opus files. But the opus support in sox is relative new and debian is mostly a little behind. So i bet the sox version is to old. For that case i provide 2 solutions. 1. There is a gstreamer sound driver. For that you need gstreamer installed. Or 2. I provide the soundicons also as wav file for a period until any distro ships sox with opus. In that case you need to change thesound theme from default to default-wav (you find the soundicon themes in config/sound/*

You also can disable sound. In that case fenrir speaks the information like screenreader started.

Aorry for having that trouble. I developed it on arch that ships realy current software.

Me and my frinds can also give you support in real time on IRC. Server irc.netwirc.tk Room

a11y

I would be happy to patch it for your needs

Cheers chrys

chrys87 commented 7 years ago

Merged :). :+1: