Package: festival Version: 1.96~beta-10 Severity: normal Tags: l10n patch
festival needs a ISO-8895-1 (Latin-1) coding file to process and speak. In systems with UTF-8 encoding (or whatelse different of Latin-1) emacs send files to festival in UTF-8 and festival doesn't work well. The solution is enforce emacs to recode al text to Latin-1 before sending to festival. In file /usr/share/emacs/site-lisp/festival.el (from festival package) is necesary substitute festival-start-process, festival-say-region and festival-say-buffer with these functions: (defun festival-start-process () "Check status of process and start it if necessary" (interactive ) (let ((process-connection-type t)) (if (and festival-process (eq (process-status festival-process) 'run)) 't ;;(festival-kill-festival t) (message "Starting new synthesizer process...") (sit-for 0) (setq festival-process (start-process "festival" (get-buffer-create "*festival*") festival-program-name)) (set-process-coding-system festival-process 'iso-latin-1 'iso-latin-1) festival-process) )) (defun festival-say-region (reg-start reg-end) "Send given region to festival for saying. This saves the region as a file in /tmp and then tells festival to say that file. The major mode is *not* passed as text mode name to Festival." (interactive "r") (let ((coding-system-for-write 'iso-latin-1)) (write-region reg-start reg-end festival-tmp-file)) (festival-send-command (list 'tts festival-tmp-file nil))) (defun festival-say-buffer () "Send given region to festival for saying. This saves the region as a file in /tmp and then tells festival to say that file. The major-mode is passed as a text mode to Festival." (interactive) (let ((coding-system-for-write 'iso-latin-1)) (write-region (point-min) (point-max) festival-tmp-file)) ;; Because there may by sgml-like sub-files mentioned ;; ensure festival tracks the buffer's default-directory (festival-send-command (list 'cd (expand-file-name default-directory))) (if (equal "-mode" (substring (format "%S" major-mode) -5 nil)) (if (equal "sgml" (substring (format "%S" major-mode) 0 -5)) (festival-send-command (list 'tts festival-tmp-file "sable")) (festival-send-command (list 'tts festival-tmp-file (substring (format "%S" major-mode) 0 -5)))) (festival-send-command (list 'tts festival-tmp-file nil)))) -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores) Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages festival depends on: ii adduser 3.112 add and remove users and groups ii dpkg 1.15.5.6 Debian package management system ii install-info 4.13a.dfsg.1-5 Manage installed documentation in ii libaudiofile0 0.2.6-8 Open-source version of SGI's audio ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib ii libesd0 0.2.41-7 Enlightened Sound Daemon - Shared ii libestools1.2 1:1.2.96~beta-6 Edinburgh Speech Tools Library ii libgcc1 1:4.4.3-3 GCC support library ii libncurses5 5.7+20090803-2 shared libraries for terminal hand ii libstdc++6 4.4.3-3 The GNU Standard C++ Library v3 ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip ii sgml-base 1.26 SGML infrastructure and SGML catal ii sysv-rc 2.87dsf-8.1 System-V-like runlevel change mech Versions of packages festival recommends: pn festvox-kallpc16k | festival- <none> (no description available) Versions of packages festival suggests: pn festival-freebsoft-utils <none> (no description available) pn pidgin-festival <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org