/** Create Swift synthesizer engine */ MRCP_PLUGIN_DECLARE(mrcp_resource_engine_t*) mrcp_plugin_create(apr_pool_t *pool) { swift_engine *synth_engine; mrcp_resource_engine_t *engine; /* open swift engine */ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Swift Engine [%s]",swift_version); if((synth_engine = swift_engine_open(NULL)) == NULL) { apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Swift Engine"); return NULL; } swift_speech_language_table = mrcp_swift_language_table_create(pool); mrcp_swift_voices_show(synth_engine); /* create resource engine base */ engine = mrcp_resource_engine_create( MRCP_SYNTHESIZER_RESOURCE, /* MRCP resource identifier */ synth_engine, /* object to associate */ &engine_vtable, /* virtual methods table of resource engine */ pool); /* pool to allocate memory from */ if(!engine) { apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Resource Engine"); swift_engine_close(synth_engine); } return engine; }
/** Create Swift synthesizer engine */ MRCP_PLUGIN_DECLARE(mrcp_engine_t*) mrcp_plugin_create(apr_pool_t *pool) { mrcp_swift_engine_t *synth_engine = apr_palloc(pool,sizeof(mrcp_swift_engine_t)); synth_engine->swift = NULL; synth_engine->language_table = mrcp_swift_language_table_create(pool); synth_engine->sample_rates = MPF_SAMPLE_RATE_NONE; /* create engine base */ return mrcp_engine_create( MRCP_SYNTHESIZER_RESOURCE, /* MRCP resource identifier */ synth_engine, /* object to associate */ &engine_vtable, /* virtual methods table of engine */ pool); /* pool to allocate memory from */ }