## 12 Phonesets ¶

The notion of phonesets is important to a number of different subsystems within Festival. Festival supports multiple phonesets simultaneously and allows mapping between sets when necessary. The lexicons, letter to sound rules, waveform synthesizers, etc. all require the definition of a phoneset before they will operate.

A phoneset is a set of symbols which may be further defined in terms of features, such as vowel/consonant, place of articulation for consonants, type of vowel etc. The set of features and their values must be defined with the phoneset. The definition is used to ensure compatibility between sub-systems as well as allowing groups of phones in various prediction systems (e.g. duration)

A phoneset definition has the form

      (defPhoneSet
         NAME
         FEATUREDEFS
         PHONEDEFS )

The NAME is any unique symbol used e.g. `mrpa`, `darpa`, etc. FEATUREDEFS is a list of definitions each consisting of a feature name and its possible values. For example

       (
         (vc + -)             ;; vowel consonant
         (vlength short long diphthong schwa 0)  ;; vowel length
         ...
       )

The third section is a list of phone definitions themselves. Each phone definition consists of a phone name and the values for each feature in the order the features were defined in the above section.

A typical example of a phoneset definition can be found in `lib/mrpa_phones.scm`.

Note the phoneset should also include a definition for any silence phones. In addition to the definition of the set the silence phone(s) themselves must also be identified to the system. This is done through the command `PhoneSet.silences`. In the mrpa set this is done by the command

    (PhoneSet.silences '(#))

There may be more than one silence phone (e.g. breath, start silence etc.) in any phoneset definition. However the first phone in this set is treated special and should be canonical silence. Among other things, it is this phone that is inserted by the pause prediction module.

In addition to declaring phonesets, alternate sets may be selected by the command `PhoneSet.select`.

Phones in different sets may be automatically mapped between using their features. This mapping is not yet as general as it could be, but is useful when mapping between various phonesets of the same language. When a phone needs to be mapped from one set to another the phone with matching features is selected. This allows, at least to some extent, lexicons, waveform synthesizers, duration modules etc. to use different phonesets (though in general this is not advised).

A list of currently defined phonesets is returned by the function

    (PhoneSet.list)

Note phonesets are often not defined until a voice is actually loaded so this list is not the list of of sets that are distributed but the list of sets that are used by currently loaded voices.

The name, phones, features and silences of the current phoneset may be accessedwith the function

    (PhoneSet.description nil)

If the argument to this function is a list, only those parts of the phoneset description named are returned. For example

    (PhoneSet.description '(silences))
    (PhoneSet.description '(silences phones))