| 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 |
(defvar donovan_diphone_dir (cdr (assoc 'don_diphone voice-locations))) |
| 40 |
|
| 41 |
(require 'mrpa_phones) |
| 42 |
(require 'holmes_phones) |
| 43 |
(require 'pos) |
| 44 |
(require 'phrase) |
| 45 |
(require 'tobi) |
| 46 |
(require 'f2bf0lr) |
| 47 |
(require 'mrpa_durs) |
| 48 |
(require 'gswdurtreeZ) |
| 49 |
(require_module 'donovan) |
| 50 |
|
| 51 |
(setup_oald_lex) |
| 52 |
|
| 53 |
(define (setup_don_diphone) |
| 54 |
(Donovan_Init |
| 55 |
(list |
| 56 |
(list 'index_file (string-append donovan_diphone_dir "diphlocs.txt")) |
| 57 |
(list 'diphone_file (string-append donovan_diphone_dir "lpcdiphs.bin")) |
| 58 |
))) |
| 59 |
|
| 60 |
(define (don_postlex_syllabics utt) |
| 61 |
"(don_postlex_syllabics utt) |
| 62 |
Becuase the lexicon is somewhat random in its used of syllable l n and |
| 63 |
m this is designed to post process the output inserting schwa before |
| 64 |
them. Ideally the lexicon should be fixed." |
| 65 |
(mapcar |
| 66 |
(lambda (s) |
| 67 |
(if (and (member_string (item.name s) '("l" "n" "m")) |
| 68 |
(string-equal "coda" (item.feat s "seg_onsetcoda")) |
| 69 |
(not (member_string (item.feat s "p.name") '(l r))) |
| 70 |
(string-equal "-" (item.feat s "p.ph_vc"))) |
| 71 |
(item.relation.insert |
| 72 |
s 'SylStructure |
| 73 |
(item.insert s (list "@") 'before) |
| 74 |
'before))) |
| 75 |
(utt.relation.items utt 'Segment))) |
| 76 |
|
| 77 |
(define (voice_don_diphone) |
| 78 |
"(voice_don_diphone) |
| 79 |
Set up the current speaker to be British male RP speaker, LPC Donovan |
| 80 |
diphones." |
| 81 |
(voice_reset) |
| 82 |
(Parameter.set 'Language 'britishenglish) |
| 83 |
|
| 84 |
(PhoneSet.select 'mrpa) |
| 85 |
(Parameter.set 'PhoneSet 'mrpa) |
| 86 |
|
| 87 |
(set! token_to_words english_token_to_words) |
| 88 |
|
| 89 |
(set! pos_lex_name "english_poslex") |
| 90 |
(set! pos_ngram_name 'english_pos_ngram) |
| 91 |
(set! pos_supported t) |
| 92 |
(set! guess_pos english_guess_pos) |
| 93 |
|
| 94 |
(lex.select "oald") |
| 95 |
(set! postlex_rules_hooks (list postlex_apos_s_check |
| 96 |
don_postlex_syllabics)) |
| 97 |
|
| 98 |
(Parameter.set 'Phrase_Method 'prob_models) |
| 99 |
(set! phr_break_params english_phr_break_params) |
| 100 |
|
| 101 |
(set! int_tone_cart_tree f2b_int_tone_cart_tree) |
| 102 |
(set! int_accent_cart_tree f2b_int_accent_cart_tree) |
| 103 |
|
| 104 |
(set! f0_lr_start f2b_f0_lr_start) |
| 105 |
(set! f0_lr_mid f2b_f0_lr_mid) |
| 106 |
(set! f0_lr_end f2b_f0_lr_end) |
| 107 |
(Parameter.set 'Int_Method Intonation_Tree) |
| 108 |
(set! int_lr_params |
| 109 |
'((target_f0_mean 135) (target_f0_std 30) |
| 110 |
(model_f0_mean 170) (model_f0_std 34))) |
| 111 |
(Parameter.set 'Int_Target_Method Int_Targets_LR) |
| 112 |
|
| 113 |
(set! duration_cart_tree gsw_duration_cart_tree) |
| 114 |
(set! duration_ph_info gsw_durs) |
| 115 |
(Parameter.set 'Duration_Method Duration_Tree_ZScores) |
| 116 |
(Parameter.set 'Duration_Stretch 1.0) |
| 117 |
|
| 118 |
(Parameter.set 'Synth_Method Donovan_Synthesize) |
| 119 |
(setup_don_diphone) |
| 120 |
|
| 121 |
(set! after_synth_hooks |
| 122 |
(lambda (utt) |
| 123 |
(utt.wave.rescale utt 1.6))) |
| 124 |
|
| 125 |
(set! current-voice 'don_diphone) |
| 126 |
) |
| 127 |
|
| 128 |
(proclaim_voice |
| 129 |
'don_diphone |
| 130 |
'((language english) |
| 131 |
(gender male) |
| 132 |
(dialect british) |
| 133 |
(description |
| 134 |
"This voice uses a very small and efficient pulse-excited LPC |
| 135 |
diphone synthesis method. It was originally written by Steve |
| 136 |
Isard. The front end uses the same British English lexicon, |
| 137 |
intonation and duration methods as rab_diphone."))) |
| 138 |
|
| 139 |
(provide 'don_diphone) |