speechd-discuss
[Top][All Lists]
Advanced

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

Re: speechd-el issues / questions


From: Milan Zamazal
Subject: Re: speechd-el issues / questions
Date: Fri, 12 Apr 2024 19:59:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Otto,

>>>>> "ODR" == Otto Diesenbacher-Reinmüller <okflo@diesenbacher.net> writes:

    ODR> for inserting a silent icon - I would also patch / advise
    ODR> speechd-speak--text? F.e. a dirty hack - setf some variable
    ODR> make-breaks to t

Yes.

    ODR> - and in speechd-speak--text substitute "\n\n" by the icon if
    ODR> make-brekas is t? How should the insertion of the icon into the
    ODR> text argument should look like? Or will I have to break up text
    ODR> argument into consecutiove speechd-speak--text calls?

I think the easiest way would be to replace speechd-out-text call there
with separate speechd-out-text calls for each of the paragraphs and
using :icon argument for the consecutive calls.  Depending on your
needs, you may or may not want to enclose the whole thing into a Speech
Dispatcher block to handle it as a single message.

It looks like a general use case so it might be useful to have this in
speechd-el directly.  In such a case, a bit of caution may be needed to
not disrupt Braille output.

    ODR> btw - what is the best source / docu to listen to, to
    ODR> understand communication with speech-dispatcher better, beside
    ODR> speechd-el sources?

Speech Dispatcher contains documentation of Speech Synthesis Interface
Protocol (SSIP) that speechd-el uses to talk to it.  It’s available in
Info, so you can read it in Emacs.

IIRC Speech Dispatcher can log SSIP communication with a sufficiently
verbose log level, which is useful to see what’s going on in case of
problems.  Especially because debugging speechd-el with Emacs debuggers
is hard to impossible by definition (using variables and putting the
needed info into them is often a usable workaround).

    ODR> The PDFs, EPUBs, papers, journals, etc that I listen to have
    ODR> very various unicode chars for f.e. quotes, or other
    ODR> delimiters, that shouldn't be spoken, or rather substituted.
    ODR> And in other documents, these chars actually should be spoken,
    ODR> etc. So it varies... So I don't want all the time edit config
    ODR> files, ask speech-dispatcher to reload configs, etc.

Makes sense.  This could be supported in speechd-el too.

    ODR> But I will probably make a hack with speechd-speak--text
    ODR> function, takening care of above mentioned pauses and
    ODR> substitution.

I can imagine something like searching for uncommon characters and
looking up their contingent replacements in a user-defined alist might
be a good start.  As speechd-speak--text is called from many contexts
(basically for anything that is spoken or output in Braille), some
consideration is needed how to specify what and when to replace.  This
applies to the pauses too.

I may look at implementing those features but I’ll start with fixing the
reported bugs.

Regards,
Milan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]