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

Re: [pygame] Getting Festival to play nice with Pygame?



In localhost.pygame, you wrote:
> hey all--
> 
> 	I'm attempting to use both Festival (The Text-To-Speech synthesizer)
> and Pygame simultaneously in my application. To be exact, my application
> is loading up the "festival_server" daemon during program
> initialization, and later feeding text to the daemon by connecting to it
> directly.

[...]

> 	Also, I notice that sometimes when I load my program, I get this error
> when Pygame initializes:
> 
> esd: Failed to fix mode of /tmp/.esd to 1777.
> Try -trust to force esd to start.
> esd: Esound sound daemon unable to create unix domain socket:
> /tmp/.esd/socket
> The socket is not accessible by esd.
> Exiting...
> 
> 
> 	I don't get this error consistently. Festival *only* works when I get
> this error, but not *every time* I get this error.


>From this interesting observation -- Festival only works when you
*GET* the error, I'm guessing that Festival and pygame are racing to
open and control the sound hardware.  There are several options I
think you have:

1.  Get Festival to use esd instead of /dev/dsp or /dev/audio.  Esd
exists to arbitrate and multiplex multiple applications using the
audio hardware, but I'm guessing your copy of festival isn't using
esd.

2.  Use another arbitration library.  There's one called NAS (network
audio system) which works like X.

3.  Use festival to generate audio files and play the audio files
through pygame.  This is most portable (e.g. it works w/out esound),
and most flexible, as it allows you to sync utterances to program
events more closely.

Hope this helps.

-- 
bryan k ogawa  <bko@unobvious.com>   http://www.unobvious.com/
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org