-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
65 lines (38 loc) · 2.58 KB
/
INSTALL
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
Prerequisites
They are installed programs GHC, cabal, eSpeak and SoX.
It is needed also firstly to install libraries system-info, system-directory and bytestring. They are supplied with the basic GHC installation as a rule. In other case, you can run in the terminal for this:
cabal update
cabal install system-info
cabal install system-directory
cabal install bytestring
For Windows Users
You need for all commands in the file you are reading now to append to the first word a suffix .exe
Moreover, you need to check that all these programs are visible for execution in the terminal (e.g. on the command line) (directories where all these .exe files are located).
In other words, these directories are included into the environment variable PATH.
Installation
Note for Windows and other OS with .exe files: it might be needed to change the listed below terminal commands so that every first word in a line (a program name) and mm1 both have an .exe suffix appended to them. You can check without it as follows, and if it is
not successful, use the suffix. This notification is not further mentioned.
1. Without cabal usage
You can compile either a static version or a dynamic. For the last one, please, use a compiler flag -dynamic as follows.
Copy the files into the directory where you have permissions to write and execute files. Then run in the terminal
ghc -O2 -Wall -Wextra -dynamic UkrainianSpeech.hs -o mm1
(+ For Unices users):
strip --strip-unneeded mm1
Copy the file mm1 (respectively mm1.exe) you got into the directory where you have permissions to write, execute and besides which is in the environment variable PATH.
2. With cabal
The alternative way for installation is to use cabal.
So, run in the terminal in the directory of the source code
cabal configure --enable-executable-dynamic -O2 --enable-executable-stripping
cabal build
Usage
Run the program in the terminal typing
mm1
and enter a string of Ukrainian text. Press Enter. You must be in the directory where you have permissions to read and write.
For production of the better sounding of the synthesized files it is recommended to use the following commands (for the Unix shell bash):
sox 1*.wav speech.flac rate -m 44100 bandpass 360 10 bandreject 300 10 gain 10 channels 2 earwax gain 7 dither -S
play speech.flac
If you would like to have some fun, you can enter not the previous two commands, but the following ones:
sox *.wav speech.flac rate -m 44100 bandpass 360 10 bandreject 300 10 gain 10 channels 2 earwax gain 7 dither -S
play speech.flac
To speed up the playback, you can use a command like:
play speech.flac tempo 1.4