Журнал лабораторных работ

Содержание

Журнал

Четверг (11/27/14)

/dev/pts/3
08:51:36
#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.
+
08:51:52
#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 @@
+Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой.
08:52:43
#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.
08:52:52
#cat /var/tmp/hello-ru.txt
Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой.
08:52:58
#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 @@
-Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой.
+Приветсвую тебя о темнейший. Я фестиваль и я пришел за тобой.
08:53:20
#cat /var/tmp/hello-ru.txt | text2wave > /tmp/hello-ru.wav

08:54:00
#cat /var/tmp/hello-en.txt | text2wave > /tmp/hello-en.wav

08:54:13
#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.
08:54:24
#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.
08:54:29
#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.
08:54:34
#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.
08:54:35
#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.
08:54:36
#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.
08:57:44
#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.
08:57:54
#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.
08:58:02
#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.
08:58:39
#cd /var/tmp

09:00:54
#ls
asterisk  belki.txt  burunduki.txt  hello-en.txt  hello-ru.txt
09:02:12
#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.
09:02:54
#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.
09:02:58
#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.
09:03:28
#ls /usr/lib/asterisk/modules/ | grep fest
app_festival.so
09:08:33
#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) ...
09:17:58
#mkdir /var/lib/asterisk/sounds/tts

09:18:21
#chown asterisk:asterisk /var/lib/asterisk/sounds/tts

09:18:46
#/usr/local/bin/asterisk-festival.pl ДПривет Темнейший
^C
09:19:46
#/usr/local/bin/asterisk-festival.pl Привет Темнейший
EXEC Playback "/var/lib/asterisk/sounds/tts/tts-2eae0f7017eebeff26b514599666b652"
^C
09:20:47
#/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
09:21:15
#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})
09:24:21
#asterisk -rx "dialplan reload"
Dialplan reloaded.