home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / festival / init.scm < prev    next >
Encoding:
Text File  |  2006-12-20  |  5.7 KB  |  155 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;                                                                       ;;
  3. ;;;                Centre for Speech Technology Research                  ;;
  4. ;;;                     University of Edinburgh, UK                       ;;
  5. ;;;                       Copyright (c) 1996,1997                         ;;
  6. ;;;                        All Rights Reserved.                           ;;
  7. ;;;                                                                       ;;
  8. ;;;  Permission is hereby granted, free of charge, to use and distribute  ;;
  9. ;;;  this software and its documentation without restriction, including   ;;
  10. ;;;  without limitation the rights to use, copy, modify, merge, publish,  ;;
  11. ;;;  distribute, sublicense, and/or sell copies of this work, and to      ;;
  12. ;;;  permit persons to whom this work is furnished to do so, subject to   ;;
  13. ;;;  the following conditions:                                            ;;
  14. ;;;   1. The code must retain the above copyright notice, this list of    ;;
  15. ;;;      conditions and the following disclaimer.                         ;;
  16. ;;;   2. Any modifications must be clearly marked as such.                ;;
  17. ;;;   3. Original authors' names are not deleted.                         ;;
  18. ;;;   4. The authors' names are not used to endorse or promote products   ;;
  19. ;;;      derived from this software without specific prior written        ;;
  20. ;;;      permission.                                                      ;;
  21. ;;;                                                                       ;;
  22. ;;;  THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK        ;;
  23. ;;;  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ;;
  24. ;;;  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ;;
  25. ;;;  SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE     ;;
  26. ;;;  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ;;
  27. ;;;  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ;;
  28. ;;;  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ;;
  29. ;;;  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ;;
  30. ;;;  THIS SOFTWARE.                                                       ;;
  31. ;;;                                                                       ;;
  32. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  33. ;;;
  34. ;;;  Initialisation file -- loaded before anything else
  35. ;;;
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37.  
  38. ;;;  Basic siod library (need this before load_library or require works)
  39. (load (path-append datadir "siod.scm"))
  40.  
  41. (defvar home-directory (or (getenv "HOME") "/")
  42.   "home-directory
  43.    Place looked at for .festivalrc etc.")
  44.  
  45. ;;; system-wide startup initialization
  46. (if (probe_file (path-append sysconfdir "festivalvars.scm"))
  47.     (load (path-append sysconfdir "festivalvars.scm")))
  48.  
  49. ;;;  User startup initialization, can be used to override load-path
  50. ;;;  to allow alternate basic modules to be loaded.
  51. (if (probe_file (path-append home-directory ".siodvarsrc"))
  52.     (load (path-append home-directory ".siodvarsrc")))
  53.  
  54. (if (probe_file (path-append home-directory ".festivalvarsrc"))
  55.     (load (path-append home-directory ".festivalvarsrc")))
  56.  
  57. ;;; CSTR siod extensions
  58. (require 'cstr)
  59.  
  60. ;;;  Festival specific definitions
  61. (require 'festival)
  62.  
  63. ;;;  Dealing with module descriptions
  64. (require 'module_description)
  65.  
  66. ;;;  Web related definitions
  67. (require 'web)
  68.  
  69. ;;;  Utterance types and support
  70. (require 'synthesis)
  71.  
  72. ;;;  Some default parameters
  73. (Parameter.def 'Wavefiletype 'riff)
  74.  
  75. ;;; Set default audio method
  76. (cond
  77.  ((member 'sun16audio *modules*)
  78.   (Parameter.def 'Audio_Method 'sun16audio))
  79.  ((member 'freebsd16audio *modules*)
  80.   (Parameter.def 'Audio_Method 'freebsd16audio))
  81.  ((member 'linux16audio *modules*)
  82.   (Parameter.def 'Audio_Method 'linux16audio))
  83.  ((member 'irixaudio *modules*)
  84.   (Parameter.def 'Audio_Method 'irixaudio))
  85.  ((member 'win32audio *modules*)
  86.   (Parameter.def 'Audio_Method 'win32audio))
  87.  ((member 'os2audio *modules*)
  88.   (Parameter.def 'Audio_Method 'os2audio))
  89.  ((member 'mplayeraudio *modules*)
  90.   (Parameter.def 'Audio_Method 'mplayeraudio))
  91.  ((member 'nas *modules*)
  92.   (Parameter.def 'Audio_Method 'netaudio))
  93.  ((member 'esd *modules*)
  94.   (Parameter.def 'Audio_Method 'esdaudio))
  95.  (t  ;; can't find direct support so guess that /dev/audio for 8k ulaw exists
  96.   (Parameter.def 'Audio_Method 'sunaudio)))
  97. ;;;  If you have an external program to play audio add its definition
  98. ;;;  in /etc/festival.scm
  99.  
  100. ;;; The audio spooler doesn't work under Windows so redefine audio_mode
  101. (if (member 'mplayeraudio *modules*)
  102.       (define (audio_mode param) param)
  103. )
  104.  
  105. ;;; Intonation
  106. (require 'intonation)
  107.  
  108. ;;; Duration
  109. (require 'duration)
  110.  
  111. ;;;  A large lexicon
  112. (require 'lexicons)
  113. (require 'pauses)
  114.  
  115. ;;;  Part of speech prediction
  116. (require 'pos)
  117.  
  118. ;;; Phrasing (dependent on pos)
  119. (require 'phrase)
  120.  
  121. ;;; POstlexical rules
  122. (require 'postlex)
  123.  
  124. ;;; Different voices
  125. (require 'voices)  ;; sets voice_default
  126. (require 'languages)
  127.  
  128. ;;; Some higher level functions
  129. (require 'token)
  130. (require 'tts)
  131.  
  132. ;;;
  133. ;;;  Local site initialization, if the file exists load it
  134. ;;;
  135. (if (probe_file (path-append sysconfdir "festival.scm"))
  136.     (load (path-append sysconfdir "festival.scm")))
  137.  
  138. ;;;  User initialization, if a user has a personal customization
  139. ;;;  file loaded it
  140. (if (probe_file (path-append home-directory ".siodrc"))
  141.     (load (path-append home-directory ".siodrc")))
  142.  
  143. (if (probe_file (path-append home-directory ".festivalrc"))
  144.     (load (path-append home-directory ".festivalrc")))
  145.  
  146. ;;; Default voice (have to do something cute so autoloads still work)
  147. (eval (list voice_default))
  148.  
  149. (provide 'init)
  150.  
  151.  
  152.  
  153.  
  154.  
  155.