Install Cepstral on PIAF server
From ViciWiki
Revision as of 02:12, 11 July 2012 by Bill (talk | contribs) (Created page with "*Note: Cannot run Make in swift app until Cepstral voice is installed. Dependency. ==Grab Swift== <pre> cd /usr/local/src git clone https://github.com/awayment/app_swift </pre> ...")
- Note: Cannot run Make in swift app until Cepstral voice is installed. Dependency.
Contents
Grab Swift
cd /usr/local/src git clone https://github.com/awayment/app_swift
Grab Voice
uname -a
- NOTE* Always be sure you download x86-64 for 64 bit machines and i386 for 32 bit!! uname -a will show i386 or x86_64
- change the voice to the one purchased
- Note David vs Allison 64 vs 32 bit.
- PIAF comes in both flavors.
- Voices come in both flavors.
- Installers come in both flavors!
- Verify actual file locations by downloading to your own workstation and edit the wget line accordingly
cd /usr/local/src wget http://www.cepstral.com/downloads/installers/linux64/Cepstral_Allison-8kHz_x86-64-linux_6.0.1.tar.gz wget http://www.cepstral.com/downloads/installers/linux32/Cepstral_David-8kHz_i386-linux_6.0.1.tar.gz tar -xvzf Cepstral_Allison-8kHz_x86-64-linux_6.0.1.tar.gz cd Cepstral_Allison-8kHz_x86-64-linux_6.0.1 sh install.sh
Do you agree to these terms? Enter -yes- to continue: yes
- yes
/opt/swift does not exist. Create it? ([n]/y)
- y
Is this acceptable? Enter 'yes' to continue:
- yes
Testing the installed swift binary... /opt/swift/bin/swift -o /dev/null 'hello world' /opt/swift/bin/swift: line 12: /opt/swift/bin/swift.bin: cannot execute binary file /opt/swift/bin/swift: line 12: /opt/swift/bin/swift.bin: Success
- cannot execute binary file = you installed for the wrong processor (32 bit vs 64 bit) most likely.
When you do succeed:
Testing the installed swift binary... /opt/swift/bin/swift -o /dev/null 'hello world' *************************************************************************** ****************** Installation Completed Successfully! ******************* ***************************************************************************
Install swift
cd /usr/local/src/app_swift/Asterisk_1.8 make make install
result
if ! [ -f /etc/asterisk/swift.conf ]; then \ install -m 644 swift.conf.sample /etc/asterisk/swift.conf ; \ fi if [ -f app_swift.so ]; then \ install -m 755 app_swift.so /usr/lib/asterisk/modules ; \ fi
Not very verbose, but that's a successful install of swift. Continue
Asterisk
echo "/opt/swift/lib" > /etc/ld.so.conf.d/swift.conf; ldconfig asterisk -rx "core restart now" asterisk -rx "core show application swift"
Success:
-= Info about application 'Swift' =- [Synopsis] Not available [Description] Not available [Syntax] Not available [Arguments] Not available [See Also] Not available
Register Voice
swift --reg-voice swift --reg-ports
Dialplan entries
nano extensions_custom.conf
Add at bottom:
[swift] exten =>s,1,NoOp() same =>n,Set(foo=${CURL(http://ip.whowebwhere.com/TTSTest.php?cepstral=output)}) same =>n,swift(${foo}) same =>n,wait(2) same =>n,swift(${foo}) same =>n,wait(2) same =>n,swift(${foo}) same =>n, Hangup()
Fix voice name!
- If you have issues, check this file for the voice you licensed/downloaded
cd /usr/local/src/app_swift emacs swift.conf.example replace "voice=Allison-8kHz" with "voice=David-8kHz" cp swift.conf.example /etc/asterisk/swift.conf
Final
Generate a dialplan entry that will dial a number at the swift context. Generally this is done by creating a sip phone or carrier with "context=swift". Then that sip accounts "dials" will execute in the swift context. (Have to convert our local notes for this, coming momentarily).
Next we need to add the data to a table on vicidial's side and add the acquisition of the data from that table with Cepstral to generate the TTS. (Have to convert our local notes for this as well, coming momentarily).