blob: 6bf7e3eac8cebbd99572a651f403f9a23db9dd0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#!/usr/bin/perl
use strict;
use vars qw {
$Cp
@Message_dirs
$VOCP_conf_dir
$Spool_dir
%Spool_subdirs
%LocalProgram_files
%Other_Local_exes
%Config_files
@Doc_files
@Com_shell_examples
$Version
$VOCP_group
$Groupadd
$LocalDir
%PerlModule_dirs
$Pwd
%RequiredModules
@LogFiles
$pvftormdopt
$LogDir
};
if (defined $ARGV[0] ) {
$pvftormdopt = $ARGV[0];
} else {
$pvftormdopt = 'Lucent 5';
}
$LogDir='/var/log/';
$Cp='/usr/bin/cp';
$LocalDir = "/usr/local/vocp";
$VOCP_conf_dir = "/etc/vocp";
$Spool_dir = "/var/spool/voice";
@Message_dirs = (
'messages/num',
'messages/day',
'messages/system',
'messages/menu',
'messages',
);
sub convert_sound {
#Do conversion of sound files
my $pvftormd = '/usr/bin/pvftormd';
print "\nConverting sound files, this can take a while...\n";
chdir $LocalDir;
foreach my $dir (@Message_dirs) {
system("ls $dir/*.pvf | sed 's/\.pvf//' | xargs -i $pvftormd $pvftormdopt {}.pvf $Spool_dir/{}.rmd");
}
print "Done: sound files converted to rmd format. "
."Test them with:\n"
."vm play -s -v ./sounds/path/to/file.rmd\n\n";
return 1;
}
&convert_sound;
|