speechd-discuss
[Top][All Lists]
Advanced

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

WIP audio in server


From: Jeremy Whiting
Subject: WIP audio in server
Date: Fri, 31 Jul 2015 18:47:16 -0600

I've spent a bit of time wrestling with this code today and have found
the following.

If I don't initialize pulse by calling _pulse_open but only initialize
once I have data to set the format it works mostly, though there are
pauses of silence in long phrases from espeak still.
If I do initialize pulse by calling _pulse_open in pulse_open and also
reinitializing in pulse_play as required for audio rate changes etc.
it doesn't play anything somehow (it's getting stuck in pa_simple_free
on a mutex somehow).

Do I need to run a thread for every audio socket we attach in the
server? If so what should the thread's start_routine look like, just
while(1) and the callback audio_process_incoming is called when we get
traffic on the fd ? Once this is working (and I clean up how we
initialize the audio to not hard coded values, but get the config from
the config file) I can look at making the audio use the pulse async
api, but I want to get the proof of concept working as a first step.
My knowledge of pthreads seems to be blocking me at the moment though.

thanks,
Jeremy



On Thu, Jul 30, 2015 at 7:42 PM, Jeremy Whiting <jpwhiting at kde.org> wrote:
> Oops, I didn't see this until just now. At any rate I got that issue
> solved, now only playback failing (I verified I get samples in the
> server and I think it's initializing the AudioId properly since it's
> not NULL here. It seems to think it's playing from all the return
> values, but I hear no audio yet. I also wasn't sure what to do about
> sending the audio parameters just yet, so hard coded some based on my
> config here for now.
>
> BR,
> Jeremy
>
> On Thu, Jul 30, 2015 at 6:40 PM, Luke Yelavich
> <luke.yelavich at canonical.com> wrote:
>> On Fri, Jul 31, 2015 at 10:40:04AM AEST, Luke Yelavich wrote:
>>> On Fri, Jul 31, 2015 at 07:27:27AM AEST, Jeremy Whiting wrote:
>>> > Hey all,
>>> >
>>> > I'm implementing moving audio from the modules to the server (and
>>> > modules will send audio data to the server on a unix socket). I've got
>>> > the socket creation, and seem to have the ability to connect to the
>>> > socket in the modules but it's hanging here when I try to run spd-say
>>> > hello. Also I'm getting this in my speech-dispatcher.log as if it's
>>> > trying to open a second audio connection from sd_espeak for some
>>> > reason when it hangs (and no log output after this):
>>> >
>>> > [Thu Jul 30 15:03:15 2015 : 829380] speechd:     Adding audio
>>> > connection on socket 4
>>> > [Thu Jul 30 15:03:29 2015 : 105629] speechd:    Adding module on fd 28
>>> > [Thu Jul 30 15:03:29 2015 : 105654] speechd:     Adding audio
>>> > connection on socket 4
>>> >
>>> > I'm probably doing something obviously wrong, but can't seem to see
>>> > what at the moment though I've been beating my head against it for a
>>> > while and debugging. Can you see anything obvious in my changes?
>>>
>>> Well, I wonder if what you have in speechd_audio_connection_new is correct. 
>>> You make reference to module sockets and the server socket where clients 
>>> connect, and not the audio socket.
>>
>> Helps if I attach the diff.
>>
>> Luke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-WIP-Moving-audio-from-modules-to-the-server.patch
Type: text/x-patch
Size: 59519 bytes
Desc: not available
URL: 
<http://lists.freebsoft.org/pipermail/speechd/attachments/20150731/7b9b7f0e/attachment-0001.bin>


reply via email to

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