[hts-users:03828] Re: Issue when using flite+hts in a multi-threaded application
- Subject: [hts-users:03828] Re: Issue when using flite+hts in a multi-threaded application
- From: Yongxin Wang <fefe.wyx@xxxxxxxxx>
- Date: Fri, 2 Aug 2013 08:48:06 +0800
- Cc: hts-engine-users@xxxxxxxxxxxxxxxxxxxxx
- Delivered-to: hts-users@xxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=+LQ9pIkUaSYuk8PEqzmsJc7AyWwTcAgCyII6fRsevlA=; b=O6Jc62JJlLlux7q5rCpRc20Cg6bMPTL+MePJhfe147jX3MGT1gvJ9i3dvSSZfBfJS+ xbGqQwAzMdY/sHMfjFZiDq5yzsNP4PAK7d7czHSFRBChrjZBsf1Joc8CiG9ffqNcKXkN JU+cW2No6kwnok7Iw5Ofgmrx4xa6DvjxG9M3vl5cO1iYHs/s+Dk0n6cv+4WAArakwmT3 vDbfoThWzKHbrXr9UhBQZ8GpC9rjuA+h9qwq9g1e59OdNXaXtU4Pen6Jkgg+pFWf9d0Y /sA/E+tG5tNsDKOLJ3q8vNkaAw/zEDS7gR5aLUYZwJT1ogkFSuygiueWvP0GDrpKp8ai tNNA==
Basicly, hts_engine is not thread safe. Label information, speech
parameters, etc. are stored in the hts_engine structure, so it cannot
be shared between threads.
You may initialize a separate hts_engine for each thread.
On Thu, Aug 1, 2013 at 11:51 PM, Anil John M <aniljohn80@xxxxxxxxx> wrote:
> Hi All,
>
> I trying to use flite+hts_engine-1.03 api in a multi-threaded server-client
> architecture. I am first initializing the engine using
> Flite_HTS_Engine_initialize() & Flite_HTS_Engine_load()
>
> Then in every thread, I am calling Flite_HTS_Engine_synthesis().
>
> I could successfully compile the program without any errors or warnings.
> When I run the program as a server, it is synthesizing correctly, when only
> one client sends an input. But when multiple requests are coming in, HTS
> throws an error saying,
> Error: HTS_Label_load_from_fp: label list is not initialized.
>
> Is flite+hts thread safe? Or am I missing something in using flite+hts api.
> Please provide your suggestions.
>
> Thank you,
> - Anil
- References
-
- [hts-users:03827] Issue when using flite+hts in a multi-threaded application, Anil John M