Looking at the source code it seems that this is not currently possible. One might be able to modify the code to do this but it would take a little bit of time. You might want to ask Mathieu Parent (tts_commandline author) if he has any suggestions.<div>
<br></div><div>Another option, depending upon what the circumstances are, is you could use the "system" command to launch swift -f and record it to a wav, and then use "playback" to play the wav file.</div>
<div><br></div><div>-MC <br><br><div class="gmail_quote">On Sat, Dec 11, 2010 at 12:04 AM, phone.bytes <span dir="ltr"><<a href="mailto:phone.bytes@gmail.com">phone.bytes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000">
okay MC, mod_tts_commandline has run for a several days without a
problem. Good.<br>
<br>
However, now we are trying to get this to speak from a text file
instead of putting text on the command line.<br>
Cepstral Swift has a -f option to do this, but it does not work
here. <br>
<br>
I have looked through the source, and am wondering if this is not
supported in this mod.<br>
<br>
Here is a partial trace that I think supports my conclusions below.<br>
<br>
EXECUTE FreeTDM/1:1/7878030
speak(tts_commandline|Callie|-f/tmp/test.txt)<br>
2010-12-11 00:26:58.683522 [DEBUG] switch_ivr_play_say.c:2237 OPEN
TTS tts_commandline<br>
2010-12-11 00:26:58.683522 [DEBUG] switch_ivr_play_say.c:2246 Raw
Codec Activated<br>
2010-12-11 00:26:58.683522 [DEBUG] mod_tts_commandline.c:147
Executing: swift -p audio/sampling-rate=8000 -n 'Callie'
'-f/tmp/test.txt' -o
'/tmp/bd5bb8db-ffc2-4830-a971-24a1454c725c.tmp.wav'<br>
2010-12-11 00:26:58.696525 [ERR] mod_sndfile.c:194 Error Opening
File [/tmp/bd5bb8db-ffc2-4830-a971-24a1454c725c.tmp.wav] [System
error : No such file or directory.]<br>
2010-12-11 00:26:58.696525 [ERR] mod_tts_commandline.c:157 Failed to
open file: /tmp/bd5bb8db-ffc2-4830-a971-24a1454c725c.tmp.wav<br>
2010-12-11 00:26:58.696525 [DEBUG] switch_ivr_play_say.c:1935
Speaking text: -f/tmp/test.txt<br>
2010-12-11 00:26:59.097509 [DEBUG] switch_ivr_play_say.c:2127 done
speaking text<br>
<br>
It seems to almost build the swift command correctly. However, the
-f options is inside the single quotes, instead of outside of them
like the -o (output file) is.<br>
<br>
I don't think it is finding the .txt file, as the log later shows
that it is trying to speak the filename including the -f option,
instead of the contents of the file.<br>
<br>
What do you think?<br>
<br>
Thanks<div class="im"><br>
<br>
<br>
<br>
On 12/7/2010 2:17 PM, Michael Collins wrote:
<blockquote type="cite">Can you try the mod_tts_commandline way of doing it?
The wiki talks about using Cepstral IIRC.
<div>-MC<br>
<br>
<div class="gmail_quote">On Tue, Dec 7, 2010 at 1:12 PM, Phone <span dir="ltr"><<a href="mailto:phone.bytes@gmail.com" target="_blank">phone.bytes@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Just wondering if you have had any luck
in resolving this issue.<br>
<br>
We are running Cent 5.5 on FreeSWITCH Version 1.0.head
(git-8825b6e<br>
2010-11-28 17-15-39 -0500) with Cepstral 5.1 with the Callie
voice.<br>
<br>
We have good audio for a short period of time, then suddenly
the audio<br>
is gone. Watching the logs, it show that it is trying to
play the<br>
correct TTS, but it is silent.<br>
<br>
We have tried to unload and reload mod_cepstral, but the
only way we<br>
have been able to restore the audio is with a FreeSWITCH
restart.<br>
<br>
These voices sound good, but with these issues, it is really
not useable.<br>
<br>
Any Ideas? Thanks<br>
<br>
<br>
<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>