summaryrefslogtreecommitdiff
path: root/debian/festvox-suopuhe-common.README.Debian
blob: 5d3302574c2d285eafcfedd2c899e5ea4aa7183e (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Suopuhe: Finnish voices for the Festival speech synthesis system
=================================================================

The Suopuhe project have made two Finnish voices freely available under
the LGPL: a female one ("suo_fi_lj") and a male one ("hy_fi_mv"). These
are separately packaged for Debian in the festvox-suopuhe-{mv,lj}
packages.  Although you can install just one of them and get them to work,
it is recommended to install both, for reasons described below. You may
also want to install an English voice, eg. the festvox-kallpc16k package,
to avoid startup warnings about not having a default voice available.

The festvox-suopuhe-common package contains some documentation in Finnish,
namely the README.lj file. This file was written by the Suopuhe project
authors in 2003-2004, and some information in it is now outdated. It is
included for the sake of completeness.

As the festival system is not very intuitive or user-friendly to
beginners, this documents tries to describe its basic usage with the
Finnish voices.  Full documentation on using the Festival system can be
found in the festival-doc package.

Activating the voices
---------------------

There are several ways to activate these voices:

A.  invoke festival with 'festival --language finnish', switch
    between the voices with the 'male1 and 'female1 functions:

    % festival --language finnish           
    Festival Speech Synthesis System 1.4.3:release Jan 2003
    Copyright (C) University of Edinburgh, 1996-2003. All rights reserved.
    For details type `(festival_warranty)'
    festival> (male1)  
    hy_fi_mv_diphone
    festival> (female1)
    suo_fi_lj_diphone

    Note that the 'male1 and 'female1 functions were broken in the Etch
    version of the festival Debian package; see Debian bugs #427550
    and #427552.

B.  call the 'language_finnish function from festival; again use the 
    'male1 and 'female functions to switch between the voices

    festival> (language_finnish)
    finnish
    festival> (male1)  
    hy_fi_mv_diphone
    festival> (female1)
    suo_fi_lj_diphone

C.  explicitly enable either of the voices:

    festival> (voice_suo_fi_lj_diphone)
    suo_fi_lj_diphone
    festival> (voice_hy_fi_mv_diphone)
    hy_fi_mv_diphone

    Note that if you have only installed the festvox-suopuhe-lj package,
    and not festvox-suopuhe-mv, this is the only option available.

D.  set a default voice in ~/.festivalrc:

    (set! voice_default 'voice_suo_fi_lj_diphone)

    This is also useful for eg. the text2wave utility.

Speaking Finnish
----------------

After activating the desired voice, the simplest way to get the system
to speak is the 'SayText function:

    festival> (language_finnish)
    finnish
    festival> (SayText "Kukkuluuruu")
    #<Utterance 0xb73b50b8>

An "utterance" can be saved into a file (but see also text2wave(1)):

    festival> (utt.save.wave (utt.synth (Utterance Text "kukkuluuruu")) "out.wav")

You can also read a file aloud with the 'tts function:

    festival> (tts "suomea.txt" nil)
    nil

The non-ASCII Finnish characters ("ä", "ö" etc.) are slightly
problematic, however.  

First, the system wants them in the ISO-8859-1 character set, while
UTF-8 is the default nowadays, so you may have to recode them with
eg. the iconv program:

    iconv -f UTF-8 -t ISO-8859-1 oma.txt > luettava.txt

Second, the festival command line can not handle most non-ASCII
characters, but rather considers the eighth bit as a meta flag, and
eg. "ä" becomes a backspace. The way around this is to only use the
'tts function. Here's an example of doing this from the command line and
recoding on the fly with another character set translator tool (recode):

    % echo äiti | recode utf8..latin1 | festival --language finnish --tts


 -- Niko Tyni <ntyni@iki.fi> Fri, 06 Jul 2007 20:37:38 +0300