dialogos-project / dialogos

The DialogOS dialog system.
https://www.dialogos.app
GNU General Public License v3.0
20 stars 7 forks source link

"Try" button in MaryTTS should use currently selected voice in the combobox #214

Open alexanderkoller opened 3 years ago

alexanderkoller commented 3 years ago

Describe the bug When editing the properties of an AbstractOutputNode, the "Try" button speaks the prompt with the voice that is currently stored in the VOICE property. However, the VOICE property is only modified after the "Ok" button is clicked. Thus, the "Try" button always speaks with the same voice, even when a different voice is selected in the combobox.

Expected behavior The "Try" button should speak with the voice that is currently selected in the combobox.

How to fix I overwrote createEditorComponent in the Node class of the Google TTS plugin so I can directly access the value of the combobox. This seems to fix the problem. Once we manage to compile DialogOS again, we should fix it centrally and then remove the duplicated code from the Google plugin.

alexanderkoller commented 3 years ago

The getVoicce method should also be moved from the Google TTS plugin to AbstractOutputNode, and used in the MaryTTS plugin.

alexanderkoller commented 3 years ago

Now the MaryTTS plugin should also use AbstractOutputNode#getSelectedVoice.