karaoke-gen 0.58.0__tar.gz → 0.59.0__tar.gz

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.

Potentially problematic release.


This version of karaoke-gen might be problematic. Click here for more details.

Files changed (22) hide show
  1. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/PKG-INFO +2 -2
  2. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/karaoke_finalise/karaoke_finalise.py +15 -4
  3. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/lyrics_processor.py +2 -1
  4. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/pyproject.toml +2 -2
  5. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/LICENSE +0 -0
  6. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/README.md +0 -0
  7. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/__init__.py +0 -0
  8. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/audio_processor.py +0 -0
  9. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/config.py +0 -0
  10. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/file_handler.py +0 -0
  11. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/karaoke_finalise/__init__.py +0 -0
  12. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/karaoke_gen.py +0 -0
  13. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/metadata.py +0 -0
  14. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/resources/AvenirNext-Bold.ttf +0 -0
  15. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/resources/Montserrat-Bold.ttf +0 -0
  16. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/resources/Oswald-Bold.ttf +0 -0
  17. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/resources/Oswald-SemiBold.ttf +0 -0
  18. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/resources/Zurich_Cn_BT_Bold.ttf +0 -0
  19. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/utils/__init__.py +0 -0
  20. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/utils/bulk_cli.py +0 -0
  21. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/utils/gen_cli.py +0 -0
  22. {karaoke_gen-0.58.0 → karaoke_gen-0.59.0}/karaoke_gen/video_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: karaoke-gen
3
- Version: 0.58.0
3
+ Version: 0.59.0
4
4
  Summary: Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens.
5
5
  License: MIT
6
6
  Author: Andrew Beveridge
@@ -25,7 +25,7 @@ Requires-Dist: google-auth-httplib2
25
25
  Requires-Dist: google-auth-oauthlib
26
26
  Requires-Dist: kbputils (>=0.0.16,<0.0.17)
27
27
  Requires-Dist: lyrics-converter (>=0.2.1)
28
- Requires-Dist: lyrics-transcriber (>=0.66)
28
+ Requires-Dist: lyrics-transcriber (>=0.69)
29
29
  Requires-Dist: lyricsgenius (>=3)
30
30
  Requires-Dist: matplotlib (>=3)
31
31
  Requires-Dist: modal (>=1.0.5,<2.0.0)
@@ -46,6 +46,7 @@ class KaraokeFinalise:
46
46
  non_interactive=False,
47
47
  user_youtube_credentials=None, # Add support for pre-stored credentials
48
48
  server_side_mode=False, # New parameter for server-side deployment
49
+ selected_instrumental_file=None, # Add support for pre-selected instrumental file
49
50
  ):
50
51
  self.log_level = log_level
51
52
  self.log_formatter = log_formatter
@@ -103,6 +104,7 @@ class KaraokeFinalise:
103
104
  self.non_interactive = non_interactive
104
105
  self.user_youtube_credentials = user_youtube_credentials
105
106
  self.server_side_mode = server_side_mode
107
+ self.selected_instrumental_file = selected_instrumental_file
106
108
 
