VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
lewis.bergman at gmail... Guest
|
Posted: Tue Mar 02, 2021 1:16 pm Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
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@66.151.243.45] has been answered
2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/
102@66.151.243.45) Callstate Change RINGING -> ACTIVE
2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 entering state [completed][200]
EXECUTE [depth=0] sofia/internal/102@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
2021-02-26 15:19:25.433013 [DEBUG] switch_ivr_play_say.c:2741 Speaking
text: This is an example of using tts_commandline
2021-02-26 15:19:25.433013 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 entering state [ready][200]
2021-02-26 15:19:25.433013 [DEBUG] switch_ivr_play_say.c:2905 done speaking
text
2021-02-26 15:19:25.433013 [NOTICE] switch_core_state_machine.c:386
sofia/internal/102@66.151.243.45 has executed the last dialplan
instruction, hanging up.
2021-02-26 15:19:25.433013 [NOTICE] switch_core_state_machine.c:388 Hangup
sofia/internal/102@66.151.243.45 [CS_EXECUTE] [NORMAL_CLEARING]
The dialplan for extension I am testing looks like this:
<extension name="tts_commandline_test">
<condition field="destination_number" expression="^561$">
<action application="speak" data="tts_commandline|pico|This is
an example of using tts_commandline"/>
</condition>
</extension>
The code lines mentioned in debug seem to be pretty mundane, not that I
really know what I am looking for:
From mod_tts_commnandline line 160:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Executing:
%s\n", message);
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:
if (switch_system(message, SWITCH_TRUE) < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to
execute command: %s\n", message);
ret = SWITCH_STATUS_FALSE; goto done;
}
if (switch_core_file_open(info->fh, info->file, 0, //number_of_channels,
info->rate, //samples_per_second,
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL)
!=SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to
open file: %s\n", info->file);
ret = SWITCH_STATUS_FALSE; goto done;
}
Starting at line 279 in mod_sndfile (sorry for the space formatting):
if (!context->handle) {
if (sndfile_perform_open(context, path, mode, handle) !=
SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Error
Opening File [%s] [%s]\n", path, sf_strerror(context->handle));
status = SWITCH_STATUS_GENERR;
goto end;
}
}
According to the dptools docs
<https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+playback#mod_dptools:playback-3.1>
and libsndfile wav has been supported forever and it would seem highly
unlikely that is an issue. It seems like mod_tts isn't writing the
file but also isn't reporting an error. I have started fresh with two
new containers twice and a full VM once all with the same error
resulting. 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.
Freeswitch version reports: FreeSWITCH Version
1.10.5-release-17-25569c1631~64bit (-release-17-25569c1631 64bit)
FusionPBX version, in case it matters, is : 4.5.21
OS is Debian 10 Buster
--
Lewis Bergman
_________________________________________________________________________
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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com |
|
Back to top |
|
|
lewis.bergman at gmail... Guest
|
Posted: Tue Mar 02, 2021 1:51 pm Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
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@66.151.243.45] has been answered
2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/
102@66.151.243.45) Callstate Change RINGING -> ACTIVE
2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 entering state [completed][200]
EXECUTE [depth=0] sofia/internal/102@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
2021-02-26 15:19:25.433013 [DEBUG] switch_ivr_play_say.c:2741 Speaking
text: This is an example of using tts_commandline
2021-02-26 15:19:25.433013 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 entering state [ready][200]
2021-02-26 15:19:25.433013 [DEBUG] switch_ivr_play_say.c:2905 done speaking
text
2021-02-26 15:19:25.433013 [NOTICE] switch_core_state_machine.c:386
sofia/internal/102@66.151.243.45 has executed the last dialplan
instruction, hanging up.
2021-02-26 15:19:25.433013 [NOTICE] switch_core_state_machine.c:388 Hangup
sofia/internal/102@66.151.243.45 [CS_EXECUTE] [NORMAL_CLEARING]
The dialplan for extension I am testing looks like this:
<extension name="tts_commandline_test">
<condition field="destination_number" expression="^561$">
<action application="speak" data="tts_commandline|pico|This is an
example of using tts_commandline"/>
</condition>
</extension>
The code lines mentioned in debug seem to be pretty mundane, not that I
really know what I am looking for:
From mod_tts_commnandline line 160:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Executing: %s\n",
message);
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:
if (switch_system(message, SWITCH_TRUE) < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to
execute command: %s\n", message);
ret = SWITCH_STATUS_FALSE; goto done;
}
if (switch_core_file_open(info->fh, info->file, 0, //number_of_channels,
info->rate, //samples_per_second,
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) !=
SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open
file: %s\n", info->file);
ret = SWITCH_STATUS_FALSE; goto done;
}
Starting at line 279 in mod_sndfile (sorry for the space formatting):
if (!context->handle) {
if (sndfile_perform_open(context, path, mode, handle) !=
SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Error Opening
File [%s] [%s]\n", path, sf_strerror(context->handle));
status = SWITCH_STATUS_GENERR;
goto end;
}
}
According to the dptools docs
<https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+playback#mod_dptools:playback-3.1>
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.
Freeswitch version reports: FreeSWITCH Version
1.10.5-release-17-25569c1631~64bit (-release-17-25569c1631 64bit)
FusionPBX version, in case it matters, is : 4.5.21
OS is Debian 10 Buster
--
Lewis Bergman
_________________________________________________________________________
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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com |
|
Back to top |
|
|
mayamatakeshi at gmail... Guest
|
Posted: Tue Mar 02, 2021 7:18 pm Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
On Wed, Mar 3, 2021 at 4:12 AM Lewis Bergman <lewis.bergman@gmail.com (lewis.bergman@gmail.com)> wrote:
Quote: | 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@66.151.243.45 (102@66.151.243.45)] has been answered
2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/
102@66.151.243.45 (102@66.151.243.45)) Callstate Change RINGING -> ACTIVE
2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 (102@66.151.243.45) entering state [completed][200]
EXECUTE [depth=0] sofia/internal/102@66.151.243.45 (102@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) |
|
Back to top |
|
|
dragos at freeswitch.org Guest
|
Posted: Wed Mar 03, 2021 2:54 am Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
If the wav file exists but is 0 size, mod_sndfile would say this:mod_sndfile.c:281 Error Opening File [/tmp/foo.wav] [File contains data in an unknown format.]
So yes, most likely text2wave is not installed.
On Wed, Mar 3, 2021 at 1:13 AM mayamatakeshi <mayamatakeshi@gmail.com (mayamatakeshi@gmail.com)> wrote:
Quote: |
On Wed, Mar 3, 2021 at 4:12 AM Lewis Bergman <lewis.bergman@gmail.com (lewis.bergman@gmail.com)> wrote:
Quote: | 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@66.151.243.45 (102@66.151.243.45)] has been answered
2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/
102@66.151.243.45 (102@66.151.243.45)) Callstate Change RINGING -> ACTIVE
2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 (102@66.151.243.45) entering state [completed][200]
EXECUTE [depth=0] sofia/internal/102@66.151.243.45 (102@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@freeswitch.com (sales@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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com |
|
|
Back to top |
|
|
lewis.bergman at gmail... Guest
|
Posted: Thu Mar 04, 2021 2:36 pm Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
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@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@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@gmail.com> wrote:
Quote: |
On Wed, Mar 3, 2021 at 4:12 AM Lewis Bergman <lewis.bergman@gmail.com> wrote:
Quote: |
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@66.151.243.45] has been answered
2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/
102@66.151.243.45) Callstate Change RINGING -> ACTIVE
2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 entering state [completed][200]
EXECUTE [depth=0] sofia/internal/102@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@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@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
_________________________________________________________________________
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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com |
|
Back to top |
|
|
brian at freeswitch.com Guest
|
Posted: Thu Mar 04, 2021 3:11 pm Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
$PATH might be a thing? Try the full path to the binary?
On Thu, Mar 4, 2021 at 1:36 PM Lewis Bergman <lewis.bergman@gmail.com (lewis.bergman@gmail.com)> wrote:
Quote: | 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@66.151.243.45 (102@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@66.151.243.45 (102@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@gmail.com (mayamatakeshi@gmail.com)> wrote:
Quote: |
On Wed, Mar 3, 2021 at 4:12 AM Lewis Bergman <lewis.bergman@gmail.com (lewis.bergman@gmail.com)> wrote:
Quote: |
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@66.151.243.45 (102@66.151.243.45)] has been answered
2021-02-26 15:19:24.713040 [DEBUG] switch_channel.c:3865 (sofia/internal/
102@66.151.243.45 (102@66.151.243.45)) Callstate Change RINGING -> ACTIVE
2021-02-26 15:19:24.713040 [DEBUG] sofia.c:7326 Channel sofia/internal/
102@66.151.243.45 (102@66.151.243.45) entering state [completed][200]
EXECUTE [depth=0] sofia/internal/102@66.151.243.45 (102@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@freeswitch.com (sales@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@lists.freeswitch.org (FreeSWITCH-users@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
_________________________________________________________________________
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@freeswitch.com (sales@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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com |
--
Brian West | Co-founder and Developer
Need Commercial support? email sales@freeswitch.com (sales@freeswitch.com)
FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
Email: brian@freeswitch.com (brian@freeswitch.com)
Mobile: 918-424-9378
Website: https://www.FreeSWITCH.com
[/url] [url=https://twitter.com/freeswitch] |
|
Back to top |
|
|
mayamatakeshi at gmail... Guest
|
Posted: Thu Mar 04, 2021 7:15 pm Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
On Fri, Mar 5, 2021 at 4:41 AM Lewis Bergman <lewis.bergman@gmail.com (lewis.bergman@gmail.com)> wrote:
Quote: | 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@66.151.243.45 (102@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@66.151.243.45 (102@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. |
Working with mod_unimrcp should be simple.
But maybe this can be of help:
https://github.com/MayamaTakeshi/mrcp_client
It is a node.js app that I wrote to test mrcp servers.
I don't know which MRCP server you are using (maybe unimrcp?).
But you could make requests directly to it and check if it's working as expected without having to deal with FS.
Then once things are cleared up you can work on the FS configuration.
Also, if you want to get down checking SIP/MRCP messages, you could use this sngrep fork:
https://github.com/MayamaTakeshi/sngrep/tree/mrcp_support
(this is a patch that I wrote to support MRCP on sngrep, but this will not be merged to upstream as sngrep main branch is only accepting bug fixes right now: https://github.com/irontec/sngrep/pull/346) so you would need to build it yourself. |
|
Back to top |
|
|
lewis.bergman at gmail... Guest
|
Posted: Fri Mar 05, 2021 2:40 pm Post subject: [Freeswitch-users] mod_sndfile error called from mod_tts_com |
|
|
Thanks so much! That is very helpful info. Let me create a new thread
for this and explain what I have done so far.
On Thu, Mar 4, 2021 at 5:48 PM mayamatakeshi <mayamatakeshi@gmail.com> wrote:
Quote: |
On Fri, Mar 5, 2021 at 4:41 AM Lewis Bergman <lewis.bergman@gmail.com> wrote:
Quote: |
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@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@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.
|
Working with mod_unimrcp should be simple.
But maybe this can be of help:
https://github.com/MayamaTakeshi/mrcp_client
It is a node.js app that I wrote to test mrcp servers.
I don't know which MRCP server you are using (maybe unimrcp?).
But you could make requests directly to it and check if it's working as expected without having to deal with FS.
Then once things are cleared up you can work on the FS configuration.
Also, if you want to get down checking SIP/MRCP messages, you could use this sngrep fork:
https://github.com/MayamaTakeshi/sngrep/tree/mrcp_support
(this is a patch that I wrote to support MRCP on sngrep, but this will not be merged to upstream as sngrep main branch is only accepting bug fixes right now: https://github.com/irontec/sngrep/pull/346) so you would need to build it yourself.
_________________________________________________________________________
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@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@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
_________________________________________________________________________
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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|