Adding Screen Reader Capabilities to Elvish Shell?

I’m tying to build a custom computer for a blind friend ( he is 60 years old and has never worked with a computer), its going to be a potcast recording machine, that he can use by himself. I want to keep the learning curve as low as possible, thats why I am writing a golang cobra cli app that has all commands needed to record and listen to episodes. A background service will upload these episodes to my server where another person does post production and publishing.

For the raspberry pi based studio I need a tty based screenreader. Existing CLI screen readers are either complex to setup or limited.

I was woundering if I could use Elvish as the primary shell but add TTS to automatically read:

  • Command output
  • File/directory listings
  • Error messages
  • Navigation feedback
  • while writing out a command having an option the read the command

then my user could learn my custom cli as well as a few tools like ls,cat, etc and that woud be more than enough.

My question is if I could use something like htgo-tts (GitHub - hegedustibor/htgo-tts: Text to speech package for Golang.) a simple Go library with speech.Speak("text") API to add text-to-speech to elvish ?

The htgo-tts libary is not perfect beaucse it needs network acces to fetch the audio, but thats not my point. I can also use something else.

If can implement TTS ,how would I capture the output and how would I integrate this ? Or is this very difficult ? If @xiaq says its doable, I would probably give it a try because blind users should have a better, simpler way of interactiong with a terminal.

Hmm, I might be missing something but I’d assume that the usual way to do this is to use the screenreader to read out the content of the terminal emulator.

You can in theory add TTS support to Elvish to get readouts of all of Elvish’s UI elements, but that won’t solve the problem for command outputs. For that you still need to rely on the terminal’s screenreader support.