cutted 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cutted/app.py +22 -0
- {cutted-0.2.0.dist-info → cutted-0.2.1.dist-info}/METADATA +1 -1
- {cutted-0.2.0.dist-info → cutted-0.2.1.dist-info}/RECORD +6 -6
- {cutted-0.2.0.dist-info → cutted-0.2.1.dist-info}/WHEEL +0 -0
- {cutted-0.2.0.dist-info → cutted-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {cutted-0.2.0.dist-info → cutted-0.2.1.dist-info}/top_level.txt +0 -0
cutted/app.py
CHANGED
@@ -16,6 +16,7 @@ class CuttedApp:
|
|
16
16
|
self.cursor_line = None
|
17
17
|
self.last_slider_update = 0
|
18
18
|
self.is_playing = False
|
19
|
+
self.last_states = []
|
19
20
|
self.setup_ui()
|
20
21
|
|
21
22
|
def setup_ui(self):
|
@@ -40,6 +41,9 @@ class CuttedApp:
|
|
40
41
|
|
41
42
|
export_button = customtkinter.CTkButton(self.root, text="Export", command=self.export_audio, width=70)
|
42
43
|
export_button.place(relx=0.9, rely=1.0, anchor="s", y=-30)
|
44
|
+
|
45
|
+
undo_button = customtkinter.CTkButton(self.root, text="Undo", command=self.undo_last, width=70)
|
46
|
+
undo_button.place(relx=0.1, rely=1.0, anchor="s", y=-30)
|
43
47
|
|
44
48
|
self.play_button = customtkinter.CTkButton(self.root, text="Play", command=self.play_audio, width=50)
|
45
49
|
self.play_button.place(relx=0.3, rely=1.0, anchor="s", y=-30)
|
@@ -153,6 +157,8 @@ class CuttedApp:
|
|
153
157
|
print_success(f"Audio exported to {save_path}")
|
154
158
|
|
155
159
|
def send_prompt(self):
|
160
|
+
self.save_state()
|
161
|
+
|
156
162
|
if not hasattr(self.AudioProcessor, "audio") or self.AudioProcessor.audio is None:
|
157
163
|
print_fail("No audio loaded.")
|
158
164
|
return
|
@@ -178,6 +184,22 @@ class CuttedApp:
|
|
178
184
|
else:
|
179
185
|
print_fail("Gemini returned no data")
|
180
186
|
|
187
|
+
def save_state(self):
|
188
|
+
if hasattr(self.AudioProcessor, "audio") and self.AudioProcessor.audio is not None:
|
189
|
+
self.last_states.append(self.AudioProcessor.audio._spawn(self.AudioProcessor.audio.raw_data))
|
190
|
+
if len(self.last_states) > 10:
|
191
|
+
self.last_states.pop(0)
|
192
|
+
|
193
|
+
def undo_last(self):
|
194
|
+
if len(self.last_states) == 0:
|
195
|
+
print_warn("No previous states to undo")
|
196
|
+
messagebox.showwarning("Warning", "No previous states to undo")
|
197
|
+
return
|
198
|
+
|
199
|
+
self.AudioProcessor.audio = self.last_states.pop()
|
200
|
+
self.update_plot()
|
201
|
+
print_info("Undid last action")
|
202
|
+
|
181
203
|
def run(self):
|
182
204
|
self.root.mainloop()
|
183
205
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
cutted/__init__.py,sha256=CP0x3JIScNbFVSOoF3eIQTKD5gDRfWXcCFE46rlZCio,49
|
2
2
|
cutted/__main__.py,sha256=lYGLgtIZ_vGZIJmWG6ZQoqOdyOJnaWEA4NBn5Rc7Q8E,61
|
3
|
-
cutted/app.py,sha256=
|
3
|
+
cutted/app.py,sha256=vJZ_HZtUffUw36tJFBJCAhBbdluQgaOWIPqM5dNZXgU,7706
|
4
4
|
cutted/core/audio_processor.py,sha256=7-XCuPPTlozeuaD2LqyzwRGinu0NvowTLbAh2X4XJ98,5182
|
5
5
|
cutted/core/gemini.py,sha256=Ts_EbC1-rO9jIsdSlzKcmjLVS1o663GmfTdzmix12kE,2872
|
6
6
|
cutted/core/logger.py,sha256=AjqrgW2LV9HdPkPQ8oOmyd9lWzVSIg46r74ILR7mVHo,585
|
7
7
|
cutted/core/transcribe.py,sha256=cm6ziM3_grXKpUCFHiAU7-6lFK_SVsf7-6n14vMYQng,992
|
8
|
-
cutted-0.2.
|
9
|
-
cutted-0.2.
|
10
|
-
cutted-0.2.
|
11
|
-
cutted-0.2.
|
12
|
-
cutted-0.2.
|
8
|
+
cutted-0.2.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
9
|
+
cutted-0.2.1.dist-info/METADATA,sha256=KKJ3auz3E5piy_1uEa9fWlkgZ72RmpHFMohbrqUmUbk,1122
|
10
|
+
cutted-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
11
|
+
cutted-0.2.1.dist-info/top_level.txt,sha256=PL6glZvzRyKWCDn5aoYI9uH8HlEA5Qd_XFJowJKARYI,7
|
12
|
+
cutted-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|