app_swift icon indicating copy to clipboard operation
app_swift copied to clipboard

app_swift.c: Failed to set voice

Open hughmcl opened this issue 12 years ago • 13 comments

I've verified everything, can't work out what is wrong:-

swift --voices

Voice Version Lic? Gender Age Language Sample Rate
Allison 5.1.0 Yes Female 28 US English 16000 Hz

/etc/asterisk/swift.conf voice=Allison

[2013-02-25 06:55:38] VERBOSE[18887] pbx.c: == Registered application 'Swift' [2013-02-25 06:55:38] VERBOSE[18887] config.c: == Parsing '/etc/asterisk/swift.conf': [2013-02-25 06:55:38] VERBOSE[18887] config.c: == Found [2013-02-25 06:55:38] DEBUG[18887] app_swift.c: Config buffer_size is 65535 [2013-02-25 06:55:38] DEBUG[18887] app_swift.c: Config goto_exten is 0 [2013-02-25 06:55:38] DEBUG[18887] app_swift.c: Config voice is Allison [2013-02-25 06:55:38] VERBOSE[18887] loader.c: app_swift.so => (Cepstral Swift TTS Application) [2013-02-25 06:55:55] VERBOSE[18955] pbx.c: -- Executing [1234@from-internal:1] Set("SIP/301-00000000", "SWIFT_VOICE=Allison") in new stack [2013-02-25 06:55:55] VERBOSE[18955] pbx.c: -- Executing [1234@from-internal:2] Swift("SIP/301-00000000", "Congratulations! You have installed Cepstral.") in new stack [2013-02-25 06:55:55] DEBUG[18955] app_swift.c: Text to Speak : Congratulations! You have installed Cepstral. [2013-02-25 06:55:55] ERROR[18955] app_swift.c: Failed to set voice.

swift -n "Allison" -o test.wav "This is a test"

-> works and generates test.wav

CentOS release 5.8 (Final)

Connected to Asterisk 1.8.15-cert1

hughmcl avatar Feb 25 '13 05:02 hughmcl

to confirm, this happens whether or not you set SWIFT_VOICE, correct ?

jkister avatar Feb 28 '13 22:02 jkister

Yes, I've tried both with and without the SWIFT_VOICE variable. Same result.

hughmcl avatar Feb 28 '13 22:02 hughmcl

can you post the unedited output of 'cat /etc/asterisk/swift.conf' ? also, 'swift -V' and 'asterisk -rx "core show application swift"'

jkister avatar Mar 05 '13 17:03 jkister

/etc/asterisk/swift.com

[general] ; buffer_size ; default: 65535 ; ; Number of bytes of audio data to buffer from the Swift libraries. ; app_swift will allocate this much buffer space for each concurrent running ; swift app call. ; ; A larger buffer allows the swift lib to generate audio and complete sonner, ; reducing the amount of time we keep the swift port open (consuming a swift ; concurrency license). ; You should tune this based on the lenth of things you're having swift speak, ; how much memory you can afford to burn. ; ; 8192 (8kbytes) is a practical minumum ; You need 8000 bytes to get a second of buffering buffer_size=65535

; goto_exten ; default: no ; ; When we get DTMF while swift is speaking, we set ${SWIFT_DTMF} channel variable. ; If you would also like the swift application to goto the extension indicated ; by the user's keypress, set this to yes. goto_exten=no

; voice ; default: Allison-8kHz ; ; Set the voice you want swift to use; If the voice you specify is not found, ; swift will automatically use the default voice it is configured with. ;;;voice=Allison-8kHz voice=Allison

swift -V

swift -V

Cepstral Swift v5.1.0, July 2008

Default Voice: Allison v5.1.0 Language: US English v5.1.0 Lexicon: unknown v0.0.0

Concurrency: License Server Unreachable Running in Single Token Mode

Copyright (C) 2000-2006, Cepstral LLC.

asterisk -rx 'core show application swift'

-= Info about application 'Swift' =-

[Synopsis] Not available

[Description] Not available

[Syntax] Not available

[Arguments] Not available

[See Also] Not available

                   Hugh

