From 57fe6be4f7f0d76e5af1b0fc38950483e0709971 Mon Sep 17 00:00:00 2001 From: vahagn1992 Date: Tue, 1 Jul 2025 08:48:29 +0000 Subject: [PATCH 1/2] possibility to use uri-list --- mod_unimrcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod_unimrcp.c b/mod_unimrcp.c index 5fb772f..94e9bf7 100644 --- a/mod_unimrcp.c +++ b/mod_unimrcp.c @@ -393,6 +393,7 @@ static const char *speech_channel_type_to_string(speech_channel_type_t type); /* synthesis languages */ #define MIME_TYPE_PLAIN_TEXT "text/plain" +#define MIME_TYPE_PLAIN_URI "text/uri-list" static switch_status_t synth_load(switch_loadable_module_interface_t *module_interface, switch_memory_pool_t *pool); static switch_status_t synth_shutdown(); @@ -1137,7 +1138,9 @@ static switch_status_t synth_channel_speak(speech_channel_t *schannel, const cha /* 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, schannel->profile->ssml_mime_type, mrcp_message->pool); - } else { + } else if (text_starts_with(text, FILE_ID) || text_starts_with(text, HTTP_ID) || text_starts_with(text, HTTPS_ID)){ + apt_string_assign(&generic_header->content_type, MIME_TYPE_PLAIN_URI, mrcp_message->pool); + }else { apt_string_assign(&generic_header->content_type, MIME_TYPE_PLAIN_TEXT, mrcp_message->pool); } mrcp_generic_header_property_add(mrcp_message, GENERIC_HEADER_CONTENT_TYPE); From 71188ccfba35febf296d93fab20fefcca8343ae0 Mon Sep 17 00:00:00 2001 From: vahagn1992 Date: Tue, 19 Aug 2025 00:03:28 +0400 Subject: [PATCH 2/2] Update mod_unimrcp.c --- mod_unimrcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_unimrcp.c b/mod_unimrcp.c index 94e9bf7..cd84349 100644 --- a/mod_unimrcp.c +++ b/mod_unimrcp.c @@ -1140,7 +1140,7 @@ static switch_status_t synth_channel_speak(speech_channel_t *schannel, const cha apt_string_assign(&generic_header->content_type, schannel->profile->ssml_mime_type, mrcp_message->pool); } else if (text_starts_with(text, FILE_ID) || text_starts_with(text, HTTP_ID) || text_starts_with(text, HTTPS_ID)){ apt_string_assign(&generic_header->content_type, MIME_TYPE_PLAIN_URI, mrcp_message->pool); - }else { + } else { apt_string_assign(&generic_header->content_type, MIME_TYPE_PLAIN_TEXT, mrcp_message->pool); } mrcp_generic_header_property_add(mrcp_message, GENERIC_HEADER_CONTENT_TYPE);