mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Fix [Errno 32] in Linux
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@
|
||||
- Added `Save in a project folder with metadata` option in the book handler, allowing users to save the converted items in a project folder with available metadata files. Useful if you want to work with the converted files in the future, issue mentioned by @Darthagnon in #15
|
||||
- Added `Go to folder` button in input box, allowing users to open the folder containing the converted file.
|
||||
- Added `.opus` as output format for generated audio files, which is a more efficient format for audio files.
|
||||
- Added `Create desktop shortcut & install` option to Linux version, allowing users to create a shortcut and install
|
||||
- Added `Create desktop shortcut and install` option to Linux version, allowing users to create a shortcut and install
|
||||
- Added "Playing..." indicator for "Preview" button in the voice mixer.
|
||||
|
||||
# v1.0.6
|
||||
|
||||
@@ -603,7 +603,6 @@ class ConversionThread(QThread):
|
||||
opus_out_path,
|
||||
]
|
||||
try:
|
||||
print(f"Executing FFMPEG for Opus: {' '.join(ffmpeg_cmd_opus)}")
|
||||
process = create_process(ffmpeg_cmd_opus, stdin=subprocess.PIPE, text=False) # Ensure binary stdin
|
||||
process.stdin.write(audio_data_np.astype("float32").tobytes())
|
||||
process.stdin.close()
|
||||
@@ -713,7 +712,6 @@ class ConversionThread(QThread):
|
||||
]
|
||||
|
||||
self.log_updated.emit(f"Generating audio with chapters...\n")
|
||||
print(f"Executing FFMPEG for M4B: {' '.join(ffmpeg_cmd)}")
|
||||
|
||||
process = create_process(ffmpeg_cmd, stdin=subprocess.PIPE, text=False) # Ensure binary stdin
|
||||
process.stdin.write(audio_data_np.astype("float32").tobytes())
|
||||
|
||||
+3
-1
@@ -485,6 +485,7 @@ class TextboxDialog(QDialog):
|
||||
cursor.insertText("<<CHAPTER_MARKER:Title>>")
|
||||
self.text_edit.setTextCursor(cursor)
|
||||
self.update_char_count()
|
||||
self.text_edit.setFocus()
|
||||
|
||||
|
||||
class abogen(QWidget):
|
||||
@@ -1808,7 +1809,7 @@ class abogen(QWidget):
|
||||
# Add shortcut to desktop (Windows or Linux)
|
||||
if platform.system() == "Windows" or platform.system() == "Linux":
|
||||
# Use extended label on Linux
|
||||
label = "Create desktop shortcut & install" if platform.system() == "Linux" else "Create desktop shortcut"
|
||||
label = "Create desktop shortcut and install" if platform.system() == "Linux" else "Create desktop shortcut"
|
||||
add_shortcut_action = QAction(label, self)
|
||||
add_shortcut_action.triggered.connect(self.add_shortcut_to_desktop)
|
||||
menu.addAction(add_shortcut_action)
|
||||
@@ -2291,3 +2292,4 @@ Categories=AudioVideo;Audio;Utility;
|
||||
"Setting Saved",
|
||||
f"Maximum words per subtitle set to {value}.",
|
||||
)
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ def create_process(cmd, stdin=None, text=True):
|
||||
# Configure for binary I/O
|
||||
kwargs["text"] = False
|
||||
# For binary mode, 'encoding' and 'errors' arguments must not be passed to Popen
|
||||
kwargs["bufsize"] = 0 # Use unbuffered mode for binary data
|
||||
|
||||
if stdin is not None:
|
||||
kwargs["stdin"] = stdin
|
||||
|
||||
Reference in New Issue
Block a user