Date: Tue, 5 Mar 2013 09:22:09 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [app_swift] app_swift.c: Failed to set voice (#6)

can you post the unedited output of /etc/asterisk/swift.conf ? also, swift -V and asterisk -rx 'core show application swift'

— Reply to this email directly or view it on GitHub.

hughmcl avatar Mar 08 '13 05:03 hughmcl

Hi,

we have the same issue here. Perhaps the following strace output may help for further investigation. Imho this looks like some kind of version incompatibility.

[pid 29949] write(1, "Config voice is Katrin via SWIFT_VOICE\n", 39) = 39 [pid 29949] open("/etc/ld.so.cache", O_RDONLY) = 23 [pid 29949] fstat(23, {st_mode=S_IFREG|0644, st_size=71352, ...}) = 0 [pid 29949] mmap(NULL, 71352, PROT_READ, MAP_PRIVATE, 23, 0) = 0x7f12a5e02000 [pid 29949] close(23) = 0 [pid 29949] open("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id 29949] fstat(23, {st_mode=S_IFREG|0775, st_size=179335, ...}) = 0 [pid 29949] mmap(NULL, 2175800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 23, 0) = 0x7f128db72000 [pid 29949] fadvise64(23, 0, 2175800, POSIX_FADV_WILLNEED) = 0 [pid 29949] mprotect(0x7f128db83000, 2097152, PROT_NONE) = 0 [pid 29949] mmap(0x7f128dd83000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 23, 0x11000) = 0x7f128dd83000 [pid 29949] close(23) = 0 [pid 29949] munmap(0x7f12a5e02000, 71352) = 0 [pid 29949] munmap(0x7f128db72000, 2175800) = 0 [pid 29949] write(2, "Failed to load library libceplang_de.so due to: /opt/swift/lib/libceplang_de.so: undefined symbol: cst_rx_int\n", 110) = 110 [pid 29949] open("/etc/ld.so.cache", O_RDONLY) = 23 [pid 29949] fstat(23, {st_mode=S_IFREG|0644, st_size=71352, ...}) = 0 [pid 29949] mmap(NULL, 71352, PROT_READ, MAP_PRIVATE, 23, 0) = 0x7f12a5e02000 [pid 29949] close(23) = 0 [pid 29949] open("/opt/swift/lib/libceplex_de.so", O_RDONLY) = 23 [pid 29949] read(23, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220b\0\0\0\0\0\0@\0\0\0\0\0\0\0\30U\t\0\0\0\0\0\0\0\0\0@\0008\0\5\0@\0%\0"\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\327\10\0\0\0\0\0\f\327\10\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\0\340\10\0\0\0\0\0\0\340(\0\0\0\0\0\0\340(\0\0\0\0\0X\37\0\0\0\0\0\0`\37\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0\0\370\10\0\0\0\0\0\0\370(\0\0\0\0\0\0\370(\0\0\0\0\0\320\1\0\0\0\0\0\0\320\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0P\345td\4\0\0\0\210\325\10\0\0\0\0\0\210\325\10\0\0\0\0\0\210\325\10\0\0\0\0\0L\0\0\0\0\0\0\0L\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0Q\345td\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\0\0\0\0%\0\0\0=\0\0\0\0\0\0\0001\0\0\0\21\0\0\0-\0\0\0/\0\0\0\0\0\0\0.\0\0\0%\0\0\0\5\0\0\0\35\0\0\0(\0\0\0002\0\0\0;\0\0\0\r\0\0\0\0\0\0\0:\0\0\0\26\0\0\0+\0\0\0007\0\0\0<\0\0\0\0\0\0\0\0\0\0\0008\0\0\0003\0\0\0*\0\0\0\10\0\0\0\0\0\0\0\22\0\0\0009\0\0\0\27\0\0\0\30\0\0\0000\0\0\0,\0\0\0004\0\0\0006\0\0\0)\0\0\0"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832 [pid 29949] fstat(23, {st_mode=S_IFREG|0775, st_size=618489, ...}) = 0 [pid 29949] mmap(NULL, 2686816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 23, 0) = 0x7f128daf6000 [pid 29949] fadvise64(23, 0, 2686816, POSIX_FADV_WILLNEED) = 0 [pid 29949] mprotect(0x7f128db84000, 2097152, PROT_NONE) = 0 [pid 29949] mmap(0x7f128dd84000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 23, 0x8e000) = 0x7f128dd84000 [pid 29949] close(23) = 0 [pid 29949] munmap(0x7f12a5e02000, 71352) = 0 [pid 29949] munmap(0x7f128daf6000, 2686816) = 0 [pid 29949] write(2, "Failed to load library libceplex_de.so due to: /opt/swift/lib/libceplex_de.so: undefined symbol: item_prev\n", 107) = 107 [pid 29949] write(2, "Failed to load language / lexical libraries for Katrin\n", 55) = 55 [pid 29949] gettid() = 29949 [pid 29949] write(4, "[Apr 29 14:11:23] ERROR[29949] app_swift.c: Failed to set voice.\n", 65) = 65 [pid 29949] gettid() = 29949 [pid 29949] write(1, "[Apr 29 14:11:23] \33[31;40mERROR\33[0;37;40m[29949]: \33[1;37;40mapp_swift.c\33[0;37;40m:\33[1;37;40m404\33[0;37;40m \33[1;37;40mapp_exec\33[0;37;40m: ", 136) = 136 [pid 29949] write(1, "Failed to set voice.\n", 21) = 21 [pid 29949] brk(0x7ca000) = 0x7ca000

alex-eoi avatar Apr 29 '13 12:04 alex-eoi

well that's an informative error; it points to a library problem.

what's the output of cat /etc/ld.so.conf ?

jkister avatar Apr 29 '13 14:04 jkister

Hi,

cat /etc/ld.so.conf /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/lib64/Xaw3d /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/lib/Xaw3d /usr/x86_64-suse-linux/lib /usr/local/lib /opt/kde3/lib /usr/local/lib64 /opt/kde3/lib64 /lib64 /lib /usr/lib64 /usr/lib include /etc/ld.so.conf.d/*.conf

and

cat /etc/ld.so.conf.d/swift.conf /opt/swift/lib/

ldconfig gives the following message:

ldconfig ldconfig: /opt/swift/lib/libceplex_de.so.5 is not a symbolic link

ldconfig: /opt/swift/lib/libswift.so.5 is not a symbolic link

ldconfig: /opt/swift/lib/libceplang_de.so.5 is not a symbolic link

echo $? 0

alex-eoi avatar Apr 29 '13 14:04 alex-eoi

can you ls -la /opt/swift/lib ? i might be barking up the wrong tree, but...

jkister avatar Apr 29 '13 21:04 jkister

ls -la /opt/swift/lib/ total 8540 drwxr-xr-x 2 root root 4096 Nov 26 2010 . drwxr-xr-x 10 root root 4096 Nov 26 2010 .. -rwxrwxr-x 1 root root 179335 Jul 8 2008 libceplang_de.so -rwxrwxr-x 1 root root 179335 Jul 8 2008 libceplang_de.so.5 -rwxrwxr-x 1 root root 179335 Jul 8 2008 libceplang_de.so.5.1 -rwxrwxr-x 1 root root 618489 Jul 8 2008 libceplex_de.so -rwxrwxr-x 1 root root 618489 Jul 8 2008 libceplex_de.so.5 -rwxrwxr-x 1 root root 618489 Jul 8 2008 libceplex_de.so.5.1 -rwxrwxr-x 1 root root 2100418 Jul 8 2008 libswift.so -rwxrwxr-x 1 root root 2100418 Jul 8 2008 libswift.so.5 -rwxrwxr-x 1 root root 2100418 Jul 8 2008 libswift.so.5.1

alex-eoi avatar Apr 30 '13 08:04 alex-eoi

Hi all,

I am with Cepstral. This "Failed to set voice" can be caused by 3 things.

  1. Failing to set the voice. swift --voice names must match exactly with /etc/asterisk/swift.conf
  2. Linking problems. Failing to run ldconfig successfully. be sure you have run sudo echo "/opt/swift/lib" > /etc/ld.so.conf.d/swift.conf; ldconfig
  3. Conflict with app_festival.so. I suggest moving /usr/lib/asterisk/modules/app_festival.so /usr/lib/asterisk/modules/app_festival.so.bak. then asterisk -rx "core restart now"

You can find some of these answers on the Cepstral website. http://www.cepstral.com/en/support/telephony/topic?os=linux I didn't know about this thread or I would have chimed in sooner.

I hope you get it sorted.

-- Adam

awayment avatar Jun 06 '13 18:06 awayment

Oh also, on some versions of gcc you will need to have the make flags as prescribed here:

http://www.cepstral.com/en/support/telephony/faq?os=linux&section=troubleshooting#302-2-3-2

I thought Darren got this into his version, when I get a second I will look into it myself.

-- Adam

awayment avatar Jun 06 '13 19:06 awayment

Was an answer ever gotten with this issue with Allison Swift on Asterisk 11?

ldconfig: /opt/swift/lib/libceplang_en.so.6 is not a symbolic link ldconfig: /opt/swift/lib/libswift.so.6 is not a symbolic link -= Info about application 'Swift' =- ldconfig: /opt/swift/lib/libceplex_us.so.6 is not a symbolic link

I just downloaded the latest app_swift after I installed Cepstral_Allison-8kHz_x86-64-linux_6.0.1 and still getting:

-= Info about application 'Swift' =-

[Synopsis] Not available

[Description] Not available

[Syntax] Not available

[Arguments] Not available

[See Also] Not available

I am not sure what I am doing wrong but I am getting the same issues with can't find a voice. I have done what Adam suggests above and opened a ticket with Cepstral. Appears this just doesn't work for me

sfrazier9999 avatar Apr 26 '15 12:04 sfrazier9999

Hello , We are facing same error

[Jan 5 19:21:34] ERROR[4667][C-00000005]: app_swift.c:772 app_exec: FRACK!, Failed assertion bad magic number 0x0 for object 0x7fcaf40060f0 (0) [Jan 5 19:21:34] ERROR[4667][C-00000005]: Got 9 backtrace records

0: /usr/sbin/asterisk(__ao2_ref+0x560) [0x459450]

1: /usr/lib/asterisk/modules/app_swift.so(+0x39de) [0x7fcacfc489de]

2: /usr/sbin/asterisk(pbx_exec+0xca) [0x51c5ea]

3: /usr/sbin/asterisk() [0x51186b]

4: /usr/sbin/asterisk() [0x5132db]

5: /usr/sbin/asterisk() [0x5148ab]

6: /usr/sbin/asterisk() [0x58b629]

7: /lib64/libpthread.so.0(+0x814a) [0x7fcb0eb9f14a]

8: /lib64/libc.so.6(clone+0x43) [0x7fcb0dd6af23]

We are using Centos 8- 64bit with Asterisk 18.1 pls help

helpinghandindia1 avatar Jan 05 '21 14:01 helpinghandindia1