107
109
  self.suffixes = {
108
110
  "title_mov": " (Title).mov",
@@ -151,7 +153,8 @@ class KaraokeFinalise:
151
153
  self.ffmpeg_base_command += " -y"
152
154
 
153
155
  # Detect and configure hardware acceleration
154
- self.nvenc_available = self.detect_nvenc_support()
156
+ # TODO: Re-enable this once we figure out why the resulting MP4s are 10x larger than when encoded with x264...
157
+ self.nvenc_available = False # self.detect_nvenc_support()
155
158
  self.configure_hardware_acceleration()
156
159
 
157
160
  def check_input_files_exist(self, base_name, with_vocals_file, instrumental_audio_file):
@@ -1064,7 +1067,7 @@ class KaraokeFinalise:
1064
1067
  os.remove(file_path)
1065
1068
  self.logger.info(f"Deleted .DS_Store file: {file_path}")
1066
1069
 
1067
- rclone_cmd = f"rclone copy -v {shlex.quote(self.public_share_dir)} {shlex.quote(self.rclone_destination)}"
1070
+ rclone_cmd = f"rclone copy -v --ignore-existing {shlex.quote(self.public_share_dir)} {shlex.quote(self.rclone_destination)}"
1068
1071
  self.execute_command(rclone_cmd, "Copying to cloud destination")
1069
1072
 
1070
1073
  def post_discord_notification(self):
@@ -1189,7 +1192,7 @@ class KaraokeFinalise:
1189
1192
  current_dir = os.getcwd()
1190
1193
 
1191
1194
  # Use rclone copy to upload the entire current directory to the remote destination
1192
- rclone_upload_cmd = f"rclone copy -v {shlex.quote(current_dir)} {shlex.quote(remote_dest)}"
1195
+ rclone_upload_cmd = f"rclone copy -v --ignore-existing {shlex.quote(current_dir)} {shlex.quote(remote_dest)}"
1193
1196
 
1194
1197
  if self.dry_run:
1195
1198
  self.logger.info(f"DRY RUN: Would upload current directory to: {remote_dest}")
@@ -1625,7 +1628,15 @@ class KaraokeFinalise:
1625
1628
  with_vocals_file = self.find_with_vocals_file()
1626
1629
  base_name, artist, title = self.get_names_from_withvocals(with_vocals_file)
1627
1630
 
1628
- instrumental_audio_file = self.choose_instrumental_audio_file(base_name)
1631
+ # Use the selected instrumental file if provided, otherwise search for one
1632
+ if self.selected_instrumental_file:
1633
+ if not os.path.isfile(self.selected_instrumental_file):
1634
+ raise Exception(f"Selected instrumental file not found: {self.selected_instrumental_file}")
1635
+ instrumental_audio_file = self.selected_instrumental_file
1636
+ self.logger.info(f"Using pre-selected instrumental file: {instrumental_audio_file}")
1637
+ else:
1638
+ self.logger.info("No instrumental file pre-selected, searching for instrumental files...")
1639
+ instrumental_audio_file = self.choose_instrumental_audio_file(base_name)
1629
1640
 
1630
1641
  input_files = self.check_input_files_exist(base_name, with_vocals_file, instrumental_audio_file)
1631
1642
  output_files = self.prepare_output_filenames(base_name)
@@ -274,7 +274,8 @@ class LyricsProcessor:
274
274
 
275
275
  # Save correction data to JSON file for review interface
276
276
  # Use the expected filename format: "{artist} - {title} (Lyrics Corrections).json"
277
- corrections_filename = f"{filename_artist} - {filename_title} (Lyrics Corrections).json"
277
+ # Use sanitized names to be consistent with all other files created by lyrics_transcriber
278
+ corrections_filename = f"{sanitized_artist} - {sanitized_title} (Lyrics Corrections).json"
278
279
  corrections_filepath = os.path.join(lyrics_dir, corrections_filename)
279
280
 
280
281
  # Use the CorrectionResult's to_dict() method to serialize
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "karaoke-gen"
3
- version = "0.58.0"
3
+ version = "0.59.0"
4
4
  description = "Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens."
5
5
  authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
6
6
  license = "MIT"
@@ -28,7 +28,7 @@ thefuzz = ">=0.22"
28
28
  numpy = ">=2"
29
29
  audio-separator = { version = ">=0.34.0", extras = ["cpu"] }
30
30
  lyrics-converter = ">=0.2.1"
31
- lyrics-transcriber = ">=0.66"
31
+ lyrics-transcriber = ">=0.69"
32
32
  kbputils = "^0.0.16"
33
33
  attrs = ">=24.2.0"
34
34
  cattrs = ">=24.1.2"
File without changes
File without changes