Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include say in install instructions #25

Open
Huluk opened this issue Nov 14, 2023 · 5 comments · May be fixed by #26
Open

Include say in install instructions #25

Huluk opened this issue Nov 14, 2023 · 5 comments · May be fixed by #26

Comments

@Huluk
Copy link

Huluk commented Nov 14, 2023

I tried setting this up but it just gave me error messages because it didn't find "say". My installation doesn't have it, nor is it available via apt-get, and I don't know how to set up espeak and make it work with this plugin.

@MaxwellBo
Copy link
Owner

@lewisjb

@MaxwellBo
Copy link
Owner

Do you have espeak installed? It should support espeak out of the box.

@Huluk
Copy link
Author

Huluk commented Nov 15, 2023

Apologies, let me expand a bit – and thank you for the quick reply!

My first issue is with the documentation: it lists only python3 as requirements, and it took me a while that the other requirement is either using macOS or installing espeak. This could also be part of the actual speak calls btw, it should be sufficient to check for has('macunix') in vim on startup, or maybe better type say in shell to check if the command exists.

Second issue, when the setup is not correct (i.e. not on a mac and no espeak or espeak not enabled using g:use_espeak), I get an error message on every cursor move, which makes it very hard to do anything at all:

error caught in async handler: […]/vim/plugged/neoreader/rplugin/python3/neoreader:autocmd:CursorMoved:* []

Traceback (most recent call last):
  File "[…]/vim/plugged/neoreader/rplugin/python3/neoreader/plugin.py", line 89
[…]
  FileNotFoundError: [Errno 2] No such file or directory: 'say'

I was stuck here when I wrote the message – you link to espeak, but it's their github page and that one doesn't have any install instructions and itself only links to their Android related web site. When you mentioned that it should work out of the box now, I found out that in fact it's just in apt-get^^ So that's fine now. At least once I set "g:use_espeak", before that it also gave the error message above.

Now I get Could not find ':' in DISPLAY: 1, but that's almost certainly because of my machine – espeak on its own doesn't work either. The look of that error message is a bit jarring, it shifts the text under cursor and also replaces the line numbers. Unlikely to be worth anyone's time to fix this, but I can provide images or debug for the case.

I think the 80:20 solution here is to put some lines of documentation in the Requirements section. I might myself make a pull request, but probably not until either my temporary eye problems are over :) I don't understand the python well enough to add the setup check.

@MaxwellBo
Copy link
Owner

My first issue is with the documentation: it lists only python3 as requirements, and it took me a while that the other requirement is either using macOS or installing espeak. This could also be part of the actual speak calls btw, it should be sufficient to check for has('macunix') in vim on startup, or maybe better type say in shell to check if the command exists.

I think that's a reasonable fix that we can make.

Just some context here - @lewisjb and I built this in a weekend as a proof-of-concept around 6 years and had completely forgotten that we ever built it until we saw this issue. Sorry for the terse reply before - I'll see if we can carve out some time this week to push some fixes with any issues you might have.

In those intervening 6 years I'm not sure what has changed in terms of assistive technologies - at the time there was no decent Vim screenreader. Hopefully someone has built one with better support, and I'll be disappointed if that's not the case.

Hope you're well and any temporary eye problems clear up swiftly.

@Huluk
Copy link
Author

Huluk commented Nov 15, 2023

No worries, and no pressure!

I saw that this was a hackathon project from 6 years ago when I commented, and the reply I was expecting was more along "yeah we're not doing anything on this any more", posted some months later ;) That's also why my first message was on the short side.

Unfortunately I didn't find anything better in the mean time. There were some threads and issues with Neovim which imply that people are using normal screen readers in combination with Neovim, but nothing specific and nothing well-documented. That seems to be the general state of such assistive tech, across platforms :(

Anyway, my personal issue is mostly strain related and means I can't look at screens too long, so I'm optimistic it will clear up :) Thank you for the wishes!

Me and a friend of mine might look into more involved solutions at some point – I was thinking that Neovim's ex mode should be a good basis for screen reader support, since it's a line-wise interface like ed. I hacked together a proof of concept for a :p wrapper (usage), but it's not yet at the level that it would be more useful than your project. I may at some point in the future go through your code and use it as inspiration for use of the say / espeak parameters and for symbol conversion.

@Huluk Huluk linked a pull request Dec 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants