lyrics-transcriber 0.32.1__py3-none-any.whl → 0.32.3__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.
@@ -21,10 +21,19 @@ class PhraseAnalyzer:
21
21
  try:
22
22
  self.nlp = spacy.load(language_code)
23
23
  except OSError:
24
- self.logger.error(f"Failed to load language model: {language_code}")
25
- raise OSError(
26
- f"Language model '{language_code}' not found. " f"Please install it with: python -m spacy download {language_code}"
27
- )
24
+ self.logger.info(f"Language model {language_code} not found. Attempting to download...")
25
+ import subprocess
26
+
27
+ try:
28
+ subprocess.check_call(["python", "-m", "spacy", "download", language_code])
29
+ self.nlp = spacy.load(language_code)
30
+ self.logger.info(f"Successfully downloaded and loaded {language_code}")
31
+ except subprocess.CalledProcessError as e:
32
+ self.logger.error(f"Failed to download language model: {language_code}")
33
+ raise OSError(
34
+ f"Language model '{language_code}' could not be downloaded. "
35
+ f"Please install it manually with: python -m spacy download {language_code}"
36
+ ) from e
28
37
 
29
38
  def score_phrase(self, words: List[str], context: str) -> PhraseScore:
30
39
  """Score a phrase based on grammatical completeness and natural breaks.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lyrics-transcriber
3
- Version: 0.32.1
3
+ Version: 0.32.3
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
  License: MIT
6
6
  Author: Andrew Beveridge
@@ -13,23 +13,23 @@ Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Requires-Dist: dropbox (>=12)
16
- Requires-Dist: fastapi (>=0.115.6,<0.116.0)
16
+ Requires-Dist: fastapi (>=0.115)
17
17
  Requires-Dist: karaoke-lyrics-processor (>=0.4)
18
18
  Requires-Dist: lyricsgenius (>=3)
19
- Requires-Dist: metaphone (>=0.6,<0.7)
20
- Requires-Dist: nltk (>=3.9.1,<4.0.0)
19
+ Requires-Dist: metaphone (>=0.6)
20
+ Requires-Dist: nltk (>=3.9)
21
21
  Requires-Dist: pydub (>=0.25)
22
22
  Requires-Dist: python-dotenv (>=1)
23
- Requires-Dist: python-levenshtein (>=0.26.1,<0.27.0)
23
+ Requires-Dist: python-levenshtein (>=0.26)
24
24
  Requires-Dist: python-slugify (>=8)
25
- Requires-Dist: spacy (>=3.8.3,<4.0.0)
26
- Requires-Dist: spacy-syllables (>=3.0.2,<4.0.0)
27
- Requires-Dist: syllables (>=1.0.9,<2.0.0)
25
+ Requires-Dist: spacy (>=3.8)
26
+ Requires-Dist: spacy-syllables (>=3)
27
+ Requires-Dist: syllables (>=1)
28
28
  Requires-Dist: syrics (>=0)
29
- Requires-Dist: torch (>=2.5.1,<3.0.0)
30
- Requires-Dist: tqdm (>=4.67.1,<5.0.0)
31
- Requires-Dist: transformers (>=4.47.1,<5.0.0)
32
- Requires-Dist: uvicorn (>=0.34.0,<0.35.0)
29
+ Requires-Dist: torch (>=2)
30
+ Requires-Dist: tqdm (>=4.67)
31
+ Requires-Dist: transformers (>=4.47)
32
+ Requires-Dist: uvicorn (>=0.34)
33
33
  Project-URL: Documentation, https://github.com/karaokenerds/python-lyrics-transcriber/blob/main/README.md
34
34
  Project-URL: Homepage, https://github.com/karaokenerds/python-lyrics-transcriber
35
35
  Project-URL: Repository, https://github.com/karaokenerds/python-lyrics-transcriber
@@ -17,7 +17,7 @@ lyrics_transcriber/correction/handlers/sound_alike.py,sha256=mAmnpRpO29rHaP96V-U
17
17
  lyrics_transcriber/correction/handlers/syllables_match.py,sha256=5M7-0A6G-eu4nyzxT0wiuUpN5zbqXq9d-zeTP7AdLfg,8377
18
18
  lyrics_transcriber/correction/handlers/word_count_match.py,sha256=zbyZ01VE_6azaFpi8rS0Ato7c_VBxM2KV83VnDH5t3c,2522
19
19
  lyrics_transcriber/correction/handlers/word_operations.py,sha256=2COTaJsEwpSWyXHXmGgjfcf2x7tbAnsQ0dIW0qyHYK4,5141
20
- lyrics_transcriber/correction/phrase_analyzer.py,sha256=D94Ytlo7U2eTHYJ_nCVLhafmtTYExKx6v2_aczOJaQ8,16455
20
+ lyrics_transcriber/correction/phrase_analyzer.py,sha256=dtO_2LjxnPdHJM7De40mYIdHCkozwhizVVQp5XGO7x0,16962
21
21
  lyrics_transcriber/correction/text_utils.py,sha256=VkOqgZHa9wEqLJdVNi4-KLFojQ6d4lWOGl_Y_vknenU,808
22
22
  lyrics_transcriber/lyrics/base_lyrics_provider.py,sha256=i4wxzu8nk2a3NDtnB_4r6rOGBZ7WvJFVlcEBjAkUYgI,5511
23
23
  lyrics_transcriber/lyrics/genius.py,sha256=M4rs3yk5RKW-RYfMm9w-UxwKQ8itgYeM-kVS6LCn8D0,3295
@@ -79,8 +79,8 @@ lyrics_transcriber/transcribers/audioshake.py,sha256=QzKGimVa6BovlvYFj35CbGpaGeP
79
79
  lyrics_transcriber/transcribers/base_transcriber.py,sha256=yPzUWPTCGmzE97H5Rz6g61e-qEGL77ZzUoiBOmswhts,5973
80
80
  lyrics_transcriber/transcribers/whisper.py,sha256=P0kas2_oX16MO1-Qy7U5gl5KQN-RuUIJZz7LsEFLUiE,12906
81
81
  lyrics_transcriber/types.py,sha256=xGf3hkTRcGZTTAjMVIev2i2DOU6co0QGpW8NxvaBQAA,16759
82
- lyrics_transcriber-0.32.1.dist-info/LICENSE,sha256=BiPihPDxhxIPEx6yAxVfAljD5Bhm_XG2teCbPEj_m0Y,1069
83
- lyrics_transcriber-0.32.1.dist-info/METADATA,sha256=_KwtbhfF6mpNBKWVtCmA7mbClcwNLNZB0nTb49-Ctms,5961
84
- lyrics_transcriber-0.32.1.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
85
- lyrics_transcriber-0.32.1.dist-info/entry_points.txt,sha256=ChnmR13YoalGnC3sHW0TppX5FbhEXntYIha24tVQJ1M,104
86
- lyrics_transcriber-0.32.1.dist-info/RECORD,,
82
+ lyrics_transcriber-0.32.3.dist-info/LICENSE,sha256=BiPihPDxhxIPEx6yAxVfAljD5Bhm_XG2teCbPEj_m0Y,1069
83
+ lyrics_transcriber-0.32.3.dist-info/METADATA,sha256=gKyuaWObELiKS3aopmqaSo-mvaA4-Via4Q8vza819zs,5856
84
+ lyrics_transcriber-0.32.3.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
85
+ lyrics_transcriber-0.32.3.dist-info/entry_points.txt,sha256=ChnmR13YoalGnC3sHW0TppX5FbhEXntYIha24tVQJ1M,104
86
+ lyrics_transcriber-0.32.3.dist-info/RECORD,,