Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > a2e5ae2091c2674a899ba2cbfce176e5 > files > 44

festival-2.1-3.mga1.i586.rpm

<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
     from ../festival.texi on 2 August 2001 -->

<TITLE>Festival Speech Synthesis System - 32  Feature functions</TITLE>
</HEAD>
<BODY bgcolor="#ffffff">
Go to the <A HREF="festival_1.html">first</A>, <A HREF="festival_31.html">previous</A>, <A HREF="festival_33.html">next</A>, <A HREF="festival_35.html">last</A> section, <A HREF="festival_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC141" HREF="festival_toc.html#TOC141">32  Feature functions</A></H1>

<P>
<A NAME="IDX374"></A>
This chapter contains a list of a basic feature functions available for
stream items in utterances.  See section <A HREF="festival_14.html#SEC54">14.6  Features</A>.  These are the basic
features, which can be combined with relative features (such as
<CODE>n.</CODE> for next, and relations to follow links).  Some of these
features are implemented as short C++ functions (e.g. <CODE>asyl_in</CODE>)
while others are simple features on an item (e.g. <CODE>pos</CODE>).  Note
that functional feature take precidence over simple features, so
accessing and feature called "X" will always use the function called "X"
even if a the simple feature call "X" exists on the item.  

</P>
<P>
Unlike previous versions there are no features that are builtin on all
items except <CODE>addr</CODE> (reintroduced in 1.3.1) which returns a unique
string for that item (its the hex address on teh item within the
machine).  Features may be defined through Scheme too, these all have
the prefix <CODE>lisp_</CODE>.

</P>
<P>
The feature functions are listed in the form <VAR>Relation.name</VAR> where
<VAR>Relation</VAR> is the name of the stream that the function is
appropriate to and <VAR>name</VAR> is its name.  Note that you will not
require the <VAR>Relation</VAR> part of the name if the stream item you are
applying the function to is of that type.

</P>
<DL COMPACT>

