Text-to-uLaw wav ...

Discussion on the ACID distribution package
K5TRY
Posts: 36
Joined: Fri Mar 09, 2012 8:25 am
Location: Springdale, AR

Text-to-uLaw wav ...

Postby K5TRY » Tue Jul 03, 2012 1:04 am

Asterisk text-to-ulaw wav

#Requires Sox and Festival, from root

yum install sox

yum install festival

#create a user xxxx for text2wave .... Users files are kept in /home/xxxx for example

# To add a user:

adduser xxxx
passwd xxxx

# make WAV file, from root

su - xxxx

echo "Your Test Message Here" | text2wave -scale 1 -o test.wav

# This will convert a wav to the correct format for playback via Asterisk

sox -V test.wav -r 8000 -c 1 -t ul -w test.ulaw

#exit user to root

exit

#CLI syntax command for text2wave, from root

asterisk -r

rpt playback 12345 /home/xxxx/test

#localplay is the same CLI syntax.

rpt localplay 12345 /home/xxxx/test

Image

k5TRY
;(;)
http://qsl.net/k5try
;(;)

W3RCS
Posts: 6
Joined: Sat Jun 30, 2012 9:25 pm

Re: Text-to-uLaw wav ...

Postby W3RCS » Tue Jul 03, 2012 5:54 pm

You can do the whole thing from text2wave

echo "Your test message here" | text2wave -scale 1 -F 8000 -otype ulaw -o test.ulaw

I've tried this on my BeagleBoard/LOX setup and my ACID setup, but I'm not happy with the voice. Its not nearly as clear as the ones in /var/lib/asterisk/sounds.

You can pass other options through text2wave to change the voices params "-mode", I think, but examples are hard to come by.

K5TRY
Posts: 36
Joined: Fri Mar 09, 2012 8:25 am
Location: Springdale, AR

Re: Text-to-uLaw wav ...

Postby K5TRY » Sat Jul 14, 2012 4:04 pm

W3RCS-
Hey thanks for tips!

"You can pass other options through text2wave to change the voices params "-mode", I think, but examples are hard to come by."

Any more insight? I'll have to keep an eye open for any of these examples ...

73

Image

k5TRY
;(;)
http://qsl.net/k5try
;(;)

W3RCS
Posts: 6
Joined: Sat Jun 30, 2012 9:25 pm

Re: Text-to-uLaw wav ...

Postby W3RCS » Sat Jul 14, 2012 7:38 pm

I have not had a chance to test it in ACID but at least on 12.04 if you follow this:

http://ubuntuforums.org/showthread.php?t=751169

you can add some better voices and set the default voice to something a little clearer. Thats only way I've found so far to control what voice is used in text2wave.

I've selected the cmu_us_clb_arctic voice as my target to get working on ACID. Its a big file though..

If you don't have a /etc/festival.scm to set the default voice in: (yes, there is only one ' in that. festival's commands make no sense what so ever if you are used to 'normal' command-line driven environments)

Code: Select all

echo "(set! voice_default 'voice_cmu_us_clb_arctic_clunits)" >> /etc/festival.scm
Last edited by W3RCS on Sun Jul 15, 2012 10:41 am, edited 1 time in total.

W3RCS
Posts: 6
Joined: Sat Jun 30, 2012 9:25 pm

Re: Text-to-uLaw wav ...

Postby W3RCS » Sat Jul 14, 2012 9:25 pm

I was able to get cmu_us_clb_arctic working on my BeagleBoard/LOX/pickle node by following the directions in that link for just that voice (download, unpack, install for just that one) and since I didn't have a festival.scm I used that echo command I quoted above.

Now text2wave outputs using the much clearer cmu voice without any extra options.

K5TRY
Posts: 36
Joined: Fri Mar 09, 2012 8:25 am
Location: Springdale, AR

Re: Text-to-uLaw wav ...

Postby K5TRY » Sun Jul 22, 2012 2:26 pm

w3RCS

Thanks for the link! Lots of good info there. Certainly opens a few doors / options per say...




73

Image


k5TRY
;(;)
http://qsl.net/k5try
;(;)

K5TRY
Posts: 36
Joined: Fri Mar 09, 2012 8:25 am
Location: Springdale, AR

Re: Text-to-uLaw wav ...

Postby K5TRY » Sun Aug 05, 2012 10:24 pm

Asterisk Dtmf PlayBack Text-2-uLaw wav

;
;playback cmds are listed under your Functions stanza: specify the name of the file to be played
;
;(for example, 25=playback,/rpt/foo)
;

;
;playback commands
;

900=playback,/home/xxxx/test
901=playback,/home/xxxx/test1
902=playback,/home/xxxx/test2
903=playback,/home/xxxx/test3
904=playback,/home/xxxx/test4
905=playback,/home/xxxx/test5


;'xxxx' being defined as user, reference first post
;'test' being defined as .ulaw sound file, reference first post
;
;write rpt.conf file to directory
;reload app_rpt via CLI
;execute dtmf cmd via cli, dtmf,remote phone ... 'whatever plays your pipe organ' hi!hi
;example(from radio key mic, enter *900 for playback of test sound file)
;example(from CLI: rpt fun 12345 *900*901*902 for stacked playback cmd of multiple sound files)
;'12345' being define as your node number

From the 'app_rpt.c File Reference' ->
http://www.asterisk.org/doxygen/asteris ... pt_8c.html

73


Image

k5TRY
;(;)
http://qsl.net/k5try
;(;)

K5TRY
Posts: 36
Joined: Fri Mar 09, 2012 8:25 am
Location: Springdale, AR

Re: Text-to-uLaw wav ...

Postby K5TRY » Fri Sep 21, 2012 8:02 pm

Alternative Solution to Alternative Voices

***back to this project with some updates...

Here is an alternative source that works if u need->

http://tinyurl.com/yzjutyz

Here is another thats on my 'to-do' list->

Asterisk-eSpeak

Module for the Asterisk open source PBX which allows you to use the eSpeak voice synthesis engine to render text to speech. This provides the "Espeak" dialplan application, which allows you to use the Espeak speech synthesizer with Asterisk.

http://zaf.github.com/Asterisk-eSpeak/

Ive yet to successfully get the different voices in festival figured all the way out yet, but making progress. Ive confirmed what different voices are loaded by default.

;from root

festival

;from festival prompt

(voice.list)

(exit)

; editing in 2 files will default different voices
; /usr/share/festival/siteinit.scm
; /usr/share/festival/voices.scm

;from festival prompt

voice_default

I'm getting segmentation fault errors now when i try to create a message under user as described in top post. So next thing i'd like to verify and learn is creating a ulaw/wav under the festival prompt. And then figure out protocols for the 'other' festival voices while logged in 'user' ...


73


Image


k5TRY
;(;)
http://qsl.net/k5try
;(;)


Return to “ACID Distribution”

Who is online

Users browsing this forum: No registered users and 1 guest