1# Copyright (C) 2003 Brailcom, o.p.s 2# Copyright (C) 2006 Gary Cramblitt <garycramblitt@comcast.net> 3# 4# This program is free software; you can redistribute it and/or modify it under 5# the terms of the GNU General Public License as published by the Free Software 6# Foundation; either version 2 of the License, or (at your option) any later 7# version. 8# 9# This program is distributed in the hope that it will be useful, but WITHOUT ANY 10# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11# PARTICULAR PURPOSE. See the GNU General Public License for more details (file 12# COPYING in the root directory). 13# 14# You should have received a copy of the GNU General Public License 15# along with this program. If not, see <https://www.gnu.org/licenses/>. 16# 17~5 18* 19 20@ Welcome, LSM 2003 21@ this is a tour through SSIP! 22 23@ SSIP stands for Speech Synthesis Internet Protocol, 24@ It's the actual interface to Speech Dispatcher. 25 26? 27* 28 29@ Introductory examples I 30 31@ Let's try our first commands. 32? 33 34!SET SELF CLIENT_NAME unknown:run_test:main 35!SET SELF OUTPUT_MODULE flite 36 37!SPEAK 38Hello all, welcome at Libre Software Meeting 2003! 39. 40 41? 42* 43 44@ Introductory examples II 45 46@ Now something more complicated. 47@ We will switch our output module to Festival. 48 49!SET SELF OUTPUT_MODULE festival 50? 51 52@ Set the voice rate a little bit lower. 53 54!SET SELF RATE -20 55? 56 57!SPEAK 58I have often regretted my speech, never my silence. 59 -- Publilius Syrus 60. 61 62? 63* 64 65@ S S I P --- Basic ideas 66@ 67@ * Communication `client library' <--> `Speech Dispatcher' 68@ 69@ * Synchronous TCP/IP protocol 70@ (remote hosts) 71@ 72@ * Strict separation between client and the actual synthesis 73@ (abstract voice names, output module selection, ...) 74@ 75@ * Priorities 76@ 77@ * All configuration is done by user in Speech Dispatcher 78@ 79@ * Multiple connections per client 80 81? 82* 83 84@ S S I P --- Command families 85@ 86@ * Speech synthesis / sound output 87@ (SPEAK, CHAR, KEY, SOUND_ICON) 88@ 89@ * Speech output control 90@ (STOP, CANCEL, PAUSE, RESUME) 91@ 92@ * Parameter setting 93@ (RATE, PITCH, TABLES, VOICE, ...) 94@ 95@ * Information retrieval 96@ (not necessary) 97@ 98@ * History of messages 99@ (very important for visually impaired) 100 101? 102* 103 104@ More examples -- Languages and output modules 105 106@ Again the English voice (english is default). 107 108!SPEAK 109I call our world Flatland, not because we call it so, 110but to make its nature clearer to you, my happy readers, 111who are privileged to live in Space. 112 113Imagine a vast sheet of paper on which straight Lines, 114Triangles, Squares, Pentagons, Hexagons, and other figures, 115instead of remaining fixed in their places, move freely about, 116on or in the surface, but without the power of rising above 117or sinking below it, very much like shadows--only hard 118with luminous edges--and you will then have a pretty correct 119notion of my country and countrymen. Alas, a few years ago, 120I should have said "my universe:" but now my mind has been 121opened to higher views of things. 122 123(an excerpt from ``Flatland, The romance of many dimensions 124 by Edwin Abbot'') 125. 126 127? 128 129@ Now we can try to set some exotic language ;) 130? 131 132!SET SELF LANGUAGE cs 133 134!SPEAK 135Ahoj lidi, jak se máte? Já se mám skvěle! Víte, já sem strašně 136ukecanej, ale nikdo si se mnou nechce povídat. 137. 138 139@ Or another exotic language 140? 141 142!SET SELF LANGUAGE es 143 144!SPEAK 145Hola, como estais? Alguien habla espanol aqui? 146Es que es una lengua muy bonita! 147. 148 149!SET SELF LANGUAGE en 150 151? 152* 153 154@ Text processing -- Examples 155 156@ When reading books, it's best to just listen to the text, 157@ but when a visually impaired person wants to edit some 158@ text, it is handy if there is some recognition of 159@ the present punctuation characters, capital letters, etc. 160? 161 162@ This will pronounce all punctuation characters and 163@ additionally produce a sound before each capital letter. 164? 165 166!SET SELF PUNCTUATION all 167!SET SELF CAP_LET_RECOGN icon 168 169!SPEAK 170As I talked to these digital explorers, ranging from those who tamed 171multimillion-dollar machines in the 1950s to contemporary young wizards 172who mastered computers in their suburban bedrooms, I found a common 173element, a common philosophy which seemed tied to the elegantly flowing logic 174of the computer itself. It was a philosophy of sharing, openness, decentralization, 175and getting your hands on machines at any cost -- to improve the machines, and to 176improve the world. This Hacker Ethic is their gift to us: something with value even 177to those of us with no interest at all in computers. 178 (Hackers, Heroes of the computer revolution, Stevan Levy) 179. 180? 181 182!SET SELF PUNCTUATION none 183!SET SELF CAP_LET_RECOGN none 184 185@ Note that we have used an icon to signal capital letters. 186? 187 188* 189 190@ Sound icons --- Basic concepts 191 192@ * Symbolic names 193@ 194@ * Sound or text for synthesis 195@ 196@ * Application specific sound icons 197@ 198@ * Different sound tables 199 200? 201* 202 203@ Sound icons --- Examples 204 205@ We will try some sound icons to see how they work. 206? 207 208!SOUND_ICON warning 209? 210 211!SOUND_ICON endofline 212? 213 214@ Sound icons can be used in user-machine dialog systems 215@ (in telephony systems, etc.) 216 217? 218* 219 220@ Priorities --- Examples I 221 222@ We will send two messages with different priorities at once. 223? 224 225!SET SELF PRIORITY NOTIFICATION 226!SPEAK 227You can move around this page with cursor keys. 228. 229 230!SET SELF PRIORITY MESSAGE 231!SPEAK 232Accept cookie [Y/N/A]? 233. 234 235? 236* 237 238@ Priorities --- Examples II 239 240@ Or take for example this situation, where the user requested 241@ his application to read some text but then changed his mind. 242 243!SET SELF PRIORITY TEXT 244 245!SPEAK 246Ludwig van Beethoven (1770-1827) is widely considered to be one 247of the pre-eminent classical music figures of the Western world. 248This German musical genius created numerous works that are firmly 249entrenched in the repertoire. Except for a weakness in composing 250vocal and operatic music (to which he himself admitted, 251notwithstanding a few vocal works like the opera "Fidelio" and the 252song "Adelaide,"), Beethoven had complete mastery of the artform. 253. 254 255!SPEAK 256He left his stamp in 9 symphonies, 5 piano concertos, 10 violin 257sonatas, 32 piano sonatas, numerous string quartets and dozens of 258other key works. 259. 260 261? 262* 263 264@ Q U E S T I O N S ? 265 266@ Discussed topics: 267 268@ * General SSIP ideas 269@ 270@ * Configuration is independent of client applications 271@ 272@ * Message processing 273@ 274@ * Sound icons 275@ 276@ * Priorities 277 278 279@ Further topics: 280@ 281@ * Synchronous vs. asynchronous protocol (or both?) 282@ * ? 283@ * Whatever 284