From c40bf66bfb557a243e05f51e8bec81399a093848 Mon Sep 17 00:00:00 2001 From: Banestorm <91562137+Banestorm@users.noreply.github.com> Date: Mon, 27 Jun 2022 16:54:07 +0000 Subject: [PATCH] Fix multithreading error after recording ends --- ttsdatasetrecorder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ttsdatasetrecorder.py b/ttsdatasetrecorder.py index 6b8e538..7049daa 100644 --- a/ttsdatasetrecorder.py +++ b/ttsdatasetrecorder.py @@ -5,7 +5,7 @@ from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import StringProperty, NumericProperty -from kivy.clock import Clock +from kivy.clock import Clock, mainthread from kivy.uix.label import Label from kivy.core.text import FontContextManager as FCM @@ -80,7 +80,7 @@ def prev_button(self): self.line_index -= 2 self.load_next_sentence() - + @mainthread def load_next_sentence(self): self.line_index += 1 if self.line_index >= len(self.lines):