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

[Emacspeak] Re: Emacspeak on Android



Hi,

Thank you all for your replies.  Inspired partly by them, partly by an
answer I received on the #termux IRC channel, and partly by my own
stubbornness, I searched for ways to get the audio out of something like
UserLAnd or a Termux PRoot environment.

And I succeeded!  With auditory icons, and everything!

The trick is to use PulseAudio to stream the audio out of UserLAnd (or
PRoot).  In particular, I installed pulseaudio in UserLAnd's Debian
environment and added this line to the bottom of /etc/pulse/default.pa
there:

load-module module-simple-protocol-tcp source=auto_null.monitor record=true
port=54713 listen=127.0.0.1

(Apologies for any spurious linebreaks added by my email program; it should
be a single line.)  Then with PulseAudio started, I connected to the stream
from SimpleProtocolPlayer NG
https://f-droid.org/packages/fr.jakse.raphael.simpleprotocolplayer
and started Emacspeak in UserLAnd.  The sound is a bit choppy, but it's a
proof of concept, at least.  I haven't yet thoroughly tested whether the
audio output would be improved by different settings like:
* a different buffer size in Simple Protocol Player NG,
* a different sample rate,
* streaming the audio to Termux instead of Simple Protocol Player NG,
* running Emacspeak in Termux's PRoot instead of UserLAnd,
* streaming over a Unix special file instead of TCP,
* and so on.

The main web pages I drew on for my understanding were:
* https://android.stackexchange.com/a/205629
* https://kaytat.com/blog/?page_id=301
* https://github.com/CypherpunkArmory/UserLAnd/issues/371
They often assume a visual desktop, but this isn't necessary; I can run
Emacspeak in emacs-nox in UserLAnd, without any visual desktop installed.

I did notice that it didn't fully work with Debian buster's emacspeak
package (version 49.0) in Emacs 26.1; the output seemed to be silent for
some utterances, perhaps triggered by auditory icons or voice locking or
both.  But switching to Emacs 27.1 (from buster-backports) and compiling
Emacspeak 53.0 from source in UserLAnd solved that problem.

Now, to complete the eyes-free experience on my mobile phone, I need a
physical keyboard I can connect to it, preferably without wires, so I don't
tie myself up in cords.  But before investing in that, perhaps I should
figure out whether, in the long run, Emacspeak will make me more productive
than a visual desktop, rather than less.  At the moment, I'm finding a
fairly steep Emacs-learning curve (mostly keybindings), but I'm still
hopeful that it will be worth it.

I hope this is helpful and encouraging.

All the best,

Tim
<><

On Sat, 2021-05-01 at 07:37 -0700, T.V Raman wrote:
> Typing this up mostly for the archive.
> 
> 1. Speech Server: Voice changes are hard to implement using the current
>    setup, but feasable;
> 
>    A. Look up Google TTS documentation, provides pitch change as the
>       only control from memory.
> 
>       B. Copy plain-voices.el to android-voices.el, then follow the code
>          and update it to generate the pitch control changes.
> 
>          C. Finally add the necessary clause in dtk-speak.el to load
>             android-voices.el if synthesis engine is Android.
> 
>             2. Auditory Icons, Again doable, but you'd have to write
>                some Java code in the Android speech server to play
>                sounds, you'll likely need to package over the sound
>                files and copy them to the Android side.
>                
> -- 
> 
> Thanks,
> 
> --Raman
> ♈ Id: kg:/m/0285kf1  🦮
> _______________________________________________
> Emacspeak mailing list -- emacspeak(a)emacspeak.org
> To unsubscribe send an email to emacspeak-leave(a)emacspeak.org


|May 1995 - Last Year|Current Year|


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

Contact Info Page