inclusion-international / speech-jokey

A speech synthesis software with integration of several TTS APIs, SSML support and optimizations for users with motor impairment. (course ASSIST HEIDI WS2023 and SS2024)
MIT License
1 stars 0 forks source link

Bugfixes to stabilize latest application version #3

Closed HackXIt closed 3 months ago

HackXIt commented 3 months ago
deinhofer commented 3 months ago

When opening file the self.opened_file is not set correctly:

It should be the following, otherwise a subsequent save action does not work:

        if self.last_path is not None and os.path.isfile(os.path.join(self.last_path, self.opened_file)):
            self.opened_file = os.path.join(self.last_path, self.opened_file)
            self.load_textfile(self.opened_file)
deinhofer commented 3 months ago

When opening failed due to unsupported file type, everything should be reset: e.g.:

    def load_textfile(self, file: str):
        file_ext = file.split('.')[-1]
        if file_ext not in self.supported_text_files:
            # if file extension is not supported, don't try to open it and reset everything
            self.opened_file = None
            self.ids.text_main.text = ""
            log.error(f"{self.__class__.__name__}: Unsupported file type: {file_ext}")
deinhofer commented 3 months ago

When clicking on ExampleAPI, the screen does not open:

image

deinhofer commented 3 months ago

ok, thanks. I will merge it for now, so that the students can already work on it. But please continue to commit, if you have a new fix.