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

[Emacspeak] Re: Any tips on optimal audio config for emacspeak?



Hi Derek,

I do not have any Pi 4 experience. I did run emacspeak on the second version of the Pi but only as a test, the performance did not meet my needs. I have run emacspeak as my primary system on a number of small, low power devices over the years, from  486 hardware, various SBCs up through first generation Google Glass. So hopefully I can help. I should say though that on the early embedded and slower CPUs (386, 400 mHz or slower pentiums, early xscale and such) I was using dedicated text-to-speech hardware or additional sound boards and not asking the CPU to do all the TTS heavy lifting.

Tim's suggestions are exactly the process I would suggest. Think about ways to separate out and separately test the various tasks your system is trying to do. Then start putting together those tasks in ways that will reveal issues. 

It also may be possible to reduce the audio latency simply by eliminating other tasks your Pi is engaged in while you are in emacspeak. A relatively simple thing to try is to reduce as much as possible what your Pi is doing when you're running  emacspeak and generating TTS. Even within emacs,. for example, does turning on or off audio icons change the latency you are experiencing in text-to-speech?   Out of emacs. are any other audio processes running at the same time?  If you are in a windowing environment can you try running from a console and not having the windowing system up?

A little more involved but well worth trying are things like running the speech server on another machine and connecting the Pi to that. Do you have another machine from which you can run the speech server? We can help you and set up emacspeak on the Pi to use the remote speech server. Not as a long-term solution, but as a test. Or, If you have another machine running emacspeak and can use the Pi as the speech server you can really start to examine whether the Pi is up to the task of smoothly turning emacspeak output to speech. These kinds of things can help you quickly zero in on where the latency is coming from.

So that our suggestions can be targeted to your skills and needs, can you give us a little background on your computer skills and emacspeak experience if any? 

Tell us a little more about your Pi and Arch setup. Are you running in a windowing environment or just a console session? Are you using a 32-bit or 64-bit operating system (I don't know if Arch on the pie is 64-bit) How much memory does it have? If you have enough, setting up a RAM disk will let you test your thought that your SD card may be the source of some of your latency.

Lastly, what are your goals or expectations? Are you exploring the limits of your Pi or are you looking to build a small portable emacspeak environment (whether that's on a Pi or not). What it is you're trying to do here as this will also help us help you get there. 

Looking back at this post I know I'm asking a lot, tell us as much or as little as you like, we will try and help.

Thanks for asking interesting questions,

Greg

-
Greg Priest-Dorman

On Wed, Mar 10, 2021, 9:44 PM Tim Cross <theophilusx@xxxxxxxxxxx> wrote:

You have the right address! Welcome. You are actualy only the 3rd person
to post to this list since it moved from the old home at Vassar.

Sadly, I have no experience with running Emacspeak on a Pi. I'm not
familiar with the performance characteristics of the Pi. One thing you
could try is sending speech directly to the espeak server (via the
command line - just run ./espeak and then queue speech by typing a q
followed by some words inside { and }. Then hit 'd' to have it speak.
There is also an espeak command which comes as part of the espeak
software that you can use to turn a text file into speech. This will at
least give you and idea whether it is the TTS which is slow or something
else.

One thing I do remember is that the performance of espeak can be
improved by ensuring it is built for the correct audio interface. i.e.
Alsa or Pulse audio. Make sure you have built it for the interface you
plan to use.

I do know on other platforms, either Linux or macOS, there is little
latency and speech happens quickly. It can sometimes take a bit of time
to interrupt speech - this depends on how much has been sent to the
speech server. There is a play off between speech quality and how fast
it can be interrupted. More speech sent at once gives better quality,
but then takes longer to interrupt the speech. Shorter allows quick
interruption, but at the cost of speech quality.

A lot of people have reported that Pulse Audio has poor performance
compared to Also. I have been running pulse audio for years without any
performance problems (there were problems in the early days, but that
was a long time ago).

Both Alsa and pulse audio have a fair amount of configuration options.
On Linux, I've not needed to do any performance tuning when running on
64 bit systems for years. It is possible you may need to look into this
in order to get a configuration which is suitable for the Pi. Probably
need to ask for assistance in a Pi specific community for this as I
don't think many people run emacspeak on a Pi.

Tim

Derek Roberts <bigd.vi.guy@xxxxxxxxxxx> writes:

> Hi all,
>
> Hopefully I got the address right! :)
> I'm trying to get Emacspeak working on a Raspberry Pi 4 running Arch. It
> seems like no matter what I do, audio performance just isn't quite right.
> With Alsa, there's noticeable lag when I do anything. The speech is slow to
> interrupt, icons play slowly and make the whole emacs process seem to lag.
> With Pulseaudio, the pauses between speech chunks are greatly lengthened. A
> simple comma may take a full second to be processed.
> Does anyone have tips for an optimal audio configuration? I'm guessing the
> icon slowness is just SD card performance (class 10, they said!), but what
> about the speech lag? In case it helps, I'm using latest Emacspeak from
> github/tvraman/emacspeak with the espeak server.
> ...Or should I just blow the whole thing and switch to FreeBSD? :)
>
> Thanks for your help,
> Derek
> _______________________________________________
> 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