<div dir="ltr"><div>It seems enabling the following command resolves my problem:</div><div dir="ltr"><br></div><div dir="ltr"><param name="threaded-system-exec" value="true"/><br></div><div dir="ltr"><br></div><div>Can anyone explain in detail what this variable does? </div><div><br></div><div>Thanks!</div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 3 Sep 2018 at 20:30, Lee Vidor via FreeSWITCH-users <<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><br>---------- Forwarded message ----------<br>From: Lee Vidor <<a href="mailto:leevidor89@googlemail.com" target="_blank">leevidor89@googlemail.com</a>><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>Cc: <br>Bcc: <br>Date: Fri, 31 Aug 2018 13:50:27 +0100<br>Subject: mod_tts_commandline hangs in call flow<br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi<div><br></div><div>I'm currently using mod_tts_commandline with a python script to AWS text to speech API. The flow works fine during a single call.</div><div><br></div><div>Event socket API -> Freeswitch dialplan -> mod_tts_commandline -> Python script -> AWS API -> Voice file -> Freeswitch say</div><div><br></div><div>However when there a number of concurrent calls (even just 10 to 15) the request to execute the python script hangs until all the calls are at the same requesting state. As if mod_tts_commandline is waiting for something to happen.</div><div><br></div><div>Dial plan:</div><div><br></div><div><div> <extension name="tts_google"></div><div> <condition field="destination_number" expression="^11111$"></div><div> <action application="set" data="call_timeout=60" /></div><div> <action application="answer"/></div><div> <action application="detect_silence" data="100 30 25000"/></div><div> <action application="speak" data="tts_commandline|${lang}|${text}" /></div><div> <action application="hangup"/></div><div> </condition></div><div> </extension></div></div><div><br></div><div>tts_commandline.conf:<br></div><div><br></div><div><div> <param name="command" value="/usr/bin/python /usr/local/freeswitch/scripts/synthesize_text.py --language=${voice} --filename=${file} --text=${text}"/></div><div> </settings></div></div><div><br></div><div>Execution of python script in freeswitch logs:</div><div><br></div><div><div>2018-08-30 11:19:57.641892 [ERR] switch_ivr_play_say.c:2385 switch_ivr_detect_silence: SILENCE DETECTED</div><div>2018-08-30 11:19:57.641892 [DEBUG] switch_core_codec.c:248 sofia/external/33123456789 Restore previous codec PCMU:0.</div><div>EXECUTE sofia/external/33123456789 speak(tts_commandline|en-US|Hi, This is a test message)</div><div>2018-08-30 11:19:57.641892 [DEBUG] switch_ivr_play_say.c:3025 OPEN TTS tts_commandline</div><div>2018-08-30 11:19:57.641892 [DEBUG] switch_ivr_play_say.c:3035 Raw Codec Activated</div><div>2018-08-30 11:19:57.641892 [DEBUG] mod_tts_commandline.c:160 Executing: /usr/bin/python /usr/local/freeswitch/scripts/synthesize_text.py --language='en-US' --filename='/tmp/92ec5996-0dc8-4293-b5ba-465430811fed.tmp.wav' --text='Hi, This is a test message'</div></div><div><br></div><div>"Simultaneous calls requesting mod_tts_commandline"</div><div><br></div><div>Log from python script: (notice it's called with a 15 second delay) ---> <b>What is causing this delay?</b></div><div><br></div><div><div>2018-08-30 11:20:12,488 DEBUG Called script</div><div>2018-08-30 11:20:12,490 DEBUG Arguments Namespace(filename='/tmp/92ec5996-0dc8-4293-b5ba-465430811fed.tmp.wav', language='en-US', ssml=None, text='Hi, This is a test message')</div><div>2018-08-30 11:20:12,490 DEBUG synthesize_text requested</div></div><div><br></div><div>The python script executes fine and returns to freeswitch:</div><div><br></div><div><div>2018-08-30 11:20:14.541919 [DEBUG] switch_core_file.c:342 File /tmp/c61d2034-c1b1-4f42-932f-350484553b5a.tmp.wav sample rate 24000 doesn't match requested rate 8000</div><div>2018-08-30 11:20:14.541919 [DEBUG] switch_ivr_play_say.c:2729 Speaking text: Hi, This is a test message</div></div><div><br></div><div>Any help or further debugging steps would be appreciated. </div><div><br></div><div>Thanks </div><div> </div><div>Lee</div></div></div></div></div></div></div></div></div></div></div></div>
<br><br><br>---------- Forwarded message ----------<br>From: Lee Vidor via FreeSWITCH-users <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>Cc: <br>Bcc: <br>Date: Mon, 03 Sep 2018 12:30:09 -0700 (PDT)<br>Subject: [Freeswitch-users] mod_tts_commandline hangs in call flow<br>_________________________________________________________________________<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div></div>