--- cicero-0.7.2.orig/LISEZ-MOI +++ cicero-0.7.2/LISEZ-MOI @@ -86,7 +86,7 @@ - dans /etc/brltty.conf, inscrire les lignes suivantes : -speech-driver es +speech-driver xs speech-parameters program=/home/foo/cicero/brl_es_wrapper,uid=500,gid=500 en indiquant le chemin où vous avez extrait la présente archive de même --- cicero-0.7.2.orig/Makefile +++ cicero-0.7.2/Makefile @@ -0,0 +1,29 @@ +PREFIX=/usr +BINDIR=$(PREFIX)/bin +CICERO=$(PREFIX)/share/cicero +DOC=$(PREFIX)/share/doc/cicero +EXAMPLES=$(DOC)/examples +LOG=/var/log/cicero +DESTDIR= + +all: config.py brltty_es_wrapper + +config.py: config.py.in + sed -e "s|__CICERO__|$(CICERO)|g" < $< > $@ + +brltty_es_wrapper: brltty_es_wrapper.in + sed -e "s|__CICERO__|$(CICERO)|g" -e "s|__LOG__|$(LOG)|g" < $< > $@ + chmod 755 brltty_es_wrapper + +clean: + -rm config.py brltty_es_wrapper + +install: config.py brltty_es_wrapper + install -d $(DESTDIR)/$(CICERO) \ + $(DESTDIR)/$(LOG) \ + $(DESTDIR)/$(BINDIR) + install *.py brltty_es_wrapper $(DESTDIR)/$(CICERO) + install -m 644 rules* $(DESTDIR)/$(CICERO) + ln -s $(CICERO)/tts_brltty_es.py $(DESTDIR)/$(BINDIR)/cicero + +.PHONY: install clean all --- cicero-0.7.2.orig/app_brltty_es.py +++ cicero-0.7.2/app_brltty_es.py @@ -18,7 +18,7 @@ # In the other direction we send back indexes to track the current # listening position. -import os, sys, struct +import os, sys, struct, errno import setencoding import tracing @@ -44,7 +44,7 @@ sys.stdout.write(d) sys.stdout.flush() except IOError, x: - if x.errno == 32: + if x.errno == errno.EPIPE: trace('Exit on broken pipe') sys.exit(0) else: --- cicero-0.7.2.orig/app_shell.py +++ cicero-0.7.2/app_shell.py @@ -17,7 +17,7 @@ # EOF causes the tts program to exit. # This interface is meant to be simple, not feature-full. -import os, sys, fcntl +import os, sys, fcntl, errno import setencoding import tracing @@ -56,7 +56,7 @@ try: input = sys.stdin.read() except IOError, x: - if x.errno == 11: + if x.errno == errno.EAGAIN: return 'M',None raise if input == '': --- cicero-0.7.2.orig/brltty_es_wrapper.in +++ cicero-0.7.2/brltty_es_wrapper.in @@ -0,0 +1,5 @@ +#!/bin/sh +# Having a wrapper makes it easy to redirect debugging/tracing output. +exec /usr/bin/python \ + __CICERO__/tts_brltty_es.py \ + 2>> __LOG__/cicero-log --- cicero-0.7.2.orig/bulktalk.py +++ cicero-0.7.2/bulktalk.py @@ -66,7 +66,7 @@ + " -t " + str(config.mbrola_t) \ + " -e " + config.mbrola_voice \ + " - " \ - + ( outf or "-.au | sox -t .au - -tossdsp "+config.snd_dev ) + + ( outf or "-.au | sox -t .au - "+config.snd_dev ) pipe = os.popen(cmd, 'w') phonos = phonos.split('\n') phonos.insert(0, "_\t200") --- cicero-0.7.2.orig/config.py.in +++ cicero-0.7.2/config.py.in @@ -0,0 +1,21 @@ +# For now we gather config options here. +# TODO: Make this a robustly parsed external config file, rather than having +# users edit code. + +# Language phonetic rules and filters. +rulefile = "__CICERO__/rules.fr" +# List of known good phonetic translations for regression check +testfile = "__CICERO__/checklist.fr" +# MBROLA executable +mbrola_prog_path = '/usr/bin/mbrola' +# MBROLA voice file +mbrola_voice = '/usr/share/mbrola/fr4/fr4' +# pitch factor +mbrola_f = 1.80 +# default time factor (smaller talks faster) +# note: BRLTTY for example might override this with its own value +mbrola_t = 0.9 +# Output sound device +snd_dev = '/dev/dsp' +# Debugging output on stderr +tracing = 0 --- cicero-0.7.2.orig/debian/README.Debian +++ cicero-0.7.2/debian/README.Debian @@ -0,0 +1,22 @@ +Quickcheck +========== +Run + +/usr/share/cicero/tts_shell.py + +and typing text. + + + +BRLTTY +====== +Add the following lines to /etc/brltty.conf: + +speech-driver xs +speech-parameters xs:Programs=/usr/share/cicero/brltty_es_wrapper,Gid=0,Uid=0 + + + +Speech-Dispatcher +================= +Uncomment the AddModule "cicero" line in /etc/speech-dispatcher/speechd.conf --- cicero-0.7.2.orig/debian/changelog +++ cicero-0.7.2/debian/changelog @@ -0,0 +1,36 @@ +cicero (0.7.2-4) unstable; urgency=medium + + * control: Bump Standards-Version to 4.1.4 (no change). + * Use canonical anonscm vcs URL. + * control: Update maintainer mailing list. + + -- Samuel Thibault Sat, 28 Apr 2018 17:35:25 +0200 + +cicero (0.7.2-3) unstable; urgency=low + + * control: Bump Standards-Version to 3.9.6 (no changes). + * sndoutput.py: Raise a BaseException instead of just an str + (Closes: Bug#732841). + + -- Samuel Thibault Sun, 19 Oct 2014 16:52:35 +0200 + +cicero (0.7.2-2) unstable; urgency=low + + * Bump Standards-Version to 3.9.2 (no change needed) + * Depend on oss-compat. + + -- Samuel Thibault Tue, 03 Jan 2012 00:13:07 +0100 + +cicero (0.7.2-1) unstable; urgency=low + + * Initial upload to Debian (Closes: Bug#594834). + + -- Samuel Thibault Mon, 30 Aug 2010 02:10:15 +0200 + +cicero (0.7-1) unstable; urgency=low + + * Initial release: config.py uses mbrola-fr4. + python is currently a link to python2.3. + The brltty install is not yet operationnal. + + -- Gilles Casse Wed, 13 Sep 2006 11:21:19 +0200 --- cicero-0.7.2.orig/debian/compat +++ cicero-0.7.2/debian/compat @@ -0,0 +1 @@ +7 --- cicero-0.7.2.orig/debian/control +++ cicero-0.7.2/debian/control @@ -0,0 +1,30 @@ +Source: cicero +Section: contrib/sound +Priority: optional +Maintainer: Debian Accessibility Team +Uploaders: Samuel Thibault +Vcs-Browser: https://anonscm.debian.org/git/pkg-a11y/cicero.git +Vcs-Git: https://anonscm.debian.org/git/pkg-a11y/cicero.git +Homepage: http://pages.infinit.net/fluxnic/cicero/ +Build-Depends: debhelper (>= 7) +Standards-Version: 4.1.4 + +Package: cicero +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.3), mbrola-fr4, sox, oss-compat +Description: French and English Text-To-Speech for MBROLA + This Text-To-Speech (TTS) engine speaks French; a preliminary English support + is also offered. + The engine uses context-sensitive rules to produce phonemes from the text. It + relies on MBROLA to generate actual audio output from the phonemes. The TTS + engine is implemented using the Python programming language. + . + The upstream authors have come up with this TTS to try and meet their own needs + as blind users. + It's designed to be plugged as output to some screen-review software, firstly + with BRLTTY. + They favor speed and intelligibility over perfect pronunciation. + Cicero is aimed to have a quick response time, the ability to quickly shut-up + and skip to another utterance, intelligibility where it counts (not perfect + pronunciation), the ability to track speech progression, relative simplicity + (hackability) and relative small code size. --- cicero-0.7.2.orig/debian/copyright +++ cicero-0.7.2/debian/copyright @@ -0,0 +1,22 @@ +This package was debianized by Gilles Casse on +Wed, 13 Sep 2006 11:21:19 +0200. + +It was downloaded from http://pages.infinit.net/fluxnic/cicero/ + +Upstream Authors: Nicolas Pitre , Stéphane Doyon + +Copyright: + +2003-2008 Nicolas Pitre +2003-2008 Stéphane Doyon + +License: + +This software is distributed under the GNU General Public Licence (GPL) version +2. On Debian GNU/Linux systems, the complete text of the GNU General Public +License version 2 can be found in /usr/share/common-licenses/GPL-2, + +The Debian packaging is (C) 2006, Gilles Casse and +is licensed under the GPL or any later version, see +`/usr/share/common-licenses/GPL-3'. + --- cicero-0.7.2.orig/debian/docs +++ cicero-0.7.2/debian/docs @@ -0,0 +1,7 @@ +TODO +LISEZ-MOI +README +rule_format.txt +checklist* +*.sample +top*.txt --- cicero-0.7.2.orig/debian/rules +++ cicero-0.7.2/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ --- cicero-0.7.2.orig/mbrola_prog.py +++ cicero-0.7.2/mbrola_prog.py @@ -12,7 +12,7 @@ # This module wraps up the details of managing a pipe to the MBROLA executable. -import os, fcntl, signal, popen2, struct, time +import os, fcntl, signal, popen2, struct, time, errno from select import select from profiling import * @@ -91,7 +91,7 @@ try: s = self.p.childerr.read() except IOError, x: - if x.errno == 11: + if x.errno == errno.EAGAIN: return raise if s: @@ -131,7 +131,7 @@ try: sound = self.p.fromchild.read() except IOError, x: - if x.errno == 11: + if x.errno == errno.EAGAIN: return '', 0 raise if self.finished: --- cicero-0.7.2.orig/saypho.py +++ cicero-0.7.2/saypho.py @@ -27,7 +27,7 @@ + " -f " + str(config.mbrola_f) \ + " -t " + str(config.mbrola_t) \ + " -e " + config.mbrola_voice \ - + " - -.raw | sox -traw -r16000 -c1 -w -s - -tossdsp " + config.snd_dev + + " - -.raw | sox -traw -r16000 -c1 -w -s - " + config.snd_dev pipe = os.popen(cmd, 'w') phos = sys.argv[1:] --- cicero-0.7.2.orig/sndoutput.py +++ cicero-0.7.2/sndoutput.py @@ -17,7 +17,7 @@ import ossaudiodev from threading import * -import struct, sys, time, array, fcntl +import struct, sys, time, array, fcntl, errno import tracing def trace(msg): @@ -126,11 +126,11 @@ self.dsp = ossaudiodev.open(config.snd_dev, 'w') break except IOError, x: - if x.errno != 16: + if x.errno != errno.EBUSY: raise trace('device is busy') if self.bufsize==-1 and time.time() -start > 4.0: - raise 'Sound device is busy' + raise BaseException('Sound device is busy') time.sleep(0.5) self.dsp.setparameters(ossaudiodev.AFMT_S16_LE, 1, self.rate, 0) fcntl.ioctl(self.dsp.fileno(), SNDCTL_DSP_SETFRAGMENT, FRAGCODE, 1) @@ -143,7 +143,7 @@ try: r = self.dsp.write(b) except IOError, x: - if x.errno != 11: + if x.errno != errno.EAGAIN: raise r = 0 self.lock.acquire() --- cicero-0.7.2.orig/ttp.py +++ cicero-0.7.2/ttp.py @@ -401,7 +401,7 @@ + " -f " + str(config.mbrola_f) \ + " -t " + str(config.mbrola_t) \ + " -e " + config.mbrola_voice \ - + " - -.raw | sox -traw -r16000 -c1 -w -s - -tossdsp " + config.snd_dev + + " - -.raw | sox -traw -r16000 -c1 -w -s - " + config.snd_dev import os pipe = os.popen(cmd, 'w')