cutted 0.1.2__py3-none-any.whl → 0.2.0__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 CHANGED
@@ -37,6 +37,9 @@ class CuttedApp:
37
37
 
38
38
  button = customtkinter.CTkButton(self.root, text="Load audio", command=self.select_file)
39
39
  button.place(relx=0.5, rely=1.0, anchor="s", y=-30)
40
+
41
+ export_button = customtkinter.CTkButton(self.root, text="Export", command=self.export_audio, width=70)
42
+ export_button.place(relx=0.9, rely=1.0, anchor="s", y=-30)
40
43
 
41
44
  self.play_button = customtkinter.CTkButton(self.root, text="Play", command=self.play_audio, width=50)
42
45
  self.play_button.place(relx=0.3, rely=1.0, anchor="s", y=-30)
@@ -124,7 +127,30 @@ class CuttedApp:
124
127
  def stop_audio(self):
125
128
  self.AudioProcessor.stop_audio()
126
129
  self.is_playing = False
127
- self.play_button.configure(text="Play")
130
+
131
+ def export_audio(self):
132
+ if not hasattr(self.AudioProcessor, "audio") or self.AudioProcessor.audio is None:
133
+ print_fail("No audio loaded.")
134
+ return
135
+
136
+ save_path = customtkinter.filedialog.asksaveasfilename(
137
+ defaultextension=".mp3",
138
+ filetypes=[
139
+ ("MP3 files", "*.mp3"),
140
+ ("WAV files", "*.wav"),
141
+ ]
142
+ )
143
+
144
+ if save_path:
145
+ if save_path.lower().endswith(".wav"):
146
+ format = "wav"
147
+ elif save_path.lower().endswith(".mp3"):
148
+ format = "mp3"
149
+ else:
150
+ format = "mp3"
151
+
152
+ self.AudioProcessor.export_audio(save_path, format)
153
+ print_success(f"Audio exported to {save_path}")
128
154
 
129
155
  def send_prompt(self):
130
156
  if not hasattr(self.AudioProcessor, "audio") or self.AudioProcessor.audio is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cutted
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: AI-powered audio editor controllable via natural language.
5
5
  Author-email: simon0302010 <simon0302010@gmail.com>
6
6
  License-Expression: GPL-3.0
@@ -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=xGnPZXkHfPOID91joER5Z6hTbsnjlMj_V_JlDvDOqpM,5849
3
+ cutted/app.py,sha256=qZ6idEqEmdtCLOahBN4803u-t12oNRhTAgbN3XiIiKY,6803
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.1.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
9
- cutted-0.1.2.dist-info/METADATA,sha256=dhNLoSMQ1aov1tLCxJBWMibPoUSpGhxN8TtIOzAUUpQ,1122
10
- cutted-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- cutted-0.1.2.dist-info/top_level.txt,sha256=PL6glZvzRyKWCDn5aoYI9uH8HlEA5Qd_XFJowJKARYI,7
12
- cutted-0.1.2.dist-info/RECORD,,
8
+ cutted-0.2.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
9
+ cutted-0.2.0.dist-info/METADATA,sha256=4hl_l2XcGg74HKYMcbAlklxduA8nw066deSAVBBuvOs,1122
10
+ cutted-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ cutted-0.2.0.dist-info/top_level.txt,sha256=PL6glZvzRyKWCDn5aoYI9uH8HlEA5Qd_XFJowJKARYI,7
12
+ cutted-0.2.0.dist-info/RECORD,,
File without changes