<div dir="ltr">Hello all. I am pretty new to Freeswitch and have an experimental container on Proxmox 6.3 Debian 10 to play with. The goal is to get mod_unimrcp working. To that end, I have mod_tts_commandline (installed from binary with FusionPBX as part of the default install) listed in modules.conf.xml<div><font face="monospace">/etc/freeswitch/autoload_configs/modules.conf.xml</font></div><div><font face="monospace">                <!-- Speech Recognition / Text to Speech --><br>                <load module="mod_unimrcp"/><br>                <load module="mod_tts_commandline"/></font></div><div>                             <font face="monospace"><load module="mod_flite"/><br></font></div><div><font face="arial, sans-serif">I have tried it with and without mod_flite enabled.</font></div><div><font face="arial, sans-serif">Mod_tts_commandline refuses to pull a sound file and the debug log seems to blame mod_sndfile. This is using the example from the <a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_tts_commandline#mod_tts_commandline-Configuringmod_tts_commandline">mod_tts_commandline  page</a> as dialplan shows following the debug log output below:</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="monospace">2021-02-26 15:19:24.713040 [NOTICE] mod_dptools.c:1406 Channel [sofia/internal/<a href="mailto:102@66.151.243.45">102@66.151.243.45</a>] has been answered<br>2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/<a href="mailto:102@66.151.243.45">102@66.151.243.45</a>) Callstate Change RINGING -> ACTIVE<br>2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/<a href="mailto:102@66.151.243.45">102@66.151.243.45</a> entering state [completed][200]<br>EXECUTE [depth=0] sofia/internal/<a href="mailto:102@66.151.243.45">102@66.151.243.45</a> speak(tts_commandline|pico|This is an example of using tts_commandline)<br>2021-02-26 15:19:24.713040 [DEBUG] switch_ivr_play_say.c:3023 OPEN TTS tts_commandline<br>2021-02-26 15:19:24.713040 [DEBUG] switch_ivr_play_say.c:3033 Raw Codec Activated<br><span style="background-color:rgb(255,255,0)">2021-02-26 15:19:24.713040 [DEBUG] mod_tts_commandline.c:160 Executing: echo 'This is an example of using tts_commandline' | text2wave -f 8000 > '/tmp/0665a30d-2bb8-40fe-b5a6-9625bd58306e.tmp.wav'<br>2021-02-26 15:19:25.433013 [WARNING] mod_sndfile.c:281 Error Opening File [/tmp/0665a30d-2bb8-40fe-b5a6-9625bd58306e.tmp.wav] [File contains data in an unknown format.]</span><br>2021-02-26 15:19:25.433013 [ERR] mod_tts_commandline.c:170 Failed to open file: /tmp/0665a30d-2bb8-40fe-b5a6-9625bd58306e.tmp.wav<br>2021-02-26 15:19:25.433013 [DEBUG] switch_ivr_play_say.c:2741 Speaking text: This is an example of using tts_commandline<br>2021-02-26 15:19:25.433013 [DEBUG] sofia.c:7326 Channel sofia/internal/<a href="mailto:102@66.151.243.45">102@66.151.243.45</a> entering state [ready][200]<br>2021-02-26 15:19:25.433013 [DEBUG] switch_ivr_play_say.c:2905 done speaking text<br>2021-02-26 15:19:25.433013 [NOTICE] switch_core_state_machine.c:386 sofia/internal/<a href="mailto:102@66.151.243.45">102@66.151.243.45</a> has executed the last dialplan instruction, hanging up.<br>2021-02-26 15:19:25.433013 [NOTICE] switch_core_state_machine.c:388 Hangup sofia/internal/<a href="mailto:102@66.151.243.45">102@66.151.243.45</a> [CS_EXECUTE] [NORMAL_CLEARING]<br></font><div><div><br></div><div>The dialplan for extension I am testing looks like this:</div><div><font face="monospace"><extension name="tts_commandline_test"><br>   <condition field="destination_number" expression="^561$"><br>      <action application="speak" data="tts_commandline|pico|This is an example of using tts_commandline"/><br>   </condition><br></extension></font><br></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">The code lines mentioned in debug seem to be pretty mundane, not that I really know what I am looking for:</font></div><div><font face="arial, sans-serif">From mod_tts_commnandline line 160:</font></div><div><font face="monospace">switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Executing: %s\n", message);</font><font face="arial, sans-serif"><br></font></div><div>I tried setting the /tmp directory to 777 but that didn't help and the error output was identical. mod_tts_commandline never reports an error on creation and it looks like the next part of of mod_tts_commandline would print an error if it did like this:<font face="monospace"><br></font></div><div><font face="monospace">if (switch_system(message, SWITCH_TRUE) < 0) {<br>    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "<span style="background-color:rgb(255,255,0)">Failed to execute command</span>: %s\n", message);<br>    ret = SWITCH_STATUS_FALSE; goto done;<br>  }<br>if (switch_core_file_open(info->fh, info->file, 0,     //number_of_channels,<br>    info->rate,     //samples_per_second,</font></div><div><font face="monospace">    SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {<br>    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "<span style="background-color:rgb(255,255,0)">Failed to open file</span>: %s\n", info->file);<br>    ret = SWITCH_STATUS_FALSE; goto done;<br> }</font><br></div><div><font face="monospace"><br></font></div><div>Starting at line 279 in mod_sndfile (sorry for the space formatting):</div><div><br></div><div><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container" style="border-spacing:0px;border-collapse:collapse;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td id="gmail-LC279" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"><span class="gmail-pl-k" style="box-sizing:border-box">if</span> (!context-><span class="gmail-pl-smi" style="box-sizing:border-box">handle</span>) {</td></tr><tr style="box-sizing:border-box;background-color:initial"><td id="gmail-L280" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50.1425px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="gmail-LC280" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"><span class="gmail-pl-k" style="box-sizing:border-box">if</span> (<span class="gmail-pl-c1" style="box-sizing:border-box">sndfile_perform_open</span>(context, path, mode, handle) != SWITCH_STATUS_SUCCESS) {</td></tr><tr style="box-sizing:border-box"><td id="gmail-L281" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50.1425px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="gmail-LC281" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">        <span class="gmail-pl-c1" style="box-sizing:border-box">switch_log_printf</span>(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, <span class="gmail-pl-s" style="box-sizing:border-box"><span class="gmail-pl-pds" style="box-sizing:border-box">"</span>Error Opening File [<span class="gmail-pl-c1" style="box-sizing:border-box">%s</span>] [<span class="gmail-pl-c1" style="box-sizing:border-box">%s</span>]<span class="gmail-pl-cce" style="box-sizing:border-box">\n</span><span class="gmail-pl-pds" style="box-sizing:border-box">"</span></span>, path, <span class="gmail-pl-c1" style="box-sizing:border-box">sf_strerror</span>(context-><span class="gmail-pl-smi" style="box-sizing:border-box">handle</span>));</td></tr><tr style="box-sizing:border-box;background-color:initial"><td id="gmail-L282" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50.1425px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="gmail-LC282" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">       status = SWITCH_STATUS_GENERR;</td></tr><tr style="box-sizing:border-box"><td id="gmail-L283" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50.1425px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="gmail-LC283" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"> <span class="gmail-pl-k" style="box-sizing:border-box">goto</span> end;</td></tr><tr style="box-sizing:border-box;background-color:initial"><td id="gmail-L284" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50.1425px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="gmail-LC284" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">}</td></tr><tr style="box-sizing:border-box"><td id="gmail-L285" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50.1425px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="gmail-LC285" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">}</td></tr></tbody></table></div><div><br></div><div>According to the <a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+playback#mod_dptools:playback-3.1">dptools docs</a> and libsndfile wav has been supported forever and it would seem highly unlikely that is an issue. I check the /tmp directory and no files are present but I don't know if they are being deleted by some cleanup process or just not created. Not knowing C, it seems like mod_sndfile never received a file handle but that is just a guess. Other Freeswitch apps are writing to the /tmp directory (at least there are some files in there).  Maybe someone sees an error from mod_tts_commandline I don't see or knows I am doing something stupid. Any help would be appreciated. I only found 2 references to the error in the mail history and neither had anything to do with a similar issue.</div><div><br></div><div>Freeswitch version reports: FreeSWITCH Version 1.10.5-release-17-25569c1631~64bit (-release-17-25569c1631 64bit)</div><div>FusionPBX version, in case it matters, is : <span style="color:rgb(0,0,0);font-family:arial;font-size:12px">4.5.21</span></div><div>OS is Debian 10 Buster</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Lewis Bergman</div></div></div></div></div>