lyrics-transcriber 0.17.1__tar.gz → 0.17.2__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.
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/PKG-INFO +1 -1
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/transcriber.py +10 -2
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/pyproject.toml +1 -1
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/LICENSE +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/README.md +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/__init__.py +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/audioshake_transcriber.py +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/llm_prompts/README.md +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/llm_prompts/llm_prompt_lyrics_correction_andrew_handwritten_20231118.txt +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/llm_prompts/llm_prompt_lyrics_correction_gpt_optimised_20231119.txt +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/llm_prompts/llm_prompt_lyrics_matching_andrew_handwritten_20231118.txt +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/llm_prompts/promptfooconfig.yaml +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/llm_prompts/test_data/ABBA-UnderAttack-Genius.txt +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/utils/__init__.py +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/utils/ass.py +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/utils/cli.py +0 -0
- {lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/utils/subtitles.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lyrics-transcriber
|
3
|
-
Version: 0.17.
|
3
|
+
Version: 0.17.2
|
4
4
|
Summary: Automatically create synchronised lyrics files in ASS and MidiCo LRC formats with word-level timestamps, using Whisper and lyrics from Genius and Spotify
|
5
5
|
Home-page: https://github.com/karaokenerds/python-lyrics-transcriber
|
6
6
|
License: MIT
|
@@ -308,6 +308,13 @@ class LyricsTranscriber:
|
|
308
308
|
self.outputs["corrected_lyrics_data_dict"] = corrected_lyrics_data_dict
|
309
309
|
return
|
310
310
|
|
311
|
+
reference_lyrics = self.outputs.get("genius_lyrics_text") or self.outputs.get("spotify_lyrics_text")
|
312
|
+
|
313
|
+
if not reference_lyrics:
|
314
|
+
self.logger.warning("No reference lyrics found from Genius or Spotify. Skipping LLM correction.")
|
315
|
+
self.outputs["corrected_lyrics_data_dict"] = self.outputs["transcription_data_dict"]
|
316
|
+
return
|
317
|
+
|
311
318
|
self.logger.debug(
|
312
319
|
f"no cached lyrics found at corrected_lyrics_data_json_cache_filepath: {corrected_lyrics_data_json_cache_filepath}, attempting to run correction using LLM"
|
313
320
|
)
|
@@ -317,7 +324,6 @@ class LyricsTranscriber:
|
|
317
324
|
with open(self.llm_prompt_correction, "r") as file:
|
318
325
|
system_prompt_template = file.read()
|
319
326
|
|
320
|
-
reference_lyrics = self.outputs["genius_lyrics_text"] or self.outputs["spotify_lyrics_text"]
|
321
327
|
system_prompt = system_prompt_template.replace("{{reference_lyrics}}", reference_lyrics)
|
322
328
|
|
323
329
|
# TODO: Test if results are cleaner when using the vocal file from a background vocal audio separation model
|
@@ -639,7 +645,9 @@ class LyricsTranscriber:
|
|
639
645
|
for i, word in enumerate(segment["words"]):
|
640
646
|
start_time = self.format_time_lrc(word["start"])
|
641
647
|
if i != len(segment["words"]) - 1:
|
642
|
-
word["text"]
|
648
|
+
if not word["text"].endswith(" "):
|
649
|
+
self.logger.debug(f"word '{word['text']}' does not end with a space, adding one")
|
650
|
+
word["text"] += " "
|
643
651
|
line = "[{}]1:{}{}\n".format(start_time, "/" if i == 0 else "", word["text"])
|
644
652
|
f.write(line)
|
645
653
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "lyrics-transcriber"
|
3
|
-
version = "0.17.
|
3
|
+
version = "0.17.2"
|
4
4
|
description = "Automatically create synchronised lyrics files in ASS and MidiCo LRC formats with word-level timestamps, using Whisper and lyrics from Genius and Spotify"
|
5
5
|
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
|
6
6
|
license = "MIT"
|
File without changes
|
File without changes
|
File without changes
|
{lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/audioshake_transcriber.py
RENAMED
File without changes
|
{lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/llm_prompts/README.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{lyrics_transcriber-0.17.1 → lyrics_transcriber-0.17.2}/lyrics_transcriber/utils/subtitles.py
RENAMED
File without changes
|