This repository was archived by the owner on May 6, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
main/java/io/spokestack/spokestack
test/java/io/spokestack/spokestack Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -167,12 +167,14 @@ public void removeListener(OnSpeechEventListener listener) {
167
167
}
168
168
169
169
/**
170
- * starts up the speech pipeline.
170
+ * Starts the speech pipeline. If the pipeline is already running but has
171
+ * been paused, it will be resumed.
171
172
*
172
173
* @throws Exception on configuration/startup error
173
174
*/
174
175
public void start () throws Exception {
175
176
if (this .running ) {
177
+ resume ();
176
178
this .context .traceDebug (
177
179
"attempting to start a running pipeline; ignoring" );
178
180
return ;
Original file line number Diff line number Diff line change @@ -241,6 +241,14 @@ public void testPause() throws Exception {
241
241
pipeline .resume ();
242
242
Thread .sleep (5 );
243
243
assertTrue (FreeInput .counter > frames );
244
+
245
+ // test that start() also resumes the pipeline
246
+ pipeline .pause ();
247
+ Thread .sleep (10 );
248
+ frames = FreeInput .counter ;
249
+ pipeline .start ();
250
+ Thread .sleep (5 );
251
+ assertTrue (FreeInput .counter > frames );
244
252
}
245
253
246
254
@ Test
You can’t perform that action at this time.
0 commit comments