lyrics-transcriber 0.57.0__py3-none-any.whl → 0.58.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.
- lyrics_transcriber/frontend/package.json +1 -1
- lyrics_transcriber/frontend/web_assets/assets/{index-D-tkyYyP.js → index-fO30CduZ.js} +2 -2
- lyrics_transcriber/frontend/web_assets/assets/{index-D-tkyYyP.js.map → index-fO30CduZ.js.map} +1 -1
- lyrics_transcriber/frontend/web_assets/index.html +1 -1
- lyrics_transcriber/output/video.py +18 -4
- lyrics_transcriber/transcribers/audioshake.py +28 -8
- {lyrics_transcriber-0.57.0.dist-info → lyrics_transcriber-0.58.0.dist-info}/METADATA +1 -1
- {lyrics_transcriber-0.57.0.dist-info → lyrics_transcriber-0.58.0.dist-info}/RECORD +11 -11
- {lyrics_transcriber-0.57.0.dist-info → lyrics_transcriber-0.58.0.dist-info}/LICENSE +0 -0
- {lyrics_transcriber-0.57.0.dist-info → lyrics_transcriber-0.58.0.dist-info}/WHEEL +0 -0
- {lyrics_transcriber-0.57.0.dist-info → lyrics_transcriber-0.58.0.dist-info}/entry_points.txt +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
7
|
<title>Lyrics Transcriber Analyzer</title>
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
8
|
+
<script type="module" crossorigin src="/assets/index-fO30CduZ.js"></script>
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<div id="root"></div>
|
@@ -31,6 +31,7 @@ class VideoGenerator:
|
|
31
31
|
self.output_dir = output_dir
|
32
32
|
self.cache_dir = cache_dir
|
33
33
|
self.video_resolution = video_resolution
|
34
|
+
self.styles = styles
|
34
35
|
self.logger = logger or logging.getLogger(__name__)
|
35
36
|
|
36
37
|
# Get background settings from styles, with defaults
|
@@ -199,6 +200,21 @@ class VideoGenerator:
|
|
199
200
|
self.logger.error(f"Failed to resize background image: {e.output}")
|
200
201
|
raise
|
201
202
|
|
203
|
+
def _build_ass_filter(self, ass_path: str) -> str:
|
204
|
+
"""Build ASS filter with font directory support."""
|
205
|
+
ass_filter = f"ass={ass_path}"
|
206
|
+
|
207
|
+
# Get font path from styles configuration
|
208
|
+
karaoke_styles = self.styles.get("karaoke", {})
|
209
|
+
font_path = karaoke_styles.get("font_path")
|
210
|
+
|
211
|
+
if font_path and os.path.isfile(font_path):
|
212
|
+
font_dir = os.path.dirname(font_path)
|
213
|
+
ass_filter += f":fontsdir={font_dir}"
|
214
|
+
self.logger.info(f"Returning ASS filter with fonts dir: {ass_filter}")
|
215
|
+
|
216
|
+
return ass_filter
|
217
|
+
|
202
218
|
def _build_ffmpeg_command(self, ass_path: str, audio_path: str, output_path: str) -> List[str]:
|
203
219
|
"""Build FFmpeg command for video generation with optimized settings."""
|
204
220
|
width, height = self.video_resolution
|
@@ -230,11 +246,10 @@ class VideoGenerator:
|
|
230
246
|
"-i", f"color=c={self.background_color}:s={width}x{height}:r=30"
|
231
247
|
])
|
232
248
|
|
233
|
-
# Add audio input and subtitle overlay
|
234
249
|
cmd.extend([
|
235
250
|
"-i", audio_path,
|
236
251
|
"-c:a", "flac", # Re-encode audio as FLAC
|
237
|
-
"-vf",
|
252
|
+
"-vf", self._build_ass_filter(ass_path), # Add subtitles with font directories
|
238
253
|
"-c:v", self._get_video_codec(),
|
239
254
|
# Video quality settings
|
240
255
|
"-preset", "fast", # Better compression efficiency
|
@@ -284,12 +299,11 @@ class VideoGenerator:
|
|
284
299
|
"-i", f"color=c={self.background_color}:s={width}x{height}:r=30"
|
285
300
|
])
|
286
301
|
|
287
|
-
# Add audio input and subtitle overlay
|
288
302
|
cmd.extend([
|
289
303
|
"-i", audio_path,
|
290
304
|
"-c:a", "aac", # Use AAC for audio
|
291
305
|
"-b:a", "128k", # Audio bitrate
|
292
|
-
"-vf",
|
306
|
+
"-vf", self._build_ass_filter(ass_path), # Add subtitles with font directories
|
293
307
|
"-c:v", "libx264", # Use H.264 codec
|
294
308
|
"-profile:v", "baseline", # Most compatible H.264 profile
|
295
309
|
"-level", "3.0", # Compatibility level
|
@@ -72,6 +72,11 @@ class AudioShakeAPI:
|
|
72
72
|
start_time = time.time()
|
73
73
|
last_status_log = start_time
|
74
74
|
timeout_seconds = self.config.timeout_minutes * 60
|
75
|
+
|
76
|
+
# Add initial retry logic for 404 errors (job ID not yet available)
|
77
|
+
initial_retry_count = 0
|
78
|
+
max_initial_retries = 5
|
79
|
+
initial_retry_delay = 2 # seconds
|
75
80
|
|
76
81
|
while True:
|
77
82
|
current_time = time.time()
|
@@ -86,14 +91,29 @@ class AudioShakeAPI:
|
|
86
91
|
self.logger.info(f"Still waiting for transcription... " f"Elapsed time: {int(elapsed_time/60)} minutes")
|
87
92
|
last_status_log = current_time
|
88
93
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
try:
|
95
|
+
response = requests.get(url, headers=self._get_headers())
|
96
|
+
response.raise_for_status()
|
97
|
+
job_data = response.json()["job"]
|
98
|
+
|
99
|
+
if job_data["status"] == "completed":
|
100
|
+
return job_data
|
101
|
+
elif job_data["status"] == "failed":
|
102
|
+
raise TranscriptionError(f"Job failed: {job_data.get('error', 'Unknown error')}")
|
103
|
+
|
104
|
+
# Reset retry count on successful response
|
105
|
+
initial_retry_count = 0
|
106
|
+
|
107
|
+
except requests.exceptions.HTTPError as e:
|
108
|
+
if e.response.status_code == 404 and initial_retry_count < max_initial_retries:
|
109
|
+
# Job ID not yet available, retry with delay
|
110
|
+
initial_retry_count += 1
|
111
|
+
self.logger.info(f"Job ID not yet available (attempt {initial_retry_count}/{max_initial_retries}), retrying in {initial_retry_delay} seconds...")
|
112
|
+
time.sleep(initial_retry_delay)
|
113
|
+
continue
|
114
|
+
else:
|
115
|
+
# Re-raise the error if it's not a 404 or we've exceeded retries
|
116
|
+
raise
|
97
117
|
|
98
118
|
time.sleep(5) # Wait before next poll
|
99
119
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: lyrics-transcriber
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.58.0
|
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
|
@@ -29,7 +29,7 @@ lyrics_transcriber/frontend/README.md,sha256=-D6CAfKTT7Y0V3EjlZ2fMy7fyctFQ4x2TJ9
|
|
29
29
|
lyrics_transcriber/frontend/__init__.py,sha256=nW8acRSWTjXoRwGqcTU4w-__X7tMAE0iXL0uihBN3CU,836
|
30
30
|
lyrics_transcriber/frontend/eslint.config.js,sha256=3ADH23ANA4NNBKFy6nCVk65e8bx1DrVd_FIaYNnhuqA,734
|
31
31
|
lyrics_transcriber/frontend/index.html,sha256=KfqJVONzpUyPIwV73nZRiCWlwLnFWeB3z0vzxDPNudU,376
|
32
|
-
lyrics_transcriber/frontend/package.json,sha256=
|
32
|
+
lyrics_transcriber/frontend/package.json,sha256=MMCglMWJSeiXc8AmFTCZHAiAMGKTYRa7oAQMCJrMY_4,1182
|
33
33
|
lyrics_transcriber/frontend/public/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
34
34
|
lyrics_transcriber/frontend/src/App.tsx,sha256=f1-dp-MU8vap18eAXacwVDO5P4eE2iG9zSvjau-7NJs,6533
|
35
35
|
lyrics_transcriber/frontend/src/api.ts,sha256=UgqPc1jo8DEVgxh3_9Lyf9GBsHYpqMAqsPEE5BzTV4w,6640
|
@@ -83,9 +83,9 @@ lyrics_transcriber/frontend/update_version.js,sha256=PxkqCnsucXnXiIqutsanVcx00Gq
|
|
83
83
|
lyrics_transcriber/frontend/vite.config.d.ts,sha256=S5bdGf0pSdKM6A6RNBKwAm3EIeW_bDHYfHtesRtXU7Q,76
|
84
84
|
lyrics_transcriber/frontend/vite.config.js,sha256=P4GuPgRZzwEWPQZpyujUe7eA3mjPoFAe2CgE5sQAXg8,232
|
85
85
|
lyrics_transcriber/frontend/vite.config.ts,sha256=8FdW0dN8zDFqfhQSxX5h7sIu72X2piLYlp_TZYRQvBQ,216
|
86
|
-
lyrics_transcriber/frontend/web_assets/assets/index-
|
87
|
-
lyrics_transcriber/frontend/web_assets/assets/index-
|
88
|
-
lyrics_transcriber/frontend/web_assets/index.html,sha256=
|
86
|
+
lyrics_transcriber/frontend/web_assets/assets/index-fO30CduZ.js,sha256=mweQzzHIH-rLHty92kWFaie7V8sCOz8xAg21ugSLiBM,1257959
|
87
|
+
lyrics_transcriber/frontend/web_assets/assets/index-fO30CduZ.js.map,sha256=qgdhzBuYAqsfLFflCxfy8rDePS6KoCMeAUDhrm85K2k,2678465
|
88
|
+
lyrics_transcriber/frontend/web_assets/index.html,sha256=gacSk2b2_RFh_x2aGiiidBzukUldKMEQtlRhFnUarso,400
|
89
89
|
lyrics_transcriber/frontend/web_assets/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
90
90
|
lyrics_transcriber/frontend/yarn.lock,sha256=wtImLsCO1P1Lpkhc1jAN6IiHQ0As4xn39n0cwKoh4LM,131996
|
91
91
|
lyrics_transcriber/lyrics/base_lyrics_provider.py,sha256=mqlqssKG2AofvqEU48nCwLnz0FhO9Ee6MNixF6GBnYY,9133
|
@@ -142,18 +142,18 @@ lyrics_transcriber/output/lyrics_file.py,sha256=_KQyQjCOMIwQdQ0115uEAUIjQWTRmShk
|
|
142
142
|
lyrics_transcriber/output/plain_text.py,sha256=XARaWcy6MeQeQCUoz0PV_bHoBw5dba-u79bjS7XucnE,3867
|
143
143
|
lyrics_transcriber/output/segment_resizer.py,sha256=rrgcQC28eExSAmGnm6ytkF-E-nH4Fe3gjvpaCD0MCmA,17510
|
144
144
|
lyrics_transcriber/output/subtitles.py,sha256=yQCR7YO3aitKnGRjfAtSwsdi6byfpEZgnCumJO16M2E,19085
|
145
|
-
lyrics_transcriber/output/video.py,sha256=
|
145
|
+
lyrics_transcriber/output/video.py,sha256=Dk8HGyHti0w9ymubIrFF5fVGAEi6GRpFDg6ifGGE3F8,14361
|
146
146
|
lyrics_transcriber/review/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
147
147
|
lyrics_transcriber/review/server.py,sha256=WXWyJZJsKm6_HhGxRdP2fD7kyMAmuc_I-Kvqx_uA4NI,14833
|
148
148
|
lyrics_transcriber/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
149
149
|
lyrics_transcriber/storage/dropbox.py,sha256=Dyam1ULTkoxD1X5trkZ5dGp5XhBGCn998moC8IS9-68,9804
|
150
|
-
lyrics_transcriber/transcribers/audioshake.py,sha256=
|
150
|
+
lyrics_transcriber/transcribers/audioshake.py,sha256=7DggSTMPkCnDKIVy-GsI8q_tQKc8S4p5oCU-O1DM8hc,9934
|
151
151
|
lyrics_transcriber/transcribers/base_transcriber.py,sha256=T3m4ZCwZ9Bpv6Jvb2hNcnllk-lmeNmADDJlSySBtP1Q,6480
|
152
152
|
lyrics_transcriber/transcribers/whisper.py,sha256=YcCB1ic9H6zL1GS0jD0emu8-qlcH0QVEjjjYB4aLlIQ,13260
|
153
153
|
lyrics_transcriber/types.py,sha256=wqFrTKhb8qAUB48zH-51_EEGCGrxm0Ji-ETfQumtSKc,27666
|
154
154
|
lyrics_transcriber/utils/word_utils.py,sha256=-cMGpj9UV4F6IsoDKAV2i1aiqSO8eI91HMAm_igtVMk,958
|
155
|
-
lyrics_transcriber-0.
|
156
|
-
lyrics_transcriber-0.
|
157
|
-
lyrics_transcriber-0.
|
158
|
-
lyrics_transcriber-0.
|
159
|
-
lyrics_transcriber-0.
|
155
|
+
lyrics_transcriber-0.58.0.dist-info/LICENSE,sha256=81R_4XwMZDODHD7JcZeUR8IiCU8AD7Ajl6bmwR9tYDk,1074
|
156
|
+
lyrics_transcriber-0.58.0.dist-info/METADATA,sha256=0voXGbhwVigZppC-My5uCpqvdX2Z-dBAr5TpQAZ7Upw,6637
|
157
|
+
lyrics_transcriber-0.58.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
158
|
+
lyrics_transcriber-0.58.0.dist-info/entry_points.txt,sha256=kcp-bSFkCACAEA0t166Kek0HpaJUXRo5SlF5tVrqNBU,216
|
159
|
+
lyrics_transcriber-0.58.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{lyrics_transcriber-0.57.0.dist-info → lyrics_transcriber-0.58.0.dist-info}/entry_points.txt
RENAMED
File without changes
|