Hello list. I try to use espeak app with subject Asterisk version. It compile OK but when I try to load the app I get
Error loading module ‘app_espeak.so’: /usr/lib/asterisk/modules/app_espeak.so: undefined symbol: src_short_to_float_array
I opened a bug few monthes ago at zaf@github, no reply.
Does anyone use successfully this app with Asterisk ? Is an alternative existing (appart of google-tts) for non english languages ?
Thanks for any hint
Do you have libsamplerate on your system? That function seems to be a dependency from that library: libsamplerate::samplerate::src_short_to_float_array - Rust
Here we using google-tts to do it for Portuguese Language.
libsamplerate0/stable,now 0.2.1+ds0-1 amd64 [installé]
OK, I understand my mistake. I copy app_espeak.c in asterisk/apps and ran make install which doen’t link with necessary libraries like libsample.
When I run make in the app_espeak directory with the included makefile, ldd shows all linked libraries. Problem is that now asterisk don´t want to load the module, I receive
zone-s*CLI> module load app_espeak.so
Unable to load module app_espeak.so
Command ‘module load app_espeak.so’ failed.
[2022-08-18 15:07:57] ERROR: loader.c:283 module_load_error: Module ‘app_espeak.so’ was not compiled with the same compile-time options as this version of Asterisk.
[2022-08-18 15:07:57] ERROR: loader.c:283 module_load_error: Module ‘app_espeak.so’ will not be initialized as it may cause instability.
[2022-08-18 15:07:57] ERROR: loader.c:283 module_load_error: Module ‘app_espeak.so’ could not be loaded
Is there a way to tell asterisk to accept to load the module even if compile-time options are not the same ?
I am not positive, but you may also need to modify the Makefile in the apps directory to actually have the build process link the module with the required library. Take a look at it, there are some examples showing how you would do this.
Taking a look at that module, it seems to be somewhat outdated and it’s not clear if it’s even still being maintained.
The provided Makefile seems to replicate some of the things that the regular Asterisk build process does and this seems rather hacky to me. It could be out of sync with the current Makefile used to compile other stuff. The better way to do it is probably drop the module into the apps directory and modify the actual apps Makefile as I indicated above. If you then run make and make install, I don’t think you’d have this issue.
In summary, try dropping the module into /apps directory, and then add an entry in the Makefile with these linking flags:
I already did something like that. I add in asterisk makefile
else ifeq ($(GREP),
still no library linked.
I didn’t say to modify the main Asterisk makefile. I said to modify the apps Makefile, with an entry for this particular module.
Than I wasn’t clear with my message 2 hours ago: compiling with the makefile included with the source module is working perfectly. ldd shows
root@zone-s:/home/dh/zaf-Asterisk-eSpeak-7431b8d# ldd app_espeak.so
libespeak-ng.so.1 => /usr/lib/x86_64-linux-gnu/libespeak-ng.so.1 (0x00007f8b4061f000)
libsamplerate.so.0 => /usr/lib/x86_64-linux-gnu/libsamplerate.so.0 (0x00007f8b404b0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8b402eb000)
aso. Problem is that asterisk don´t want to load the module as explained in previous message (compile-time options error)
I got that part. Like I said, it’s possible there is a discrepancy between the compile time options used. I suggest trying to do it the way I said and see what happens, to ensure that different build options are not used. I don’t have anything else to say for now.
Thanks to your explanation I got it \o/:
core show applications
eSpeak: Say text to the user, using eSpeak speech synthesizer
I copied the .c file in apps directory, comment #define AST_MODULE “eSpeak”, add
#define AST_MODULE_SELF_SYM __internal_app_espeak_self before #include “asterisk.h”
and then modified the Makefile in this directory by adding at the end
LIBS+= -lespeak-ng -lsamplerate
Many thanks for your help and support
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.