12.12.2012 Views

Festival Speech Synthesis System: - Speech Resource Pages

Festival Speech Synthesis System: - Speech Resource Pages

Festival Speech Synthesis System: - Speech Resource Pages

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Also if syllabification is required there is an opportunity to run a set of "letter-to-sound"-rules on the input (actually<br />

an arbitrary re-write rule system). If the variable lex_lts_set is set, the lts ruleset of that name is applied to the<br />

flat input before syllabification. This allows simple predictable changes such as conversion of final r into longer<br />

vowel for English RP from American labelled lexicons.<br />

A list of all matching entries in the addenda and the compiled lexicon may be found by the function<br />

lex.lookup_all. This function takes a word and returns all matching entries irrespective of part of speech.<br />

You can optionall intercept the words as they are lookup up, and after they have been found through pre_hooks<br />

and post_hooks for each lexicon. This allows a function or list of functions to be applied to an word and feature<br />

sbefore lookup or to the resulting entry after lookup. The following example shows how to add voice specific entries<br />

to a general lexicon without affecting other voices that use that lexicon.<br />

For example suppose we were trying to use a Scottish English voice with the US English (cmu) lexicon. A number of<br />

entgries will be inapporpriate but we can redefine some entries thus<br />

(set! cmu_us_awb::lexicon_addenda<br />

'(<br />

("edinburgh" n (((eh d) 1) ((ax n) 0) ((b r ax) 0)))<br />

("poem" n (((p ow) 1) ((y ax m) 0)))<br />

("usual" n (((y uw) 1) ((zh ax l) 0)))<br />

("air" n (((ey r) 1)))<br />

("hair" n (((hh ey r) 1)))<br />

("fair" n (((f ey r) 1)))<br />

("chair" n (((ch ey r) 1)))))<br />

We can the define a function that chesk to see if the word looked up is in the speaker specific exception list and use<br />

that entry instead.<br />

(define (cmu_us_awb::cmu_lookup_post entry)<br />

"(cmu_us_awb::cmu_lookup_post entry)<br />

Speaker specific lexicon addeda."<br />

(let ((ne<br />

(assoc_string (car entry) cmu_us_awb::lexicon_addenda)))<br />

(if ne<br />

ne<br />

entry)))<br />

And then for the particualr voice set up we need to add both a selection part and a reset part. Thuis following the<br />

FestVox vonventions for voice set up.<br />

(define (cmu_us_awb::select_lexicon)<br />

)<br />

...<br />

...<br />

(lex.select "cmu")<br />

;; Get old var for reset and to append our function to is<br />

(set! cmu_us_awb::old_cmu_post_hooks<br />

(lex.set.post_hooks nil))<br />

(lex.set.post_hooks<br />

(append cmu_us_awb::old_cmu_post_hooks<br />

(list cmu_us_awb::cmu_lookup_post)))<br />

...<br />

(define (cmu_us_awb::reset_lexicon)<br />

...<br />

;; reset CMU's post_hooks back to original<br />

(lex.set.post_hooks cmu_us_awb::old_cmu_post_hooks)<br />

...

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!