Debian Codegraph @

festival/lib/upc_catalan/upc_catalan.scm

raw
1 ;;; Copyright (C) 2009-2011 Antonio Bonafonte et al.
2 ;;; Universitat Politècnica de Catalunya, Barcelona, Spain
3 ;;;
4 ;;; This script is free software; you can redistribute it and/or
5 ;;; modify it under the terms of the GNU Lesser General Public
6 ;;; License as published by the Free Software Foundation,
7 ;;; version 2.1 of the License.
8 ;;;
9 ;;; This library is distributed in the hope that it will be useful,
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;;; Lesser General Public License for more details.
13 ;;;
14 ;;; You should have received a copy of the GNU Lesser General Public
15 ;;; License along with this library; if not, write to the Free Software
16 ;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
18
19 (define (intro-catalan)
20 "(intro-catalan)
21 Synthesize an introduction to the Festival Speech Synthesis System
22 in Catalan. Catalan voice must already be selected for this."
23 (if (boundp 'datadir)
24 (tts (path-append datadir "upc_catalan/cat_intro.text") nil)
25 (tts (path-append libdir "upc_catalan/cat_intro.text") nil))
26
27 )
28
29 (defvar upclexdir (path-append lexdir "upc")
30 "upclexdir is the directory where Catalan dictionaries are stored")
31
32 (defvar upc_catalan::debug_token_to_words nil
33 "upc_catalan::debug_token_to_words: If not nil, prints information
34 about token to words")
35
36
37 (define (load-catalan-support)
38 "(load-catalan-support)
39 Loads dictionaries, phoneset and all the voice independent language tools for Catalan."
40 (load-catalan-support-dialect "central")
41 )
42
43 (define (load-catalan-support-dialect dialect)
44 "(load-catalan-support)
45 Loads dictionaries, phoneset and all the voice independent language tools for Catalan."
46
47 (if (not (member_string upclexdir load-path))
48 (set! load-path (cons upclexdir load-path)))
49 (require 'upclex_catalan)
50 (Param.set 'Language 'catalan)
51 (upc_catalan_lex_select_dialect dialect)
52 (require 'upc_ca_generic_phoneset)
53 (require 'upc_ca_generic_tokenizer)
54 (require 'upc_ca_generic_tagger)
55 (require 'upc_ca_generic_lexicon)
56 (require 'upc_ca_generic_phrasing)
57
58 ; Not used in hts voices:
59 (require 'upc_ca_generic_duration)
60 (require 'upc_ca_generic_f0model)
61 (require 'upc_ca_generic_intonation)
62
63 ;; Select appropriate phone set
64 (upc_ca_generic::select_phoneset_dialect dialect)
65
66 ;; Select appropriate tokenization
67 (upc_ca_generic::select_tokenizer)
68
69 ;; For part of speech tagging
70 (upc_ca_generic::select_tagger)
71
72 (upc_ca_generic::select_lexicon_dialect dialect)
73 (upc_ca_generic::select_phrasing)
74
75 (upc_ca_generic::select_duration)
76 (upc_ca_generic::select_intonation)
77 ; Catalan language can't synthesize without voices
78 (Param.set 'Synth_Method nil)
79 t
80 )
81 (provide 'upc_catalan)