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

[hts-users:03828] Re: Issue when using flite+hts in a multi-threaded application


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