summaryrefslogtreecommitdiff
path: root/ext/mixed/js/display-audio.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/display-audio.js')
-rw-r--r--ext/mixed/js/display-audio.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/mixed/js/display-audio.js b/ext/mixed/js/display-audio.js
index c423446e..0cd8a625 100644
--- a/ext/mixed/js/display-audio.js
+++ b/ext/mixed/js/display-audio.js
@@ -117,9 +117,10 @@ class DisplayAudio {
let audio;
let info;
try {
- let index;
- ({audio, index} = await this._audioSystem.createDefinitionAudio(sources, expression, reading, {textToSpeechVoice, customSourceUrl}));
- info = `From source ${1 + index}: ${sources[index]}`;
+ let source;
+ ({audio, source} = await this._audioSystem.createExpressionAudio(sources, expression, reading, {textToSpeechVoice, customSourceUrl}));
+ const sourceIndex = sources.indexOf(source);
+ info = `From source ${1 + sourceIndex}: ${source}`;
} catch (e) {
audio = this._audioSystem.getFallbackAudio();
info = 'Could not find audio';