aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-10 13:51:47 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-18 14:23:34 -0400
commit823c026533dcd758c2a93038fa526978a5fa9cc3 (patch)
tree933c454f51e10e664a45488f887fcd31ce4fbae9 /ext/mixed/js
parent7fc3882607f48bb9371649ceacddf2fe278282d2 (diff)
Remove de/structuring from public API
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/audio-system.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/mixed/js/audio-system.js b/ext/mixed/js/audio-system.js
index 574ad3dc..5366e3e0 100644
--- a/ext/mixed/js/audio-system.js
+++ b/ext/mixed/js/audio-system.js
@@ -102,7 +102,7 @@ class AudioSystem {
throw new Error('Could not create audio');
}
- createTextToSpeechAudio({text, voiceUri}) {
+ createTextToSpeechAudio(text, voiceUri) {
const voice = this._getTextToSpeechVoiceFromVoiceUri(voiceUri);
if (voice === null) {
throw new Error('Invalid text-to-speech voice');
@@ -117,7 +117,8 @@ class AudioSystem {
async _createAudio(uri) {
const ttsParameters = this._getTextToSpeechParameters(uri);
if (ttsParameters !== null) {
- return this.createTextToSpeechAudio(ttsParameters);
+ const {text, voiceUri} = ttsParameters;
+ return this.createTextToSpeechAudio(text, voiceUri);
}
return await this._createAudioFromUrl(uri);