diff --git a/mimic3_http/templates/index.html b/mimic3_http/templates/index.html
index 9b2010c..bba5320 100644
--- a/mimic3_http/templates/index.html
+++ b/mimic3_http/templates/index.html
@@ -101,6 +101,9 @@
+
+
+
@@ -430,12 +433,26 @@
})
}
+ function copyVoiceKey() {
+ var voiceName = q('#voice-name')
+ var speakerList = q('#speaker-list')
+
+ var voiceKey = voiceName.options[voiceName.selectedIndex].value
+ if (speakerList.options.length > 1) {
+ voiceKey += '#' + speakerList.options[speakerList.selectedIndex].value
+ }
+
+
+ navigator.clipboard.writeText(voiceKey)
+ }
+
window.addEventListener('load', function() {
loadVoices()
q('#voice-language').addEventListener('change', langChanged)
q('#voice-name').addEventListener('change', nameChanged)
+ q('#copy-voice').addEventListener('click', copyVoiceKey)
})