home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / fest-141.zip / festival / lib / fringe.scm < prev    next >
Lisp/Scheme  |  1999-12-23  |  4KB  |  101 lines

  1.  
  2.  
  3.  
  4.  
  5.  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6.  ;;; DO NOT EDIT THIS FILE ON PAIN OF MORE PAIN.
  7.  ;;; 
  8.  ;;; The master copy of this file is in ../../speech_tools/lib/siod/fringe.scm
  9.  ;;; and is copied here at build time.
  10.  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  24. ;;;                                                                       ;;
  25. ;;;                Centre for Speech Technology Research                  ;;
  26. ;;;                     University of Edinburgh, UK                       ;;
  27. ;;;                       Copyright (c) 1996,1997                         ;;
  28. ;;;                        All Rights Reserved.                           ;;
  29. ;;;                                                                       ;;
  30. ;;;  Permission is hereby granted, free of charge, to use and distribute  ;;
  31. ;;;  this software and its documentation without restriction, including   ;;
  32. ;;;  without limitation the rights to use, copy, modify, merge, publish,  ;;
  33. ;;;  distribute, sublicense, and/or sell copies of this work, and to      ;;
  34. ;;;  permit persons to whom this work is furnished to do so, subject to   ;;
  35. ;;;  the following conditions:                                            ;;
  36. ;;;   1. The code must retain the above copyright notice, this list of    ;;
  37. ;;;      conditions and the following disclaimer.                         ;;
  38. ;;;   2. Any modifications must be clearly marked as such.                ;;
  39. ;;;   3. Original authors' names are not deleted.                         ;;
  40. ;;;   4. The authors' names are not used to endorse or promote products   ;;
  41. ;;;      derived from this software without specific prior written        ;;
  42. ;;;      permission.                                                      ;;
  43. ;;;                                                                       ;;
  44. ;;;  THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK        ;;
  45. ;;;  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ;;
  46. ;;;  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ;;
  47. ;;;  SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE     ;;
  48. ;;;  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ;;
  49. ;;;  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ;;
  50. ;;;  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ;;
  51. ;;;  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ;;
  52. ;;;  THIS SOFTWARE.                                                       ;;
  53. ;;;                                                                       ;;
  54. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  55. ;;;
  56. ;;; Talking to fringe.
  57.  
  58. (defvar fringe_verbose nil
  59.   "fringe_verbose
  60.   If this is set true, all subsequent fringe connections will
  61.   print a trace of what they are doing.")
  62.  
  63. ;;; Aliases which are better suited to command line use.
  64.  
  65. (defvar fringe_connection nil
  66.   "fringe_connection
  67.   A connection to fringe, used by the command line fringe functions.")
  68.  
  69. (define (fringe_setup)
  70.   "(fringe_setup)
  71.   Connect to the default fringe."
  72.  
  73.   (fringe_read_server_table)
  74.   (set! fringe_connection (fringe_server "fringe"))
  75.   )
  76.  
  77. (define (fringec command)
  78.   "(fringec COMMAND)
  79.   Send COMMAND to the fringe server \[fringe_connection\]
  80.   For command line use, use (fringe_comand_string...) in scripts. "
  81.   (let ((val (fringe_command_string fringe_connection command)))
  82.     (if (or (null val) (consp val))
  83.     nil
  84.     val)
  85.     )
  86.   )
  87.   
  88. (define (fringel package operation args)
  89.   "(fringel PACKAGE OPERATION ARGS)
  90.   Send a command to the fringe server \[fringe_connection\].
  91.   For command line use, use (fringe_comand...) in scripts. "
  92.  
  93.   (let ((val (fringe_command fringe_connection package operation args)))
  94.     (if (or (null val) (consp val))
  95.     nil
  96.     val)
  97.     )
  98.   )
  99.  
  100. (provide 'fringe)
  101.