struct profile {
/** name of the profile */
char *name;
+
/** MIME type to use for JSGF grammars */
const char *jsgf_mime_type;
/** MIME type to use for GSL grammars */
const char *srgs_xml_mime_type;
/** MIME type to use for SRGS ABNF grammars */
const char *srgs_mime_type;
+
+ /** MIME type to use for SSML (TTS) */
+ const char *ssml_mime_type;
+
/** Default params to use for RECOGNIZE requests */
switch_hash_t *default_recog_params;
/** Default params to use for SPEAK requests */
*/
/* synthesis languages */
-#define MIME_TYPE_SSML_XML "application/ssml+xml"
#define MIME_TYPE_PLAIN_TEXT "text/plain"
static switch_status_t synth_load(switch_loadable_module_interface_t *module_interface, switch_memory_pool_t *pool);
lprofile->srgs_xml_mime_type = "application/srgs+xml";
lprofile->gsl_mime_type = "application/x-nuance-gsl";
lprofile->jsgf_mime_type = "application/x-jsgf";
+ lprofile->ssml_mime_type = "application/ssml+xml";
switch_core_hash_init(&lprofile->default_synth_params, pool);
switch_core_hash_init(&lprofile->default_recog_params, pool);
*profile = lprofile;
/* good enough way of determining SSML or plain text body */
if (text_starts_with(text, XML_ID) || text_starts_with(text, SSML_ID)) {
- apt_string_assign(&generic_header->content_type, MIME_TYPE_SSML_XML, mrcp_message->pool);
+ apt_string_assign(&generic_header->content_type, schannel->profile->ssml_mime_type, mrcp_message->pool);
} else {
apt_string_assign(&generic_header->content_type, MIME_TYPE_PLAIN_TEXT, mrcp_message->pool);
}
profile->srgs_xml_mime_type = switch_core_strdup(pool, val);
} else if (strcasecmp(param, "srgs-mime-type") == 0) {
profile->srgs_mime_type = switch_core_strdup(pool, val);
+ } else if (strcasecmp(param, "ssml-mime-type") == 0) {
+ profile->ssml_mime_type = switch_core_strdup(pool, val);
} else {
mine = 0;
}