<DT><CODE>ANY.addr</CODE>
<DD>
Returned by popular demand, returns the address of given item that
is guaranteed unique for this session.
<DT><CODE>ANY.lisp_*</CODE>
<DD>
Apply Lisp function named after lisp_.  The function is called with
an stream item.  It must return an atomic value.
This method may be inefficient and is primarily desgined to allow
quick prototyping of new feature functions.
<DT><CODE>Intonation.lisp_last_tilt_accent</CODE>
<DD>
Returns the most recent tilt accent.
<DT><CODE>Intonation.lisp_last_tilt_boundary</CODE>
<DD>
Returns the most recent tilt boundary.
<DT><CODE>Intonation.lisp_next_tilt_accent</CODE>
<DD>
Returns the next tilt accent.
<DT><CODE>Intonation.lisp_next_tilt_boundary</CODE>
<DD>
Returns the next tilt boundary.
<DT><CODE>Intonation.peak_anchor_segment_type ie</CODE>
<DD>
Determines whether the segment anchor for a peak
is the first consonant of a syl - C0 -, the
vowel of a syl - V0 -, or segments after that
- C1-&#62;X,V1-&#62;X. If the segment is in a following syl,
the return value will be preceded by a 1 - e.g. 1V1
<DT><CODE>Segment.diphone_phone_name</CODE>
<DD>
This is produced by the diphone module to contain the desired phone
name for the desired diphone.  This adds things like _ if part of 
a consonant or $ to denote syllable boundaries.  These are generated
on a per voice basis by function(s) specified by diphone_module_hooks.
Identification of dark ll's etc. may also be included.  Note this is not
necessarily the name of the diphone selected as if it is not found
some of these characters will be removed and fall back values will be
used.
<DT><CODE>Segment.lisp_pos_in_syl seg</CODE>
<DD>
Finds the position in a syllable of a segment - returns a number.
<DT><CODE>Segment.ph_*</CODE>
<DD>
Access phoneset features for a segment.  This definition covers multiple
feature functions where ph_ may be extended with any features that
are defined in the phoneset (e.g. vc, vlng, cplace etc.).
<DT><CODE>Segment.pos_in_syl</CODE>
<DD>
The position of this segment in the syllable it is related to.  The index
counts from 0.  If this segment is not related to a syllable this 
returns 0.
<DT><CODE>Segment.seg_coda_fric</CODE>
<DD>
Returns 1 if coda of the syllable this segment is in contains a fricative.
0 otherwise.
<DT><CODE>Segment.seg_onset_stop</CODE>
<DD>
Returns 1 if onset of the syllable this segment is in contains a stop.
0 otherwise.
<DT><CODE>Segment.seg_onsetcoda</CODE>
<DD>
Returns onset if this segment is before the vowel in the syllable it
is contained within.  Returns coda if it is the vowel or after.  If
the segment is not in a syllable it returns onset.
<DT><CODE>Segment.seg_pitch</CODE>
<DD>
Pitch at the middle of this segment.
<DT><CODE>Segment.segment_duration</CODE>
<DD>
The duration of the given stream item calculated as the end of this
item minus the end of the previous item in the Segment relation.
<DT><CODE>Segment.segment_end</CODE>
<DD>
The end time of the given segment.
<DT><CODE>Segement.segment_mid</CODE>
<DD>
The middle time of the given segment.
<DT><CODE>Segement.segment_start</CODE>
<DD>
The start time of the given segment.
<DT><CODE>Segment.syl_final</CODE>
<DD>
Returns 1 if this segment is the last segment in the syllable it
is related to, or if it is not related to any syllable.
<DT><CODE>Segment.syl_initial</CODE>
<DD>
Returns 1 if this segment is the first segment in the syllable it
is related to, or if it is not related to any syllable.
<DT><CODE>Syllable.accented</CODE>
<DD>
Returns 1 if syllable is accented, 0 otherwise.  A syllable is
accented if there is at least one IntEvent related to it.
<DT><CODE>Syllable.asyl_in</CODE>
<DD>
Returns number of accented syllables since last phrase break, not
including this one.  Accentedness is as defined by the syl_accented
feature.
<DT><CODE>Syllable.asyl_out</CODE>
<DD>
Returns number of accented syllables to the next phrase break, not
including this one.  Accentedness is as defined by the syl_accented
feature.
<DT><CODE>Syllable.last_accent</CODE>
<DD>
Returns the number of syllables since last accented syllable.
<DT><CODE>Syllable.lisp_last_stress</CODE>
<DD>
Number of syllables from previous stressed syllable.  0 if this syllable
is stressed.  It is effectively assumed that the syllable before the 
first syllable is stressed.
<DT><CODE>Syllable.lisp_next_stress</CODE>
<DD>
Number of syllables to next stressed syllable. 0 if this syllable is
stressed.  It is effectively assumed the syllable after the last syllable
is stressed.
<DT><CODE>Syllable.lisp_tilt_accent</CODE>
<DD>
Returns "a" if there is a tilt accent related to this syllable, 0 
otherwise.
<DT><CODE>Syllable.lisp_tilt_accented</CODE>
<DD>
Returns 1 if there is a tilt accent related to this syllable, 0 
otherwise.
<DT><CODE>Syllable.lisp_tilt_boundaried</CODE>
<DD>
Returns 1 if there is a tilt boundary related to this syllable, 0 
otherwise.
<DT><CODE>Syllable.lisp_tilt_boundary</CODE>
<DD>
Returns boundary label if there is a tilt boundary related to this 
syllable, 0 otherwise.
<DT><CODE>Syllable.lisp_time_to_next_vowel syl</CODE>
<DD>
The time from vowel_start to next vowel_start
<DT><CODE>Syllable.next_accent</CODE>
<DD>
Returns the number of syllables to the next accented syllable.
<DT><CODE>Syllable.old_syl_break</CODE>
<DD>
Like syl_break but 2 and 3 are promoted to 4 (to be compatible with
some older models.
<DT><CODE>Syllable.pos_in_word</CODE>
<DD>
The position of this syllable in the word it is related to.  The index
counts from 0.  If this syllable is not related to a word then 0 is
returned.
<DT><CODE>Syllable.position_type</CODE>
<DD>
The type of syllable with respect to the word it it related to.  This
may be any of: single for single syllable words, initial for word
initial syllables in a poly-syllabic word, final for word final
syllables in poly-syllabic words, and mid for syllables within 
poly-syllabic words.
<DT><CODE>Syllable.ssyl_in</CODE>
<DD>
Returns number of stressed syllables since last phrase break, not
including this one.
<DT><CODE>Syllable.ssyl_out</CODE>
<DD>
Returns number of stressed syllables to next phrase break, not including
this one.
<DT><CODE>Syllable.stress</CODE>
<DD>
The lexical stress of the syllable as specified from the lexicon entry
corresponding to the word related to this syllable.
<DT><CODE>Syllable.sub_phrases</CODE>
<DD>
Returns the number of non-major phrase breaks since last major
phrase break.  Major phrase breaks are 4, as returned by syl_break,
minor phrase breaks are 2 and 3.
<DT><CODE>Syllable.syl_accent</CODE>
<DD>
Returns the name of the accent related to the syllable.  NONE is returned
if there are no accents, and multi is returned if there is more than one.
<DT><CODE>Syllable.syl_break</CODE>
<DD>
The break level after this syllable.  Word internal is syllables
return 0, non phrase final words return 1.  Final syllables in 
phrase final words return the name of the phrase they are related to.
Note the occasional "-" that may appear of phrase names is removed
so that this feature function returns a number in the range 0,1,2,3,4.
<DT><CODE>Syllable.syl_coda_type</CODE>
<DD>
Return the van Santen and Hirschberg classification. -V for unvoiced,
+V-S for voiced but no sonorants, and +S for sonorants.
<DT><CODE>Syllable.syl_codasize</CODE>
<DD>
Returns the number of segments after the vowel in this syllable.  If
there is no vowel in the syllable this will return the total number
of segments in the syllable.
<DT><CODE>Syllable.syl_endpitch</CODE>
<DD>
Pitch at the end of this syllable.
<DT><CODE>Syllable.syl_in</CODE>
<DD>
Returns number of syllables since last phrase break.  This is 0 if
this syllable is phrase initial.
<DT><CODE>Syllable.syl_midpitch</CODE>
<DD>
Pitch at the mid vowel of this syllable.
<DT><CODE>Syllable.syl_numphones</CODE>
<DD>
Returns number of phones in syllable.
<DT><CODE>Syllable.syl_onset_type</CODE>
<DD>
Return the van Santen and Hirschberg classification. -V for unvoiced,
+V-S for voiced but no sonorants, and +S for sonorants.
<DT><CODE>Syllable.syl_onsetsize</CODE>
<DD>
Returns the number of segments before the vowel in this syllable.  If
there is no vowel in the syllable this will return the total number
of segments in the syllable.
<DT><CODE>Syllable.syl_out</CODE>
<DD>
Returns number of syllables to next phrase break.  This is 0 if
this syllable is phrase final.
<DT><CODE>Syllable.syl_pc_unvox</CODE>
<DD>
Percentage of total duration of unvoiced segments from
start of syllable. (i.e. percentage to start of first voiced segment)
<DT><CODE>Syllable.syl_startpitch</CODE>
<DD>
Pitch at the start of this syllable.
<DT><CODE>Syllable.syl_vowel</CODE>
<DD>
Returns the name of the vowel within this syllable.  Note this is not
the general form you probably want.  You can't refer to ph_* features 
of this.  Returns "novowel" is no vowel can be found.
<DT><CODE>Syllable.syl_vowel_start</CODE>
<DD>
Start position of vowel in syllable.  If there is no vowel the start
position of the syllable is returned.
<DT><CODE>Syllable.syllable_duration</CODE>
<DD>
The duration of the given stream item calculated as the end of last
daughter minus the end of previous item in the Segment relation of the
first duaghter.
<DT><CODE>Syllable.syllable_end</CODE>
<DD>
The end time of the given syllable.
<DT><CODE>Syllable.syllable_start</CODE>
<DD>
The start time of the given syllable.
<DT><CODE>Syllable.tobi_accent</CODE>
<DD>
Returns the ToBI accent related to syllable.  ToBI accents are
those which contain a *.  NONE is returned if there are none.  If
there is more than one ToBI accent related to this syllable the
first one is returned.
<DT><CODE>Syllable.tobi_endtone</CODE>
<DD>
Returns the ToBI endtone related to syllable.  ToBI end tones are
those IntEvent labels which contain a % or a - (i.e. end tones or
phrase accents).  NONE is returned if there are none.  If
there is more than one ToBI end tone related to this syllable the
first one is returned.
<DT><CODE>Syllable.lisp_get_onset_length</CODE>
<DD>
Length from start of syllable to start of vowel.
<DT><CODE>Syllable.lisp_get_rhyme_length</CODE>
<DD>
Length from start of the vowel to end of syllable.
<DT><CODE>SylStructure.lisp_length_to_last_seg</CODE>
<DD>
Length from start of the vowel to start of last segment of syllable.
<DT><CODE>SylStructure.lisp_num_postvocalic_c</CODE>
<DD>
Finds the number of postvocalic consonants in a syllable.
<DT><CODE>SylStructure.sonority_scale_coda syl</CODE>
<DD>
Returns value on sonority scale (1 -6, where 6 is most sonorous)
for the coda of a syllable, based on least sonorant portion.
<DT><CODE>SylStructure.sonority_scale_onset syl</CODE>
<DD>
Returns value on sonority scale (1 -6, where 6 is most sonorous)
for the onset of a syllable, based on least sonorant portion.
<DT><CODE>SylStructure.lisp_syl_numphones syl</CODE>
<DD>
Finds the number segments in a syllable.
<DT><CODE>SylStructure.vowel_frontness syl</CODE>
<DD>
Classifies vowels as front, back or mid
<DT><CODE>SylStructure.lisp_vowel_height syl</CODE>
<DD>
Classifies vowels as high, low or mid
<DT><CODE>SylStructure.vowel_length syl</CODE>
<DD>
Returns the df.length feature of a syllable's vowel
<DT><CODE>Token.prepunctuation</CODE>
<DD>
Preceeding puctuation symbol found before token in original string/file.
<DT><CODE>Token.punc</CODE>
<DD>
Succeeding punctuation symbol found after token in original 
string/file.
<DT><CODE>Token.whitespace</CODE>
<DD>
Whitespace found before token in original string/file.
<DT><CODE>Word.blevel</CODE>
<DD>
A crude translation of phrase break into ToBI like phrase level.
Values may be 0,1,2,3,4.
<DT><CODE>Word.cap</CODE>
<DD>
Returns 1 if this word starts with a capital letter, 0 otherwise.
<DT><CODE>Word.content_words_in</CODE>
<DD>
Number of content words from start this phrase.
<DT><CODE>Word.content_words_out</CODE>
<DD>
Number of content words to end of this phrase.
<DT><CODE>Word.contentp</CODE>
<DD>
Returns 1 if this word is a content word as defined by gpos, 0 otherwise.
<DT><CODE>Word.gpos</CODE>
<DD>
Returns a guess at the part of speech of this word.  The lisp a-list
guess_pos is used to load up this word.  If no part of speech is
found in there "content" is returned.  This allows a quick efficient
method for part of speech tagging into closed class and content words.
<DT><CODE>Word.n_content</CODE>
<DD>
Next content word.  Note this doesn't use the standard n. notation as
it may have to search a number of words forward before finding a
non-function word.  Uses gpos to define content/function word distinction.
This also works for Tokens.
<DT><CODE>Word.nn_content</CODE>
<DD>
Next next content word.  Note this doesn't use the standard n.n. notation
as it may have to search a number of words forward before finding the 
second non-function word.  Uses gpos to define content/function word
distinction.  This also works for Tokens.
<DT><CODE>Word.num_break</CODE>
<DD>
1 if this is the last word in a numeric token and it is followed by
a numeric token.
<DT><CODE>Word.p_content</CODE>
<DD>
Previous content word.  Note this doesn't use the standard p. notation
as it may have to search a number of words backward before finding the 
first non-function word.  Uses gpos to define content/function word
distinction.  This also works for Tokens.
<DT><CODE>Word.pbreak</CODE>
<DD>
Result from statistical phrasing module, may be B or NB denoting
phrase break or non-phrase break after the word.
<DT><CODE>Word.pbreak_score</CODE>
<DD>
Log likelihood score from statistical phrasing module, for pbreak
value.
<DT><CODE>Word.pos</CODE>
<DD>
Part of speech tag value returned by the POS tagger module.
<DT><CODE>Word.pos_in_phrase</CODE>
<DD>
The position of this word in the phrase this word is in.
<DT><CODE>Word.pos_score</CODE>
<DD>
Part of speech tag log likelihood from Viterbi search.
<DT><CODE>Word.pp_content</CODE>
<DD>
Previous previous content word.  Note this doesn't use the standard p.p.
notation as it may have to search a number of words backward before
finding the first non-function word.  Uses gpos to define 
content/function word distinction.  This also works for Tokens.
<DT><CODE>Word.word_break</CODE>
<DD>
The break level after this word.  Non-phrase final words return 1
Phrase final words return the name of the phrase they are in.
<DT><CODE>Word.word_duration</CODE>
<DD>
The duration of the given stream item.  This is defined as the end of
last segment in the last syllable (via the SylStructure relation) minus
the segment immediate preceeding the first segment in the first syllable.
<DT><CODE>Word.word_end</CODE>
<DD>
The end time of the given word.
<DT><CODE>Word.word_numsyls</CODE>
<DD>
Returns number of syllables in a word.
<DT><CODE>Word.word_start</CODE>
<DD>
The start time of the given word.
<DT><CODE>Word.words_out</CODE>
<DD>
Number of words to end of this phrase.
</DL>

<P><HR><P>
Go to the <A HREF="festival_1.html">first</A>, <A HREF="festival_31.html">previous</A>, <A HREF="festival_33.html">next</A>, <A HREF="festival_35.html">last</A> section, <A HREF="festival_toc.html">table of contents</A>.
</BODY>
</HTML>