From 7942cb93637253c666a610d25a53ddb7f9091f37 Mon Sep 17 00:00:00 2001
From: voipke <voipke@qq.com>
Date: Tue, 3 Nov 2020 08:32:58 +0800
Subject: [PATCH] [mod_unimrcp] Allow prosody-rate to be negative

---
 src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c
index 990875b784..a89329f4b5 100644
--- a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c
+++ b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c
@@ -1312,7 +1312,7 @@ static switch_status_t synth_channel_set_header(speech_channel_t *schannel, int
 		break;
 
 	case SYNTHESIZER_HEADER_PROSODY_RATE:
-		if (switch_isdigit(*val) || *val == '.') {
+		if (switch_isdigit(*val) || *val == '.' || *val == '-') {
 			synth_hdr->prosody_param.rate.type = PROSODY_RATE_TYPE_RELATIVE_CHANGE;
 			synth_hdr->prosody_param.rate.value.relative = (float) atof(val);
 		} else if (!strcasecmp("x-slow", val)) {