| /l3/users/2014-11-nt-voip/nt-voip/debian6/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
|
#vim /var/tmp/hello-en.txt
--- /dev/null 2014-11-26 15:06:50.581666140 +0200 +++ /var/tmp/hello-en.txt 2014-11-27 09:51:52.906620052 +0200 @@ -0,0 +1,4 @@ +fconfig is used to configure the kernel-resident network interfaces. It is used at boot + time to set up interfaces as necessary. After that, it is usually only needed when + debugging or when system tuning is needed. + |
|
#vim /var/tmp/hello-ru.txt
--- /dev/null 2014-11-26 15:06:50.581666140 +0200 +++ /var/tmp/hello-ru.txt 2014-11-27 09:52:43.662620018 +0200 @@ -0,0 +1 @@ +Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой. |
|
#cat /var/tmp/hello-en.txt
fconfig is used to configure the kernel-resident network interfaces. It is used at boot
time to set up interfaces as necessary. After that, it is usually only needed when
debugging or when system tuning is needed.
|
|
#cat /var/tmp/hello-ru.txt
Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой. |
|
#vim /var/tmp/hello-ru.txt
--- /tmp/l3-saved-3572.25084.14384 2014-11-27 09:53:03.778620004 +0200 +++ /var/tmp/hello-ru.txt 2014-11-27 09:53:20.918619995 +0200 @@ -1 +1 @@ -Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой. +Приветсвую тебя о темнейший. Я фестиваль и я пришел за тобой. |
|
#cat /var/tmp/hello-ru.txt | text2wave > /tmp/hello-ru.wav
|
|
#cat /var/tmp/hello-en.txt | text2wave > /tmp/hello-en.wav
|
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
|
#play /tmp/hello-en.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-en.wav: File Size: 465k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:14.53 In:59.9% 00:00:08.70 [00:00:05.83] Out:139k [-=====|=====-] Hd:0.3 Clip:0 Aborted. |
|
#play /tmp/hello-en.wav
ru
play WARN alsa: can't encode 0-bit Unknown or not applicable
/tmp/hello-ru.wav:
File Size: 167k Bit Rate: 256k
Encoding: Signed PCM
Channels: 1 @ 16-bit
Samplerate: 16000Hz
Replaygain: off
Duration: 00:00:05.22
In:100% 00:00:05.22 [00:00:00.00] Out:83.5k [ | ] Hd:3.7 Clip:0
Done.
|
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 167k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:05.22 In:100% 00:00:05.22 [00:00:00.00] Out:83.5k [ | ] Hd:3.7 Clip:0 Done. |
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 167k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:05.22 In:100% 00:00:05.22 [00:00:00.00] Out:83.5k [ | ] Hd:3.7 Clip:0 Done. |
|
#cd /var/tmp
|
|
#ls
asterisk belki.txt burunduki.txt hello-en.txt hello-ru.txt |
|
#ls
play /tmp/belki.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
/tmp/belki.wav:
File Size: 9.44M Bit Rate: 256k
Encoding: Signed PCM
Channels: 1 @ 16-bit
Samplerate: 16000Hz
Replaygain: off
Duration: 00:04:55.03
In:10.6% 00:00:31.23 [00:04:23.80] Out:500k [ -====|====- ] Hd:5.4 Clip:0
Aborted.
|
|
#play /tmp/belki.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/belki.wav: File Size: 9.44M Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:04:55.03 In:1.21% 00:00:03.58 [00:04:51.45] Out:57.3k [ =====|===== ] Hd:5.1 Clip:0 Aborted. |
|
#play /tmp/burunduki.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/burunduki.wav: File Size: 10.8M Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:05:36.46 In:6.24% 00:00:20.99 [00:05:15.47] Out:336k [ =====|===== ] Hd:5.6 Clip:0 Aborted. |
|
#ls /usr/lib/asterisk/modules/ | grep fest
app_festival.so |
|
#apt-get install libasterisk-agi-perl
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded. Need to get 42.2 kB of archives. After this operation, 160 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libasterisk-agi-perl all 1.01-2 [42.2 kB] Fetched 42.2 kB in 0s (3,166 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 147104 files and directories currently installed.) Unpacking libasterisk-agi-perl (from .../libasterisk-agi-perl_1.01-2_all.deb) ... Processing triggers for man-db ... Setting up libasterisk-agi-perl (1.01-2) ... |
|
#mkdir /var/lib/asterisk/sounds/tts
|
|
#chown asterisk:asterisk /var/lib/asterisk/sounds/tts
|
|
#/usr/local/bin/asterisk-festival.pl ДПривет Темнейший
^C |
|
#/usr/local/bin/asterisk-festival.pl Привет Темнейший
EXEC Playback "/var/lib/asterisk/sounds/tts/tts-2eae0f7017eebeff26b514599666b652" ^C |
|
#/usr/local/bin/дÑls -l /var/lib/asterisk/sounds/tts/tts-2eae0f7017eebeff26b514599666b652.wav
-rw-r--r-- 1 root root 25086 Nov 27 10:20 /var/lib/asterisk/sounds/tts/tts-2eae0f7017eebeff26b514599666b652.wav |
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3572.10559.1536 2014-11-27 10:22:08.354618841 +0200
+++ /etc/asterisk/extensions.conf 2014-11-27 10:24:08.282618762 +0200
@@ -21,6 +21,9 @@
exten => 8302,1,System( sudo /etc/init.d/sendmail restart)
+exten => 8403,1,AGI(/usr/local/bin/asterisk-festival.pl /var/tmp/belki.txt)
+exten => 8404,1,AGI(/usr/local/bin/asterisk-festival.pl /var/tmp/burunduki.txt)
+
; conference
exten => _801X,1,MeetMe(10${EXTEN:3})
|
|
#asterisk -rx "dialplan reload"
Dialplan reloaded. |