ABF is currently being migrated to new servers. Pull requests should be working.
avatar
Rosa has added 27f367b9db
initial: add from SRPM
... ... --- /dev/null
... ... +++ b/.abf.yml
... ... @@ -0,0 +1,2 @@
1
sources:
2
  "speech-dispatcher-0.7.1.tar.gz": be911de1ef334fa1708a7489f9dde51b499ab265
view file @ 27f367b9db
... ... --- /dev/null
... ... +++ b/speech-dispatcher-0.7.1-fix-str-fmt.patch
... ... @@ -0,0 +1,41 @@
1
--- src/modules/festival_client.c.orig	2010-09-01 14:30:12.000000000 +0100
2
+++ src/modules/festival_client.c	2011-04-09 01:05:00.206459349 +0100
3
@@ -437,7 +437,7 @@
4
         fd = fdopen(dup(info->server_fd),"wb"); \
5
         if (fd != NULL){ \
6
           str = g_strdup_printf(format"\n"); \
7
-          fprintf(fd, str); \
8
+          fprintf(fd, "%s", str); \
9
           DBG("-> Festival: |%s|", str); \
10
           free(str); \
11
           fclose(fd); \
12
@@ -453,7 +453,7 @@
13
         fd = fdopen(dup(info->server_fd),"wb"); \
14
         if (fd != NULL){ \
15
           str = g_strdup_printf(format"\n", args); \
16
-          fprintf(fd, str); \
17
+          fprintf(fd, "%s", str); \
18
           DBG("-> Festival: |%s|", str); \
19
           free(str); \
20
           fclose(fd); \
21
@@ -546,7 +546,7 @@
22
       str = g_strdup_printf("(%s \"", command);
23
     else
24
       str = g_strdup_printf("(%s '", command);
25
-    fprintf(fd, str);
26
+    fprintf(fd, "%s", str);
27
     /* Copy text over to server, escaping any quotes */
28
     for (p=text; p && (*p != '\0'); p++)
29
     {
30
31
--- src/modules/module_utils.c.str	2009-01-04 07:49:22.000000000 +0100
32
+++ src/modules/module_utils.c	2009-01-04 07:49:37.000000000 +0100
33
@@ -899,7 +899,7 @@
34
 {
35
     pthread_mutex_lock(&module_stdout_mutex);
36
     DBG("Printing reply: %s", text);
37
-    fprintf(stdout, text);
38
+    fprintf(stdout,"%s", text);
39
     fflush(stdout);
40
     DBG("Printed");
41
     pthread_mutex_unlock(&module_stdout_mutex);
view file @ 27f367b9db
... ... --- /dev/null
... ... +++ b/speech-dispatcher-user-pulse.example
... ... @@ -0,0 +1,262 @@
1
2
# Global configuration for Speech Dispatcher
3
# ==========================================
4
5
# -----SYSTEM OPTIONS-----
6
7
# The Port on which Speech Dispatcher should be available
8
# to clients.
9
10
# Port 6560
11
12
# By default, the specified port is opened only for connections
13
# comming from localhost. If LocalhostAccessOnly is set to 0 it
14
# disables this access controll. It means that the port will be
15
# accessible from all computers on the network. If you turn off this
16
# option, please make sure you set up some system rules on what
17
# computers are and are not allowed to access the Speech Dispatcher
18
# port.
19
20
# LocalhostAccessOnly 1
21
22
# -----LOGGING CONFIGURATION-----
23
24
# The LogLevel is a number between 0 and 5 that specifies
25
# how much of the logging information should be printed
26
# out on the screen or in the logfile (see LogFile)
27
# 0 means nothing, 5 means everything (not recommended).
28
29
LogLevel 3 
30
31
# The LogDir specifies where Speech Dispatcher writes its logging messages
32
# (status information, error messages, etc.).  Specify "stdout" for
33
# standard console output or a directory path. 'default' means that
34
# the logs are written to the default destination (e.g. a preconfigured
35
# system directory or the home directory if .speech-dispatcher is present)
36
# DO NOT COMMENT OUT THIS OPTION, SET IT TO "default" if you do not
37
# want to influence it.
38
39
#LogDir  "default"
40
LogDir  "$HOME/"
41
#LogDir  "stdout"
42
43
# The CustomLogFile allows logging all messages of the given kind,
44
# regardless their priority, to the given destination.
45
46
#CustomLogFile "protocol" "/var/log/speech-dispatcher/speechd-protocol.log"
47
48
# ----- VOICE PARAMETERS -----
49
50
# The DefaultRate controls how fast the synthesizer is going to speak.
51
# The value must be between -100 (slowest) and +100 (fastest), default
52
# is 0.
53
54
# DefaultRate  0
55
56
# The DefaultPitch controls the pitch of the synthesized voice.  The
57
# value must be between -100 (lowest) and +100 (highest), default is
58
# 0.
59
60
# DefaultPitch  0
61
62
# The DefaultVolume constrols the default volume of the voice.  It is
63
# a value between -100 (softly) and +100 (loudly).  Currently, +100
64
# maps to the default volume of the synthesizer.
65
66
DefaultVolume 100
67
68
# The DefaultVoiceType controls which voice type should be used by
69
# default.  Voice types are symbolic names which map to particular
70
# voices provided by the synthesizer according to the output module
71
# configuratuion.  Please see the synthesizer-specific configuration
72
# in etc/speechd/modules/ to see which voices are assigned to
73
# different symbolic names.  The following symbolic names are
74
# currently supported: MALE1, MALE2, MALE3, FEMALE1, FEMALE2, FEMALE3,
75
# CHILD_MALE, CHILD_FEMALE
76
77
# DefaultVoiceType  "MALE1"
78
79
# The Default language with which to speak
80
81
# DefaultLanguage "en"
82
83
84
# ----- MESSAGE DISPATCHING CONTROLL -----
85
86
# The DefaultClientName specifies the name of a client who didn't
87
# introduce himself at the beginning of an SSIP session.
88
89
# DefaultClientName  "unknown:unknown:unknown"
90
91
# The Default Priority. Use with caution, normally this shouldn't be
92
# changed globally (at this place)
93
94
# DefaultPriority  "text"
95
96
# The DefaultPauseContext specifies by how many index marks a speech
97
# cursor should return when resuming after a pause. This is roughly
98
# equivalent to the number of sentences before the place of the
99
# execution of pause that will be repeated.
100
101
# DefaultPauseContext 0
102
103
# -----SPELLING/PUNCTUATION/CAPITAL LETTERS  CONFIGURATION-----
104
105
# The DefaultPunctuationMode sets the way dots, comas, exclamation
106
# marks, question marks etc. are interpreted.  none: they are ignored
107
# some: some of them are sent to synthesis (see
108
# DefaultPunctuationSome) all: all punctuation marks are sent to
109
# synthesis
110
111
# DefaultPunctuationMode "none"
112
113
# The DefaultCapLetRecognition: if set to "spell", capital letters
114
# should be spelled (e.g. "capital b"), if set to "icon",
115
# capital letters are indicated by inserting a special sound
116
# before them but they should be read normally, it set to "none"
117
# capital letters are not recognized (by default)
118
119
# DefaultCapLetRecognition  "none"
120
121
# The DefaultSpelling: if set to On, all messages will be spelled
122
# unless set otherwise (this is usually not something you want to do.)
123
124
# DefaultSpelling  Off
125
126
# ----- AUDIO CONFIGURATION -----------
127
128
# -- AUDIO OUTPUT --
129
130
# Chooses between three possible sound output systems:
131
#       "oss"   - Open Sound System
132
#       "alsa"  - Advanced Linux Sound System
133
#       "nas"   - Network Audio System
134
#       "pulse" - PulseAudio
135
# ALSA is default and recommended. The recent implementations
136
# support mixing of multiple streams. OSS is only provided
137
# for compatibility with architectures that do not include ALSA.
138
# NAS is an audio server with higher level of control over
139
# your audio stream, with the possibility to stream your audio
140
# over the network to a different computer and other advanced
141
# features. (The NAS backend is not very well tested however.)
142
# PulseAudio is a sound server for POSIX and WIN32 systems. 
143
#
144
145
AudioOutputMethod "pulse"
146
147
# What ALSA device to use when Advanced Linux Sound Architecture is
148
# chosen for the audio output.
149
150
#AudioALSADevice "default"
151
152
# -- PulseAudio parameters --
153
154
AudioPulseServer "default"
155
156
# Maximum length of the buffer
157
158
#AudioPulseMaxLength 132300
159
160
# Target length of the buffer
161
# The server tries to assure that at least FestivalPulseTargetLength
162
# bytes are always available in the buffer
163
164
#AudioPulseTargetLength 4410
165
166
# Pre-buffering
167
# The server does not start with playback before at least 
168
# FestivalPulsePrebuffering bytes are available in the buffer
169
170
#AudioPulsePreBuffering 2200
171
172
# Minimum request
173
# The server does not request less than FestivalPulseMinRequest bytes
174
# from the client, instead waits until the buffer is free enough to
175
# request more bytes at once
176
177
#AudioPulseMinRequest 880
178
179
# -- OSS parameters --
180
181
# What OSS device to use when Open Sound System is
182
# chosen for the audio output.
183
184
#AudioOSSDevice "/dev/dsp"
185
186
# -- NAS parameters --
187
188
# Route to the Network Audio System server when NAS
189
# was chosen for the audio output. Note that NAS
190
# server doesn't need to run on your machine,
191
# you can use it also over network (for instance
192
# when working on remote machines).
193
194
#AudioNASServer "tcp/localhost:5450"
195
196
197
198
# -----OUTPUT MODULES CONFIGURATION-----
199
200
# Each AddModule line loads an output module.
201
#  Syntax: AddModule "name" "binary" "configuration" "logfile"
202
#  - name is the name under which you can acces this module
203
#  - binary is the path to the binary executable of this module,
204
#    either relative (to lib/speech-dispatcher-modules/) or absolute
205
#  - configuration is the path to the config file of this module,
206
#    either relative (to etc/speechd/modules/) or absolute
207
208
AddModule "espeak"       "sd_espeak"   "espeak.conf"
209
AddModule "festival"     "sd_festival"  "festival.conf"
210
#AddModule "flite"        "sd_flite"     "flite.conf"
211
AddModule "ivona"	 "sd_ivona"    "ivona.conf"
212
#AddModule "espeak-generic" "sd_generic" "espeak-generic.conf"
213
#AddModule "espeak-mbrola-generic" "sd_generic" "espeak-mbrola-generic.conf"
214
#AddModule "swift-generic" "sd_generic" "swift-generic.conf"
215
#AddModule "epos-generic" "sd_generic"   "epos-generic.conf"
216
#AddModule "dtk-generic"  "sd_generic"   "dtk-generic.conf"
217
#AddModule "ibmtts"       "sd_ibmtts"    "ibmtts.conf"
218
#AddModule "cicero"        "sd_cicero"     "cicero.conf"
219
220
# DO NOT REMOVE the following line unless you have
221
# a specific reason -- this is the fallback output module
222
# that is only used when no other modules are in use
223
AddModule "dummy"         "sd_dummy"      ""
224
225
# The output module testing doesn't actually connect to anything. It
226
# outputs the requested commands to standard output and reads
227
# responses from stdandard input. This way, Speech Dispatcher's
228
# communication with output modules can be tested easily.
229
230
# AddModule "testing"
231
232
# The DefaultModule selects which output module is the default.  You
233
# must use one of the names of the modules loaded with AddModule.
234
235
DefaultModule espeak
236
237
# The LanguageDefaultModule selects which output modules are prefered
238
# for specified languages.
239
240
#LanguageDefaultModule "en"  "espeak"
241
#LanguageDefaultModule "cs"  "festival"
242
#LanguageDefaultModule "es"  "festival"
243
244
# -----CLIENT SPECIFIC CONFIGURATION-----
245
246
# Here you can include the files with client-specific configuration
247
# for different types of clients. They must contain one or more sections with
248
# this structure:
249
#     BeginClient "emacs:*"
250
#          DefaultPunctuationMode "some"
251
#          ...and/or some other settings
252
#     EndClient
253
# The parameter of BeginClient tells Speech Dispatcher to which clients
254
# it should apply this settings (it does glob-style matching, you can use
255
# * to match any number of characters and ? to match one character)
256
257
# There are some sample client settings
258
259
Include "clients/emacs.conf"
260
Include "clients/gnome-speech.conf"
261
262
view file @ 27f367b9db
... ... --- /dev/null
... ... +++ b/speech-dispatcher.logrotate
... ... @@ -0,0 +1,11 @@
1
daily
2
compress
3
rotate 5
4
missingok
5
sharedscripts
6
7
/var/log/speech-dispatcher/*.log /var/log/speech-dispatcher/debug/* {
8
	postrotate
9
		service speech-dispatcherd restart >/dev/null
10
	endscript
11
}
view file @ 27f367b9db
... ... --- /dev/null
... ... +++ b/speech-dispatcher.spec
... ... @@ -0,0 +1,250 @@
1
%define major		2
2
%define shortname	speechd
3
%define libname		%mklibname %shortname %major
4
%define develname	%mklibname %shortname -d
5
6
%bcond_without alsa
7
%bcond_without pulse
8
%bcond_without nas
9
%bcond_without espeak
10
%bcond_without libao
11
12
13
Name:			speech-dispatcher
14
Summary:		Speech Dispatcher provides a device independent layer for speech synthesis
15
Group:			System/Libraries
16
Version:		0.7.1
17
Release:		%mkrel 1
18
License:		GPLv2
19
URL:			http://www.freebsoft.org/speechd
20
Source0:		http://www.freebsoft.org/pub/projects/speechd/%name-%version.tar.gz
21
# modified Fedora init script 
22
Source1:		speech-dispatcherd.init.mdv
23
Source2:		speech-dispatcher.logrotate
24
Source3:		speech-dispatcherd.default
25
Source4:		speech-dispatcher-user-pulse.example
26
Patch1:			speech-dispatcher-0.7.1-fix-str-fmt.patch
27
BuildRoot:		%_tmppath/%{name}-%{version}-%{release}-buildroot
28
%if %{with alsa}
29
BuildRequires:		libalsa-devel
30
%endif
31
%if %{with pulse}
32
BuildRequires:		pulseaudio-devel
33
%endif
34
%if %{with nas}
35
BuildRequires:		libnas-devel
36
%endif
37
%if %{with espeak}
38
BuildRequires:		libespeak-devel
39
%endif
40
%if %{with libao}
41
BuildRequires:		libao-devel
42
%endif
43
BuildRequires:		libdotconf-devel
44
BuildRequires:		python-devel
45
BuildRequires:		texinfo
46
Requires:		%libname = %version-%release
47
48
%description
49
This is the Speech Dispatcher project (speech-dispatcher). It is a part of the
50
Free(b)soft project, which is intended to allow blind and visually impaired
51
people to work with computer and Internet based on free software.
52
53
%post
54
%_install_info %name.info || :
55
%_install_info spd-say.info || :
56
%_install_info ssip.info || :
57
%_install_info %name-cs.info || :
58
%_post_service speech-dispatcherd || :
59
60
%preun
61
%_remove_install_info %name.info || :
62
%_remove_install_info spd-say.info || :
63
%_remove_install_info ssip.info || :
64
%_remove_install_info %name-cs.info || :
65
%_preun_service speech-dispatcherd || :
66
67
%files
68
%defattr(-,root,root,-)
69
%doc AUTHORS NEWS README COPYING INSTALL TODO 
70
%doc ChangeLog speech-dispatcher-user-pulse.example
71
%_bindir/cli*
72
%_bindir/connection_recovery
73
%_bindir/spd-say
74
%_bindir/spd_long_message
75
%_bindir/spd_run_test
76
%_bindir/spdsend
77
%_bindir/%name
78
%_initrddir/speech-dispatcherd
79
%config %_sysconfdir/logrotate.d/%name
80
%config(noreplace) %_sysconfdir/%name/speechd.conf
81
%config(noreplace) %_sysconfdir/%name/clients/*.conf
82
%config(noreplace) %_sysconfdir/%name/modules/*.conf
83
%config(noreplace) %_sysconfdir/default/speech-dispatcherd
84
%_libdir/%name-modules
85
%_libdir/%name
86
%_datadir/sounds/%name
87
%_infodir/*
88
%_logdir/%name
89
90
#--------------------------------------------------------------------------
91
92
%package -n %libname
93
Summary:		Shared libraries for %name
94
Group:			System/Libraries
95
96
%description -n		%libname
97
This package provides the shared libraries for Speech Dispatcher.
98
99
%files -n %libname
100
%defattr(-,root,root,-)
101
%_libdir/libspeechd.so.%{major}*
102
103
#--------------------------------------------------------------------------
104
105
%package -n %develname
106
Summary:		Development files for %name
107
Group:			Development/Other
108
Requires:		%name = %version-%release
109
Provides:		%name-devel = %version-%release
110
Provides:		lib%name-devel = %version-%release
111
112
%description -n %develname
113
This package contains development files for %name.
114
115
%files -n		%develname
116
%defattr(-,root,root)
117
%_includedir/*
118
%_libdir/lib*.so
119
%_libdir/lib*.la
120
%_libdir/speech-dispatcher/lib*.la
121
%_libdir/speech-dispatcher/lib*.so
122
123
#--------------------------------------------------------------------------
124
125
%package -n python-%shortname
126
Summary:		A Python library for communication with Speech Dispatcher
127
Group:			System/Libraries
128
Requires:		%name = %version-%release
129
Requires:		python
130
131
%description -n		python-%shortname
132
This package provides a Python library for communication 
133
with Speech Dispatcher.
134
135
%files -n python-%shortname
136
%doc ChangeLog
137
%defattr(-,root,root,-)
138
%_bindir/spd-conf
139
%python_sitelib/speechd*
140
%_datadir/sounds/%name/test.wav
141
142
#--------------------------------------------------------------------------
143
144
%prep
145
%setup -q
146
%patch1 -p0
147
cp -p %SOURCE4 .
148
149
%build
150
%ifarch x86_64
151
export am_cv_python_pyexecdir=%python_sitelib
152
%endif
153
%configure2_5x \
154
	LDFLAGS=' -Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id' \
155
	--disable-static \
156
%if %{with alsa}
157
	--with-alsa \
158
%else
159
	--without-alsa \
160
%endif
161
%if %{with pulse}
162
	--with-pulse \
163
%else
164
	--without-pulse \
165
%endif
166
%if %{with nas}
167
	--with-nas \
168
%else
169
	--without-nas \
170
%endif
171
%if %{with espeak}
172
	--with-espeak \
173
%else
174
	--without-espeak \
175
%endif
176
%if %{with libao}
177
	--with-libao
178
%else
179
	--without-libao
180
%endif
181
182
%make
183
184
%install
185
rm -rf %buildroot
186
%makeinstall_std
187
188
# remove duplicates with /etc conf files 
189
rm -rf %buildroot%_datadir/%name
190
191
# rename some executables
192
mv %buildroot%_bindir/long_message %buildroot%_bindir/spd_long_message
193
mv %buildroot%_bindir/run_test %buildroot%_bindir/spd_run_test
194
195
# speech-dispatcherd service
196
install -d -m 0755 %buildroot%_initrddir
197
install -m 0755 %SOURCE1 %buildroot%_initrddir/speech-dispatcherd
198
199
# fix perm in _test.py
200
chmod +x %buildroot%python_sitelib/speechd/_test.py
201
202
# logrotate install
203
install -d -m 0755 %buildroot%_sysconfdir/logrotate.d
204
install -m 0644 %SOURCE2 %buildroot%_sysconfdir/logrotate.d/%name
205
206
# create the needed directory for logs
207
install -d -m 0755 %buildroot%_logdir/%name
208
209
# install the /etc/default configuration file
210
install -d -m 0755 %buildroot%_sysconfdir/default
211
install -m 0644 %SOURCE3 %buildroot%_sysconfdir/default/speech-dispatcherd
212
213
# remove flite module from the default configuration in speechd.conf
214
sed -i -e "210 s:AddModule:#AddModule:g" %buildroot%_sysconfdir/%name/speechd.conf
215
216
%clean
217
rm -rf %buildroot
218
219
220
%changelog
221
* Sun Apr 10 2011 José Melo <mmodem@mandriva.org> 0.7.1-1mdv2011.0
222
+ Revision: 652299
223
- export python path else isnt correctly detected in arch x86_64
224
- arrange spec
225
- 0.7.1
226
- use bcond macro instead
227
- add libao support
228
- update patch1
229
- drop patches:0,3 (fixed upstream)
230
- drop patch2,different makefile
231
- set ldflags (remove --no-undefined -Wl to avoid breaking build)
232
- fix spec to avoid listing files twice
233
234
* Wed Nov 18 2009 Jérôme Brenier <incubusss@mandriva.org> 0.6.7-3mdv2011.0
235
+ Revision: 467193
236
- fix build (getline conflict) : patch from debian
237
238
  + Thierry Vignaud <tv@mandriva.org>
239
    - rebuild
240
241
* Sun Jan 04 2009 Funda Wang <fwang@mandriva.org> 0.6.7-2mdv2009.1
242
+ Revision: 324152
243
- fix strfmt
244
- rebuild
245
246
* Tue Nov 11 2008 Nicolas Lécureuil <nlecureuil@mandriva.com> 0.6.7-1mdv2009.1
247
+ Revision: 302106
248
- import speech-dispatcher
249
250
view file @ 27f367b9db
... ... --- /dev/null
... ... +++ b/speech-dispatcherd.default
... ... @@ -0,0 +1,2 @@
1
#0 = don't start, 1 = start
2
SPD_DAEMON_START=0
view file @ 27f367b9db
... ... --- /dev/null
... ... +++ b/speech-dispatcherd.init.mdv
... ... @@ -0,0 +1,82 @@
1
#!/bin/bash
2
#
3
# Mandriva speech-dispatcherd initscript
4
#
5
# TODO: make LSB Compliant
6
### BEGIN INIT INFO
7
# Provides: speech-dispatcherd
8
# Default-Start: 2 3 4 5
9
# Required-Start: $network
10
# Required-Stop: $network
11
# Short-Description: layer for speech analysis
12
# Description: provides a high-level device independent \
13
#              layer for speech synthesis.
14
### END INIT INFO
15
16
. /etc/rc.d/init.d/functions
17
18
NAME=speech-dispatcherd
19
DAEMON=/usr/bin/speech-dispatcher
20
CONFIG=/etc/speech-dispatcher/speechd.conf
21
PID_FILE=/var/run/speech-dispatcher.pid
22
LOCK_FILE=/var/lock/subsys/$NAME
23
SPD_DAEMON_START=0
24
25
# Include speech-dispatcherd defaults if available
26
if [ -f /etc/default/$NAME ] ; then
27
	. /etc/default/$NAME
28
fi
29
30
31
start() {
32
	if [ "$SPD_DAEMON_START" != "1" ]; then
33
		gprintf "Not starting $NAME, disableb via /etc/default/$NAME\n"
34
		exit 0
35
	fi
36
	gprintf "Starting $NAME: "
37
	daemon $DAEMON 
38
	RETVAL=$?
39
	echo
40
  	[ $RETVAL -eq 0 ] && touch $LOCK_FILE
41
}
42
43
stop() {
44
	gprintf "Shutting down $NAME: "
45
	killproc $DAEMON
46
	RETVAL=$?
47
	echo
48
	if [ $RETVAL -eq 0 ]; then
49
		rm -f $LOCK_FILE
50
		rm -f $PID_FILE
51
	fi
52
}
53
54
55
case "$1" in
56
	start)
57
		start
58
		;;
59
	stop)
60
		stop
61
		;;
62
	restart)
63
		stop
64
		sleep 1
65
		start
66
		;;
67
	reload)
68
		restart
69
		;;
70
	status)
71
		status $DAEMON
72
		;;
73
	condrestart|try-restart)
74
		if [ -f $LOCK_FILE ]; then
75
			restart
76
		fi
77
		;;
78
	*)
79
		gprintf "Usage: %s {start|stop|status|restart|condrestart|try-restart|reload}\n" "$0"
80
esac
81
82
exit $RETVAL

Comments