| 1 |
Speech Dispatcher TODO |
| 2 |
====================== |
| 3 |
|
| 4 |
The release versions are not final, and could change. Targetted release is |
| 5 |
based on demand from users, and difficulty of the work involved. |
| 6 |
|
| 7 |
* Add pitch as an option for capitalization presentation |
| 8 |
see https://github.com/brailcom/speechd/issues/24 |
| 9 |
* Allow setting a synthesis voice in the user config using spd-conf. |
| 10 |
* Add support for Mimic |
| 11 |
see https://github.com/brailcom/speechd/issues/19 |
| 12 |
* Drop getting information from other clients |
| 13 |
see https://github.com/brailcom/speechd/issues/335 |
| 14 |
(0.11) Migrate to GSettings. |
| 15 |
(0.11) Synthesizer specific settings API. |
| 16 |
(0.11) Use more GLib in the server. |
| 17 |
(0.11) Client audio retrieval API. |
| 18 |
(0.11) Server to module protocol documentation. |
| 19 |
(0.12) Server to module protocol improvements. |
| 20 |
* Move synth modules to plugin architecture with plugin host. |
| 21 |
* Synth plugin API. |
| 22 |
* Allow for building synth plugins out of tree. |
| 23 |
(0.11) Integrate with logind/consolekit. |
| 24 |
(0.11) Properly support system-wide mode. |
| 25 |
* Support spawning the server via Systemd socket activation. |
| 26 |
|
| 27 |
|
| 28 |
The above improvements are documented in detail below. If work has started on |
| 29 |
a particular project, a git branch will be noted. These git branches are |
| 30 |
located at https://github.com/TheMuso/speechd-wip.git. To read the most up to |
| 31 |
date copy of this file, please clone the master Speech Dispatcher git |
| 32 |
repository, located at git://git.freebsoft.org/git/speechd.gitand check out |
| 33 |
the master branch. |
| 34 |
|
| 35 |
Migrate to GSettings |
| 36 |
-------------------- |
| 37 |
|
| 38 |
* Write the GSettings metadata XML file. |
| 39 |
* Migrate the server to GSettings. |
| 40 |
* Listen to GSettings changes. |
| 41 |
* Migrate synthesizer modules to GSettings. |
| 42 |
* Write a program to migrate user settings to GSettings. |
| 43 |
|
| 44 |
|
| 45 |
Synthesizer specific settings API |
| 46 |
Depends on: Migration to GSettings |
| 47 |
--------------------------------- |
| 48 |
|
| 49 |
Background: |
| 50 |
* Currently have API for espeak pitch range in git master, but this is only |
| 51 |
useful for espeak. |
| 52 |
* Espeak module has a config option to show variants along with available |
| 53 |
voices, which can be a very long list and can choak some clients. |
| 54 |
|
| 55 |
* Implement server to module protocol to support: |
| 56 |
- Request available settings. |
| 57 |
- Request available settings and their current value. |
| 58 |
- Request the value of a setting. |
| 59 |
- Set a setting. |
| 60 |
- Reset a setting to its default. |
| 61 |
* Implement SSIP protocol support. |
| 62 |
* Implement C API, see synthesizer specific settings C API draft. |
| 63 |
* Implement python API. |
| 64 |
|
| 65 |
Synthesizer specific settings C API draft |
| 66 |
|
| 67 |
typedef struct { |
| 68 |
char *name; |
| 69 |
char *description; /* This should be localized */ |
| 70 |
enum SynthSettingValueType get_type; |
| 71 |
enum SynthSettingValueType set_type; |
| 72 |
int min_value; |
| 73 |
int max_value; |
| 74 |
char **value_list; |
| 75 |
void *cur_value; |
| 76 |
] SynthSetting; |
| 77 |
|
| 78 |
In the C API, a NULL terminated array of this structure would be returned for |
| 79 |
all settings a synth offers. |
| 80 |
|
| 81 |
The SynthSettingValueType enum would look something like this: |
| 82 |
|
| 83 |
typedef enum { |
| 84 |
SYNTH_SETTING_VALUE_UNKNOWN = 0, |
| 85 |
SYNTH_SETTING_VALUE_NUMBER = 1, |
| 86 |
SYNTH_SETTING_VALUE_STRING = 2, |
| 87 |
SYNTH_SETTING_VALUE_STRING_LIST = 3 /* A list of strings for the user |
| 88 |
to choose from, i.e voice variants */ |
| 89 |
} SynthSettingValueType; |
| 90 |
|
| 91 |
C API methods to work with these data types could be as follows: |
| 92 |
|
| 93 |
SynthSetting **spd_synth_get_settings(SPDConnection *connection); |
| 94 |
int spd_synth_set_setting(SPDConnection *connection, SynthSetting *setting, |
| 95 |
void *value); |
| 96 |
void free_synth_settings(SynthSettings **settings); |
| 97 |
|
| 98 |
|
| 99 |
Use more GLib in the server |
| 100 |
--------------------------- |
| 101 |
|
| 102 |
* Use GLib event loops where possible. |
| 103 |
* use GLib GThreads and GAsyncQueues for thread communication. |
| 104 |
* Use g_spawn calls for executing modules. |
| 105 |
* Support multiple client connection methods, unix socket, inet socket. |
| 106 |
* Use g_debug and other relevant GLib logging facilities for |
| 107 |
messages/logging. |
| 108 |
* Use GThreadedSocketService for handling client connections. |
| 109 |
* Replace custom implementations of parsing buffers with GLib equivalent |
| 110 |
methods where possible. |
| 111 |
|
| 112 |
|
| 113 |
Move audio into server |
| 114 |
---------------------- |
| 115 |
|
| 116 |
* Consider using a separate socket for audio transfer, however this may be |
| 117 |
difficult when attempting to synchronise with index marks. An alternative is |
| 118 |
to send index mark data via the audio socket as well. |
| 119 |
* Rework modules supporting audio output to not use any advanced internal |
| 120 |
playback queueing, and simply send the audio in relatively small buffers to |
| 121 |
the server. Smaller buffers to allow the server to stop/pause the audio more |
| 122 |
responsively. |
| 123 |
* Extend priority system to be either global priority, or priority per audio |
| 124 |
output device. |
| 125 |
* Rework pulseaudio output to use a GLib event loop. |
| 126 |
* Rework other audio output modules to better work within an event loop. |
| 127 |
|
| 128 |
|
| 129 |
Client audio retrieval API |
| 130 |
-------------------------- |
| 131 |
|
| 132 |
* Allow client to either request audio directly, or have audio written to a |
| 133 |
designated file on disk. |
| 134 |
* Allow modules to decline the use of direct audio retrieval. I know of one |
| 135 |
speech synth that is not supported by speech dispatcher, who's licensing |
| 136 |
model doesn't allow for direct audio retrieval. If this module is ever |
| 137 |
supported, its code will likely remain closed to prevent people working |
| 138 |
around the implementation, but it would still be nice to support this synth |
| 139 |
in the longer term. (Luke Yelavich) |
| 140 |
* Load a new instance of the requested synth module, and spin up a worker |
| 141 |
thread to handle audio file writing or sending to client, to allow the server |
| 142 |
to dispatch other speech messages, as direct audio retrieval should be |
| 143 |
independant of the priority system. |
| 144 |
|
| 145 |
|
| 146 |
Server to module protocol documentation |
| 147 |
--------------------------------------- |
| 148 |
|
| 149 |
* Similar to the SSIp documentation, write up a texi document that explains |
| 150 |
the server to module protocol, currently over stdin/stdout, but may use other |
| 151 |
IPC in the future. |
| 152 |
|
| 153 |
|
| 154 |
Server to module protocol improvements |
| 155 |
-------------------------------------- |
| 156 |
|
| 157 |
* Consider using sockets for IPC, with a dedicated socket per module. |
| 158 |
* Consider implementing shared memory support, particularly for audio data |
| 159 |
transfer, but this may depend on whether GLib has a shared memory API, The |
| 160 |
GMappedFile API may be useful, if the initiator can change the contents of |
| 161 |
the GMappedFile, and the other side can notice changes. Needs investigation. |
| 162 |
* Support the launching of modules via systems other than Speech Dispatcher, |
| 163 |
useful where containers of some sort are being used, and the environment |
| 164 |
requires that any separate processes are run in containers/other kind of |
| 165 |
sandbox, hense the use of sockets as per above. |
| 166 |
|
| 167 |
|
| 168 |
Integrate with logind/consolekit |
| 169 |
(Depends on migration to GSettings, GLib main event loops everywhere) |
| 170 |
-------------------------------- |
| 171 |
|
| 172 |
* Query current user, and currently running sessions for that user. |
| 173 |
* Subscribe to tty change events and cork audio playback and synthesis flow |
| 174 |
if none of the user's sessions are active. |
| 175 |
* Allow the enabling/disabling of logind/consolekit via GSettings and at |
| 176 |
runtime, enabled being the default. |
| 177 |
* Allow the disabling of consolekit/logind at build time. |
| 178 |
* Consider abstracting this functionality into plugins, or at the very least |
| 179 |
separate code with an internal API to more easily support any future |
| 180 |
session/seat monitoring systems. |
| 181 |
|
| 182 |
|
| 183 |
Properly support system-wide mode |
| 184 |
--------------------------------- |
| 185 |
|
| 186 |
* Set a default user and group for the system wide instance to run under, at |
| 187 |
build time, and runtime. |
| 188 |
* Add a systemd unit to allow the use of system wide mode, disabled by |
| 189 |
default. |
| 190 |
|
| 191 |
|
| 192 |
Support spawning the server via Systemd socket activation |
| 193 |
--------------------------------------------------------- |
| 194 |
|
| 195 |
* Allow this to be enabled/disabled at build time. |
| 196 |
|
| 197 |
|
| 198 |
Copyright (C) 2001 Brailcom, o.p.s |
| 199 |
Copyright (C) 2016 Luke Yelavich <[email protected]> |
| 200 |
Copyright (C) 2018-2021 Samuel Thibault <[email protected]> |
| 201 |
|
| 202 |
This program is free software; you can redistribute it and/or modify it under |
| 203 |
the terms of the GNU General Public License as published by the Free Software |
| 204 |
Foundation; either version 2 of the License, or (at your option) any later |
| 205 |
version. |
| 206 |
|
| 207 |
This program is distributed in the hope that it will be useful, but WITHOUT ANY |
| 208 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 209 |
PARTICULAR PURPOSE. See the GNU General Public License for more details (file |
| 210 |
COPYING in the root directory). |
| 211 |
|
| 212 |
You should have received a copy of the GNU General Public License |
| 213 |
along with this program. If not, see <https://www.gnu.org/licenses/>. |