[Freeswitch-users] mod_sndfile error called from mod_tts_commandline - [WARNING] mod_sndfile.c:281 Error Opening File

Lewis Bergman lewis.bergman at gmail.com
Thu Mar 4 13:02:29 UTC 2021


That was exactly it for the record.
#which text2wave
#                         <-- before apt-get install festival
#which text2wave
/usr/bin/text2wave
# echo 'This is an example of using tts_commandline' | text2wave -f
8000 > test.wav
# file test.wav
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16
bit, mono 8000 Hz
# ls -l test.wav
-rw-r--r-- 1 root root 60208 Mar  4 06:44 test.wav
And the freeswitch debug log that shows it works:
EXECUTE [depth=0] sofia/internal/102 at 66.151.243.45
speak(tts_commandline|text2wave|This is an example of using
tts_commandline)
2021-03-04 06:59:14.305216 [DEBUG] switch_ivr_play_say.c:3023 OPEN TTS
tts_commandline
2021-03-04 06:59:14.305216 [DEBUG] switch_ivr_play_say.c:3033 Raw
Codec Activated
2021-03-04 06:59:14.305216 [DEBUG] mod_tts_commandline.c:160
Executing: echo 'This is an example of using tts_commandline' |
text2wave -f 8000 >
'/tmp/05e71313-2a4d-48ce-a1e9-84600859112f.tmp.wav'
2021-03-04 06:59:15.545212 [DEBUG] switch_ivr_play_say.c:2741 Speaking
text: This is an example of using tts_commandline
2021-03-04 06:59:15.545212 [DEBUG] sofia.c:7326 Channel
sofia/internal/102 at 66.151.243.45 entering state [ready][200]
2021-03-04 06:59:15.565210 [DEBUG] switch_rtp.c:7759 Correct audio
ip/port confirmed.
2021-03-04 06:59:19.305225 [DEBUG] switch_ivr_play_say.c:2905 done speaking text

Thanks for the help.
The reason I tried to start with tts_commandine is I have been
struggling for a couple of weeks to get MRCP to produce something
useful so I thought I would try something simpler and I could swear
mod_tts_commandline was listed as a requirement. But it could have
been on something else as I have been pouring through every document I
can find to figure this out and I probably got confused.
Thanks again!

On Tue, Mar 2, 2021 at 6:36 PM mayamatakeshi <mayamatakeshi at gmail.com> wrote:
>
>
>
> On Wed, Mar 3, 2021 at 4:12 AM Lewis Bergman <lewis.bergman at gmail.com> wrote:
>>
>> 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
>> /etc/freeswitch/autoload_configs/modules.conf.xml
>>                 <!-- Speech Recognition / Text to Speech -->
>>                 <load module="mod_unimrcp"/>
>>                 <load module="mod_tts_commandline"/>
>>                 <load module="mod_flite"/>
>> I have tried it with and without mod_flite enabled.
>> 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 mod_tts_commandline
>> page
>> <https://freeswitch.org/confluence/display/FREESWITCH/mod_tts_commandline#mod_tts_commandline-Configuringmod_tts_commandline>
>> as dialplan shows following the debug log output below:
>>
>> 2021-02-26 15:19:24.713040 [NOTICE] mod_dptools.c:1406 Channel
>> [sofia/internal/102 at 66.151.243.45] has been answered
>> 2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/
>> 102 at 66.151.243.45) Callstate Change RINGING -> ACTIVE
>> 2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/
>> 102 at 66.151.243.45 entering state [completed][200]
>> EXECUTE [depth=0] sofia/internal/102 at 66.151.243.45
>> speak(tts_commandline|pico|This is an example of using tts_commandline)
>> 2021-02-26 15:19:24.713040 [DEBUG] switch_ivr_play_say.c:3023 OPEN TTS
>> tts_commandline
>> 2021-02-26 15:19:24.713040 [DEBUG] switch_ivr_play_say.c:3033 Raw Codec
>> Activated
>> 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'
>> 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.]
>> 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
>
>
> Since your goal is to use mod_unimrcp I think you should not spend your time with mod_tts_commandline.
> Anyway, what do you get when you run these in the bash shell:
>
> which text2wave
> echo 'This is an example of using tts_commandline' | text2wave -f 8000 > test.wav
> file test.wav
> ls -l test.wav
>
> Did you install festival? (text2wave comes with it)
>
>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com



-- 
Lewis Bergman
325-439-0533 Cell



More information about the FreeSWITCH-users mailing list