diff --git a/src/calibre/gui2/tts/linux_config.py b/src/calibre/gui2/tts/linux_config.py index 1b69f8d2bc..4d5e3e8429 100644 --- a/src/calibre/gui2/tts/linux_config.py +++ b/src/calibre/gui2/tts/linux_config.py @@ -18,7 +18,10 @@ class VoicesModel(QAbstractTableModel): def __init__(self, voice_data, default_output_module, parent=None): super().__init__(parent) self.voice_data = voice_data - self.current_voices = voice_data[default_output_module] + try: + self.current_voices = voice_data[default_output_module] + except KeyError as e: + raise ValueError(_('Speech dispatcher on this system is not configured with any available voices. Install some voices first.')) from e self.column_headers = (_('Name'), _('Language'), _('Variant')) def rowCount(self, parent=None):