addresses #340 and #331 (#341)

This commit is contained in:
Dave Horton
2023-05-08 12:23:32 -04:00
committed by GitHub
parent 9948592080
commit 5043edfd4e
7 changed files with 2470 additions and 2174 deletions

View File

@@ -45,6 +45,14 @@ class TaskConfig extends Task {
get summary() {
const phrase = [];
/* reset recognizer and/or synthesizer to default values? */
if (this.data.reset) {
if (typeof this.data.reset === 'string') this.data.reset = [this.data.reset];
phrase.push(`reset ${this.data.reset.join(',')}`);
}
else this.data.reset = [];
if (this.bargeIn.enable) phrase.push('enable barge-in');
if (this.hasSynthesizer) {
const {vendor:v, language:l, voice} = this.synthesizer;
@@ -86,6 +94,11 @@ class TaskConfig extends Task {
}
}
this.data.reset.forEach((k) => {
if (k === 'synthesizer') cs.resetSynthesizer();
else if (k === 'recognizer') cs.resetRecognizer();
});
if (this.hasSynthesizer) {
cs.speechSynthesisVendor = this.synthesizer.vendor !== 'default'
? this.synthesizer.vendor