[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

[Emacspeak] Re: Emacspeak on Android



Hi Tim(s)

I have been running emacspeak on stock android and LineageOS phones and tablets with either proot or chroot linux installations running alongside android for almost 10 years, but my setup is not ideal and not for the faint of heart. In this setup emacspeak runs on the Linux side. But the linux side has no access to sound.  TTS is done on the android side.  No sounds other than TTS are implemented and the speech server is quite rudimentary and not fully fleshed out.  It was built a number of years ago (2014?) and was good enough for the use I put it to at the time.  In the last few years, while I still have it installed and find it regularly useful,  I would not consider the speech server anything but "flaky and barebones".  No speed control, some speech omissions, and again, no audio icons or other audio from the Linux side.  The speech server is the weak part.

If someone were motivated to write a more complete speech server this would likely be of more general applicability.   Again, the limitation is from the fact that the speech server only passes text, no formatting or other info, to the android TTS engine.  That being said, it has worked for me on everything from Android 4.4 running on Google Glass to Android 11 on a Pixel 3.  Compared to not having it, it is great. Compared to a full emacspeak running on a modern Linux box it is crap.  

For the Installation of a proot Linux session I currently use Debian installed by Userland  from https://play.google.com/store/apps/details?id=tech.ula&hl=en_US&gl=US
From there I install emacs, emacspeak and netcat into that Debian session. There is no speech output provided by the phone's Linux side. Connectbot does work with Talk Back but I am only an infrequent Talk Back user (I do rely heavily on Select to Speak) so I can't advise of the feasibility of doing the install if you are dependent on Talk Back for feedback.  

There are a few minor configurations to do on the linux side after that, like getting your .emacs configured to launch emacspeak with the correct speech server.

Back on the android side, you would get the android local tts apk,  which is old and must be side loaded.  I have that and am glad to share and walk you through the install.

Anyway, rough outline.  If this is something you want to try I suggest we set up a meeting and talk. I am sighted (with a print disability) and if you have a way to point a camera at your phone screen I would be happy to hangout and go through the install with you as long as you can offer some interesting conversation over the slow bits (like when debian is installing).

I could do this with you as soon as late next week. I am on the west coast of the US in what is currently UTC -7.  If interested lets take this off list.  Perhaps a good install guide can come out of it.

-Greg


On Fri, Apr 30, 2021 at 3:32 PM Tim Cross <theophilusx@xxxxxxxxxxx> wrote:

Hi Tim,

first, I have no experience with Android and cannot provide much help.
Hopefully others will.

One tip I would suggest is that you need to start from the speech server
side. Until you have a working speech server, you cannot have a working
Emacspeak. So first thing to determine is how to get a working TTS
engine on your phone.

Once you have that, you then need to work out how to interface with that
TTS from Emacs. Most of the current speech servers use Tcl as the
scripting language which provides the link between Emacspeak and the
TTS. However, any language could be used provided it can take input from
Emacspeak and send it to the TTS API. For example, on the mac, Python is
used.

Keep in mind that Emacspeak can interface with the speech server either
by starting a sub-process and running the interface script or it can
communicate via a TCP socket. The latter approach might be useful if you
have to run things in separate 'containers'.

While espeak might be an option, I wonder if you would be better off
looking into how to get access to the 'native' TTS service on the
Android. I'm assuming there is one as the phone does have accessibility
support. The idea would be similar to how Emacspeak uses the voiceOver
TTS on Mac (via a python script). Failing that, I wonder if finding a
Java TTS would be better than trying to run a C based TTS in some
container. Java seems like a better choice for Android and java based
TTS engines do exist.

I also notice that in the Emacspeak repo, in the servers directory,
there is a directory called android, which looks to have the beginnings
of some work to get a TTS running on Android. Might be worthwhile
digging around in that directory.

Once you have a working TTS and an interface to it, you can then focus
on getting Emacspeak to use that interface. Until you have the TTS and
interface, you won't get anywhere with Emacspeak.

It is an interesting project, but will take a fair bit of work.

Tim Makarios <emacspeak.correspondence@xxxxxxxxxxx> writes:

> Hi,
>
> I've been trying to get Emacspeak working on my mobile phone, which is
> running LineageOS 17.1 (based on Android 10).  So far, I've tried a couple
> of things, but neither has quite worked.
>
> First, I tried installing Emacspeak on debian-buster from proot-distro in
> Termux.  Unfortunately, it's silent, and running espeak on its own results
> in a long list of errors, starting with
>> ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
> so I guess Termux's proot-distro isn't giving Debian access to the audio.
>
> For another attempt, I tried building Emacspeak directly in Termux.  This
> required building TclX, too, which seemed to work, but when I tried running
> `./servers/espeak` it gave these errors
>> couldn't load file
>> "/data/data/com.termux/files/usr/lib/tclx8.4/libtclx8.4.so": dlopen
>> failed: cannot locate symbol "rresvport" referenced by
>> "/data/data/com.termux/files/usr/lib/tclx8.4/libtclx8.4.so"...
>>     while executing
>> "load /data/data/com.termux/files/usr/lib/tclx8.4/libtclx8.4.so Tclx"
>>     ("package ifneeded Tclx 8.4" script)
>>     invoked from within
>> "package require Tclx"
>>     (file "./servers/espeak" line 37)
> so I guess TclX relies on rresvport, whatever that is, and Termux doesn't
> provide it.
>
> Does anyone have any clues about how I might be able to get Emacspeak
> running on my phone?
>
> Thanks,
>
> Tim
> <><
>
> _______________________________________________
> Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
> To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx


--
Tim Cross
_______________________________________________
Emacspeak mailing list -- emacspeak@xxxxxxxxxxx
To unsubscribe send an email to emacspeak-leave@xxxxxxxxxxx


|May 1995 - Last Year|Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page