Modified: freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c (16719 => 16720)
--- freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c 2010-02-22 15:43:43 UTC (rev 16719)
+++ freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c 2010-02-22 17:10:01 UTC (rev 16720)
@@ -124,6 +124,7 @@
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 */
@@ -132,6 +133,10 @@
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 */
@@ -354,7 +359,6 @@
*/
/* 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);
@@ -501,6 +505,7 @@
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;
@@ -1013,7 +1018,7 @@
/* 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);
}
@@ -3358,6 +3363,8 @@
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;
}