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

Re: emacspeak, alsa and other sound applications



I wasn't clear enough here.  the latency happens in my test setup
running without emacspeak.  It happens because if the buffer is full
of 0.2 seconds of sound and you trigger an event (move a finger) alsa
will finish the buffer before processing the new sound generated as a
result of the event.  thus the latency is buffer-driven, not
CPU-driven.  Hence the interest in reducing the buffer size.  Of
course if I could get alsa to generate an event warning a buffer
underrun was iminent I could use the select/poll facilities of alsa to
drip-feed data to the alsa ring buffer and all would be fine ...
except I've not found a way to do this.  So I don't *think* profiling
will help here.  Multiple hardware channels looks more likely  
I also can't help thinking I'm missing something embarrassingly
obvious about this, but that's more a question for an alsa list.
cheers
Peter
 
Tim Cross writes:
>Hi Peter,
>
>just wondering if you have experienced the same issue regarding
>latency if you use a different speech server, such as espeak.
>
>One of the issues which may impact on your latency is the need for
>outloud to use the dmix alsa plugin and the unusual sample rate of
>11025 generated by the outloud libs rather than more common 44100 or
>48000. I'm guessing this would involve more processing in order to mix
>the signal with other sound signals.
>
>Many modern sound cards do incorporate multiple channels, so it could
>be possible to create a .asoundrc file which sets up one channel just
>for outloud and one for your other app. The only problem with this is
>that becuase cards tend to differ quite a bit, it will be difficult to
>define one asoundrc file which will work on a majority of platforms
>i.e. would need to be tweaked for each one.
>
>The above two points are just guesses. What you really need to do is
>some profiling to determine exactly where the latency issue is coming
>from. Without this information, you can never really be sure you have
>fixed the problem. While a pain to setup, it will at least give you a
>solid basis to decide if the problem is just with your app and
>emacspeak, a specific emacspeak speech server such as outloud or if it
>is likely to be a more general issue and only noticeable now because
>emacspeak is creating just the right conditions and you could see the
>same problem with other apps that may also run at the same time.
>
>Tim
>
>
>On Thu, Sep 15, 2011 at 10:01 AM, Peter Rayner < >
><prayner@unimelb.edu.au> wrote:
>> This is not exactly an emacspeak problem although there might be an
>> emacspeak solution so I hope it isn't too off topic.
>>
>> I'm writing an application (let's call it soundscape) for sonifying 2d
>> graphics with the use of a touchpad or graphics tablet. This requires
>> relatively low latency so the output responds to the position of your
>> finger. Other requirements for me are that it runs under gnome, that
>> it must not interfere with emacspeak (currently running the 32-outloud
>> server) and it must run on a laptop (i.e
>> one soundcard). Without emacspeak it works fine. With emacspeak
>> running I can't tune the buffer sizes to get the latency down far
>> enough. I don't know how much of this I can fix by having emacspeak
>> and soundscape talk to different ALSA plugin devices given that
>> they're talking to the same underlying hardware. The recent addition
>> of the ALSA_DEFAULT environment variable for the outloud speech server
>> makes this possible but my experiments so far haven't helped, probably
>> a comment on my ignorance of the alsa architecture.
>> My question to the alsa users list came up blank so I'm now hoping
>> someone has had a similar enough problem with emacspeak to suggest a
>> solution.
>> thanks in advance for any help
>> Peter
>>
>>
>> --
>> Peter Rayner
>> room 343
>> School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
>> tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761
>> mobile +61 402 752 379, skype: petermorag
>> mail-to: prayner@unimelb.edu.au
>>
>> and
>> CLIMMOD ENGINEERING
>> http://www.climmod.com
>> mail-to: Peter.Rayner@climmod.com
>>
>> -----------------------------------------------------------------------------
>> To unsubscribe from the emacspeak list or change your address on the
>> emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
>> subject of "unsubscribe" or "help".
>>
>>
>
>
>
>-- 
>Tim Cross
>Phone: 0428 212 217
>
>-----------------------------------------------------------------------------
>To unsubscribe from the emacspeak list or change your address on the
>emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
>subject of "unsubscribe" or "help".
>

-- 
Peter Rayner
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: prayner@unimelb.edu.au

and
CLIMMOD ENGINEERING
http://www.climmod.com
mail-to: Peter.Rayner@climmod.com

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
subject of "unsubscribe" or "help".



If you have questions about this archive or had problems using it, please send mail to:

priestdo@cs.vassar.edu No Soliciting!

Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog | Search the archive