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

[Emacspeak] Re: Emacspeak on Android



Hi,

I now have a bluetooth keyboard for my phone.  I've found that I get much
better audio by running PulseAudio in Termux and sending the audio from
UserLAnd to Termux via PulseAudio's native TCP module.  (I tried a fully
within-Termux solution using proot-distro, but there seemed to be a lot of
leakage of (for example) Termux's own Emacs installation into the PRoot
environment, whether or not its own Emacs was installed; it just got too
confusing.)

Before I carefully document my setup, though, I've discovered another
problem.  In fact, I think it's a problem I encountered before, but
misunderstood and mischaracterized.  I thought that upgrading to Emacs 27.1
and Emacspeak 54.0 had fixed it, but I think I just misunderstood the
problem.

What I'm observing now (with those versions, and espeak 1.49.2 from Debian
10's main repository) is that on Android, auditory icons that are simple
tones (like that for a blank line) are working.  But icons that are more
complex sounds (like what you hear when moving onto one of the lines in the
bulleted list of subsections at 
https://www.gnu.org/software/emacs/manual/html_node/gnus/Using-IMAP.html for
example) are silent, and can cause the entire utterance to be silent.  Even
moving forward word by word on one of those lines results in silence, though
moving forward character by character works fine.  (The links to chapters of
the Emacspeak info manual, as bundled in Emacspeak, rather than as found on
the web, are audible, even when I try to induce an auditory icon by pressing
tab to move to the next link, though the auditory icon itself isn't
audible.)

This is the case despite the fact that I can play arbitrary wav files from
the command line on my phone, and despite the fact that the same versions of
the same programs work fine on my laptop (which is also running Debian 10).

Does anyone have any clues about what might be going wrong here?

All the best,

Tim
<><

On Thu, 2021-05-06 at 18:02 +1200, Tim Makarios wrote:
> I'm using Espeak.  I tend to avoid non‒open source software, and Espeak
> was
> conveniently in Debian's main repository, so I chose that one.
> 
> I might not get around to fine-tuning my Emacspeak-on-Android setup unless
> and until I get a physical keyboard talking to my phone, so if someone
> else
> wants to take up the baton in the meantime, I won't object.
> 
> Also, I have no experience writing org files, but orgmode.org looks
> interesting (similar to MarkDown, but more powerful?), so learning that
> might get added to my Emacs-learning curve at some point!
> 
> All the best,
> 
> Tim
> <><
> 
> On Tue, 2021-05-04 at 17:47 -0700, T.V Raman wrote:
> > Tim Makarios <emacspeak.correspondence(a)freespoken.nz> writes:
> > 
> > Very Nice!
> > 
> > I suspect tweaking buffer-size will give you most bang for the buck; Are
> > you using Outloud or Espeak?
> > 
> > Once you get this tuned to your liking, I'd request you write it up as a
> > simple org file and post it somewhere; I'd also like to include it in
> > the emacspeak distribution when the write-up is ready.
> > > 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
> > 
> > -- 
> > 
> > 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