1# Copyright (C) 2006 Gary Cramblitt <garycramblitt@comcast.net> 2# 3# This program is free software; you can redistribute it and/or modify it under 4# the terms of the GNU General Public License as published by the Free Software 5# Foundation; either version 2 of the License, or (at your option) any later 6# version. 7# 8# This program is distributed in the hope that it will be useful, but WITHOUT ANY 9# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 10# PARTICULAR PURPOSE. See the GNU General Public License for more details (file 11# COPYING in the root directory). 12# 13# You should have received a copy of the GNU General Public License 14# along with this program. If not, see <https://www.gnu.org/licenses/>. 15# 16@ Test stop and pause functions in Speech Dispatcher. 17 18@ Note that not all synthesizers (output modules) support effective 19@ stop and pause. If they do not, they should at least not crash 20@ or mangle the speech. 21 22!SET SELF NOTIFICATION ALL ON 23 24@ We'll begin by queueing a paragraph, waiting 2 seconds, stopping, 25@ and then queueing another message. The paragraph contains several 26@ sentences. If stop is working well, the speech should stop instantly, 27@ even if in the middle of a sentence. The second message should 28@ not be prevented from being heard. 29 30$4 31!SPEAK 32When in the Course of human events it becomes necessary for one people 33to dissolve the political bands which have connected them with another 34and to assume among the powers of the earth, the separate and equal station 35to which the Laws of Nature and of Nature's God entitle them, a decent 36respect to the opinions of mankind requires that they should declare the 37causes which impel them to the separation. 38 -- United States Declaration of Independence 39. 40+BEGIN 41$2 42!STOP SELF 43$3 44!SPEAK 45The previous stop should not prevent this sentence from being heard. 46. 47$3 48 49@ Now we'll queue another request, pause it two seconds later, wait 50@ 8 seconds, and resume. If working well, the pause should occur on 51@ a sentence boundary. It is acceptable if it pauses immediately, 52@ like a stop, but when resumed, it should repeat the last partial 53@ sentence. 54$2 55 56!SPEAK 57Jack and Jill went up the hill to fetch a pail of water. 58Jack fell down and broke his crown, and Jill came tumbling after. 59This sentence should not be heard until resumed. 60. 61+701 BEGIN 62!PAUSE SELF 63+704 PAUSED 64@ Speaking should now be paused. Resuming in 4 seconds. 65$4 66!RESUME SELF 67+705 RESUMED 68 69+702 END 70 71!QUIT 72 73@ Tests completed. 74