[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.8 tokenize.scm

Festival's tokenization is implemented mostly in C++, so it is impossible to use it when extending Festival. The tokenize module provides an alternative tokenization implemented in SIOD, that can be used wherever needed.

next-chunk text

Get the next part of text and create an utterance containing the corresponding tokens. A list of two elements, the utterance and the remaining unprocessed part of text, is returned.

An alternative SayText function, splitting the text into smaller pieces (and thus speeding up the start of speech) might be implemented as follows:

 
(define (SayText* text)
  (if (not (equal? text ""))
      (let ((utt-text (next-chunk text)))
        (let ((utt (car utt-text))
              (text (cadr utt-text)))
          (utt.play (utt.synth utt))
          (SayText* text)))))

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Milan Zamazal on August, 11 2009 using texi2html 1.78.