mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 12:18:18 +00:00
allow space after filename in play_and_detect_speech
This commit is contained in:
parent
893d7eff9d
commit
65c4f76f40
@ -464,6 +464,7 @@ SWITCH_STANDARD_APP(play_and_detect_speech_function)
|
||||
char *lbuf = NULL;
|
||||
const char *response = "DONE";
|
||||
char *detect = NULL;
|
||||
char *s;
|
||||
|
||||
switch_channel_set_variable(channel, "detect_speech_result", "");
|
||||
|
||||
@ -474,6 +475,12 @@ SWITCH_STANDARD_APP(play_and_detect_speech_function)
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* trim any trailing space */
|
||||
s = detect;
|
||||
while (--s >= lbuf && switch_isspace(*s)) {
|
||||
*s = '\0';
|
||||
}
|
||||
|
||||
/* split input at "detect:" */
|
||||
detect[0] = '\0';
|
||||
detect += 7;
|
||||
|
Loading…
x
Reference in New Issue
Block a user