Skip to content

Commit

Permalink
ASR - stability
Browse files Browse the repository at this point in the history
  • Loading branch information
jolzee committed Feb 20, 2020
1 parent c932d11 commit 60c1577
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/components/ChatInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ export default {
captureAudio() {
if (
Object.prototype.hasOwnProperty.call(window, "webkitSpeechRecognition") &&
Object.prototype.hasOwnProperty.call(window, "speechSynthesis")
Object.prototype.hasOwnProperty.call(window, "speechSynthesis") &&
!this.listening
) {
this.$store.commit("HIDE_CHAT_MODAL");
this.audioButtonColor = "error";
Expand Down
12 changes: 9 additions & 3 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,10 @@ function storeSetup(vuetify) {
for (let key in ordered) {
if (key.startsWith("extensions")) {
let value = parseExtraData(ordered[key]);
logger.debug(`Item Extensions > Key: ${key} Value:`, value);
actions.push(value);
if (value) {
logger.debug(`Item Extensions > Key: ${key} Value:`, value);
actions.push(value);
}
}
}
} catch (e) {
Expand Down Expand Up @@ -1334,7 +1336,11 @@ function storeSetup(vuetify) {
state.tts.tts.shutUp();
}
state.asr.stopAudioCapture = false;
state.asr.asr.start();
try {
state.asr.asr.start();
} catch (e) {
logger.debug(`Attempted to start ASR when it was already active`, e);
}
}
},
ADD_FEEDBACK_FORM(state, feedbackFormConfig) {
Expand Down

0 comments on commit 60c1577

Please sign in to comment.