Re: [g-a-devel]GNOME Speech



Hey Michael,

Sorry it's been long to get this stuff checked in. It's in the gnome-speech module on the gnome_speech0-1 branch

the only driver with code in at the moment is the new IBM Viavoice driver. I'll try to get the bare-bones Festival driver in soon.

The problem code is in gnome-speech/synthesisdriver.c. Have a look at impl_getSupportedParameters. the concept is:

1, The driver implementation keeps a list of ParameterPriv structs which contain information about the supported parameters. 2. getSupportedParameters iterates through this list and dynamically creates GNOME_Speech_Parameter structs as you'll see in impl_getSupportedParameters. thus, to the question in your previous mail, the CORBA_string_dup call is duping a dynamically allocated (gchar *) member of a ParameterPriv struct.

If you happen to have the Viavoice RPM installed, you'll notice that the driver doesn't crash on the call to getSupportedParameters, but that the client gets a parameter with an empty string as the name but all other fields (min, max, current, enumerated) are fine.

The Viavoice driver currently implements one parameter with a name of "baseline pitch". If you change the name to simply "pitch" in drivers/viavoice/viavoicesynthesidriver.c:viavoice_synthesis_driver_init () you'll notice that the string comes through to the client OK.

I've turned on ORBIT2_DEBUG with both traces and giop, and stuff seems to be coming across the wire fine.

BTW: I've re-written the test (test-speech) as a boring but interactive console app which includes a parameter test (option 1).

Regards,

Marc

At 09:48 AM 9/11/2002 +0100, Michael Meeks wrote:
Hi Marc,

On Tue, 2002-09-10 at 15:59, Marc Mulcahy wrote:
> Thanks Michael, will do on the ORB trace and let you know.  The other
> interesting tidbit is that strings 10 characcters or smaller are marshalled
> properly, but over 10 characters come out on the client side as empty
> ("").

        ;-) Well - I can assure you that there are no hard-coded '10's in the
ORB ;-) It might be down to some memory pool difference for longer
strings or something; it sounds extremely wierd; you're sure you're
doing:

        foo->str = CORBA_string_dup ("this is more than ten"); ?

  Strange-- I don't have any arrays of 10 characters char[10],
> everything's dynamic.

        Yep; same here :-)

> I'm the only one who has written code in GNOME speech, except I think Bill
> may have committed some namespace changes, so maybe just removing and then
> re-adding wouldn't be bad.  It's not like there is much history here.

        Fine; the concern is to preserve the history data at all costs; if
there is none - it's not so much a problem.

> Do you have a problem if I just go ahead and do it this way for 0.1, and
> then we can do cvs surgery for any future renaming (which hopefully there
> won't be much of)?  Or maybe we have to do the surgery anyway.

        Sounds fine - I'd just go ahead; the rule is an advisory only - there
is no way of making such rules stick ;-) be aware that most people do
this for fun, so you have to make the guidelines severe to stop them
charging right ahead.

> Thanks for the help.

        No problem, when it's checked in I can help with the string problem,
let me know.

        Regards,

                Michael.

--
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
Gnome-accessibility-devel mailing list
Gnome-accessibility-devel gnome org
http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel




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