(defvar phone-current-file "/home/brudy/public_html/zaza/java/faceapplet/phone.data") (define (utt.print.phonedata utt) "Prints phone, duration, stress, F0 word pos." (set! myphones (utt.relation_tree utt 'Segment))) ;; (utt.relation.print utt "Target")) ;; (utt.relation.print utt "Segment")) (define (utt.save.phonedata utt filename) "Saves phone, duration, stress, F0 word pos." (set! myphones (utt.relation_tree utt 'Segment)) (utt.save.segs utt filename)) (define (phone_output_info utt) "This is called after linguistic analysis but before waveform synthesis." ;; (utt.save.phonedata utt phone-current-file) (print (utt.print.phonedata utt)) utt) (define (phone_init_func) "Called on starting talking head text mode." (set! phone_previous_t2w_func token_to_words) (set! phone_previous_after_analysis_hooks after_analysis_hooks) (set! after_analysis_hooks (list phone_output_info)) (set! english_token_to_words phone_token_to_words) (set! token_to_words phone_token_to_words)) (define (phone_exit_func) "Called on exit phonemeead text mode." (set! token_to_words phone_previous_t2w_func) (set! english_token_to_words phone_previous_t2w_func) (set! after_analysis_hooks phone_previous_after_analysis_hooks)) (define (phone_token_to_words token name) "Talking head specific token to word rules. Symbols started and ended with an asterisk as treated as commands and not rendered as speech" (cond ((string-matches name "\\*.*\\*") nil) (t (phone_previous_t2w_func token name)))) (set! tts_text_modes (cons (list 'zaza (list (list 'init_func phone_init_func) (list 'exit_func phone_exit_func))) tts_text_modes)) (provide 'zaza-mode)