lyrics-transcriber 0.34.0__py3-none-any.whl → 0.34.2__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.
Files changed (38) hide show
  1. lyrics_transcriber/correction/handlers/syllables_match.py +22 -2
  2. lyrics_transcriber/frontend/.gitignore +23 -0
  3. lyrics_transcriber/frontend/README.md +50 -0
  4. lyrics_transcriber/frontend/dist/assets/index-DqFgiUni.js +245 -0
  5. lyrics_transcriber/frontend/dist/index.html +13 -0
  6. lyrics_transcriber/frontend/dist/vite.svg +1 -0
  7. lyrics_transcriber/frontend/eslint.config.js +28 -0
  8. lyrics_transcriber/frontend/index.html +13 -0
  9. lyrics_transcriber/frontend/package-lock.json +4260 -0
  10. lyrics_transcriber/frontend/package.json +37 -0
  11. lyrics_transcriber/frontend/public/vite.svg +1 -0
  12. lyrics_transcriber/frontend/src/App.tsx +192 -0
  13. lyrics_transcriber/frontend/src/api.ts +59 -0
  14. lyrics_transcriber/frontend/src/components/CorrectionMetrics.tsx +155 -0
  15. lyrics_transcriber/frontend/src/components/DebugPanel.tsx +311 -0
  16. lyrics_transcriber/frontend/src/components/DetailsModal.tsx +297 -0
  17. lyrics_transcriber/frontend/src/components/FileUpload.tsx +77 -0
  18. lyrics_transcriber/frontend/src/components/LyricsAnalyzer.tsx +450 -0
  19. lyrics_transcriber/frontend/src/components/ReferenceView.tsx +287 -0
  20. lyrics_transcriber/frontend/src/components/TranscriptionView.tsx +157 -0
  21. lyrics_transcriber/frontend/src/components/constants.ts +19 -0
  22. lyrics_transcriber/frontend/src/components/styles.ts +13 -0
  23. lyrics_transcriber/frontend/src/main.tsx +6 -0
  24. lyrics_transcriber/frontend/src/types.ts +158 -0
  25. lyrics_transcriber/frontend/src/vite-env.d.ts +1 -0
  26. lyrics_transcriber/frontend/tsconfig.app.json +26 -0
  27. lyrics_transcriber/frontend/tsconfig.json +25 -0
  28. lyrics_transcriber/frontend/tsconfig.node.json +23 -0
  29. lyrics_transcriber/frontend/tsconfig.tsbuildinfo +1 -0
  30. lyrics_transcriber/frontend/vite.config.d.ts +2 -0
  31. lyrics_transcriber/frontend/vite.config.js +6 -0
  32. lyrics_transcriber/frontend/vite.config.ts +7 -0
  33. lyrics_transcriber/review/server.py +18 -29
  34. {lyrics_transcriber-0.34.0.dist-info → lyrics_transcriber-0.34.2.dist-info}/METADATA +1 -1
  35. {lyrics_transcriber-0.34.0.dist-info → lyrics_transcriber-0.34.2.dist-info}/RECORD +38 -7
  36. {lyrics_transcriber-0.34.0.dist-info → lyrics_transcriber-0.34.2.dist-info}/LICENSE +0 -0
  37. {lyrics_transcriber-0.34.0.dist-info → lyrics_transcriber-0.34.2.dist-info}/WHEEL +0 -0
  38. {lyrics_transcriber-0.34.0.dist-info → lyrics_transcriber-0.34.2.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "noEmit": true,
13
+ "jsx": "react-jsx",
14
+ "strict": true,
15
+ "noUnusedLocals": true,
16
+ "noUnusedParameters": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "baseUrl": ".",
19
+ "paths": {
20
+ "@/*": ["src/*"]
21
+ }
22
+ },
23
+ "include": ["src"],
24
+ "references": [{ "path": "./tsconfig.node.json" }]
25
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "isolatedModules": true,
12
+ "moduleDetection": "force",
13
+ "composite": true,
14
+ "noEmit": false,
15
+
16
+ /* Linting */
17
+ "strict": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ },
22
+ "include": ["vite.config.ts"]
23
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/app.tsx","./src/api.ts","./src/main.tsx","./src/types.ts","./src/vite-env.d.ts","./src/components/correctionmetrics.tsx","./src/components/debugpanel.tsx","./src/components/detailsmodal.tsx","./src/components/fileupload.tsx","./src/components/lyricsanalyzer.tsx","./src/components/referenceview.tsx","./src/components/transcriptionview.tsx","./src/components/constants.ts","./src/components/styles.ts"],"version":"5.6.3"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ // https://vite.dev/config/
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ });
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // https://vite.dev/config/
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ })
@@ -8,6 +8,7 @@ import subprocess
8
8
  import os
9
9
  import atexit
10
10
  import urllib.parse
11
+ from fastapi.staticfiles import StaticFiles
11
12
 
12
13
  logger = logging.getLogger(__name__)
13
14
 
@@ -29,25 +30,21 @@ vite_process: Optional[subprocess.Popen] = None
29
30
 
30
31
 
31
32
  def start_vite_server():
32
- """Start the Vite development server."""
33
- global vite_process
34
-
35
- # Get the path to the lyrics-analyzer directory relative to this file
33
+ """Get path to the built frontend assets."""
34
+ global vite_process # We'll keep this for backwards compatibility
35
+
36
+ # Get the path to the built frontend assets
36
37
  current_dir = os.path.dirname(os.path.abspath(__file__))
37
- vite_dir = os.path.abspath(os.path.join(current_dir, "../../lyrics-analyzer"))
38
-
39
- logger.info(f"Starting Vite dev server in {vite_dir}")
40
-
41
- # Start the Vite dev server
42
- vite_process = subprocess.Popen(["npm", "run", "dev"], cwd=vite_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
43
-
44
- # Register cleanup function to kill Vite server on exit
45
- atexit.register(lambda: vite_process.terminate() if vite_process else None)
46
-
47
- # Wait a bit for the server to start
48
- time.sleep(2) # Adjust this if needed
49
-
50
- return vite_process
38
+ frontend_dir = os.path.abspath(os.path.join(current_dir, "../frontend/dist"))
39
+
40
+ if not os.path.exists(frontend_dir):
41
+ raise FileNotFoundError(f"Frontend assets not found at {frontend_dir}. Ensure the package was built correctly.")
42
+
43
+ # Mount the static files
44
+ app.mount("/", StaticFiles(directory=frontend_dir, html=True), name="frontend")
45
+
46
+ logger.info(f"Mounted frontend assets from {frontend_dir}")
47
+ return None # No process to return since we're serving static files
51
48
 
52
49
 
53
50
  @app.get("/api/correction-data")
@@ -109,9 +106,9 @@ def start_review_server(correction_result: CorrectionResult) -> CorrectionResult
109
106
 
110
107
  logger.info("Starting review server...")
111
108
 
112
- # Start Vite dev server
113
- vite_proc = start_vite_server()
114
- logger.info("Vite dev server started")
109
+ # Start Vite dev server (now just mounts static files)
110
+ start_vite_server()
111
+ logger.info("Frontend assets mounted")
115
112
 
116
113
  # Start FastAPI server in a separate thread
117
114
  server_thread = Thread(target=uvicorn.run, args=(app,), kwargs={"host": "127.0.0.1", "port": 8000, "log_level": "info"}, daemon=True)
@@ -132,13 +129,5 @@ def start_review_server(correction_result: CorrectionResult) -> CorrectionResult
132
129
  # logger.error("Review timed out after 10 minutes")
133
130
  # raise TimeoutError("Review did not complete within the expected time frame.")
134
131
 
135
- # Clean up Vite server
136
- if vite_proc:
137
- vite_proc.terminate()
138
- try:
139
- vite_proc.wait(timeout=5)
140
- except subprocess.TimeoutExpired:
141
- vite_proc.kill()
142
-
143
132
  logger.info("Review completed, returning results")
144
133
  return current_review
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lyrics-transcriber
3
- Version: 0.34.0
3
+ Version: 0.34.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
  License: MIT
6
6
  Author: Andrew Beveridge
@@ -14,11 +14,42 @@ lyrics_transcriber/correction/handlers/no_space_punct_match.py,sha256=ri4QEdkYss
14
14
  lyrics_transcriber/correction/handlers/relaxed_word_count_match.py,sha256=Y_4S8orGx1LQzlr2yCrGYkvtVLzjD31urtW9tkbwado,2474
15
15
  lyrics_transcriber/correction/handlers/repeat.py,sha256=jeUwpgU3no1Stk7bOHweDfIOxM2xsykbttdnsD-e_Rg,3682
16
16
  lyrics_transcriber/correction/handlers/sound_alike.py,sha256=mAmnpRpO29rHaP96V-U3QTS1aOM32IV2YUYgS0y9ibo,10635
17
- lyrics_transcriber/correction/handlers/syllables_match.py,sha256=5M7-0A6G-eu4nyzxT0wiuUpN5zbqXq9d-zeTP7AdLfg,8377
17
+ lyrics_transcriber/correction/handlers/syllables_match.py,sha256=wB42wDfsx_3z2kcciuUy9Rs45NCPSTIQGHLP8DV0TnE,9129
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
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
+ lyrics_transcriber/frontend/.gitignore,sha256=lgGIPiVpFVUNSZl9oNQLelLOWUzpF7sikLW8xmsrrqI,248
23
+ lyrics_transcriber/frontend/README.md,sha256=-D6CAfKTT7Y0V3EjlZ2fMy7fyctFQ4x2TJ9vx6xtccM,1607
24
+ lyrics_transcriber/frontend/dist/assets/index-DqFgiUni.js,sha256=YlG1ioU-k-u1Hr6oW5O8bgvarAOtOcU7aEJXYvff3wU,385299
25
+ lyrics_transcriber/frontend/dist/index.html,sha256=z35rcF7ZGMM-Fg_47tsylI_WILbh-_ZJF3LNsb4NQqU,400
26
+ lyrics_transcriber/frontend/dist/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
27
+ lyrics_transcriber/frontend/eslint.config.js,sha256=3ADH23ANA4NNBKFy6nCVk65e8bx1DrVd_FIaYNnhuqA,734
28
+ lyrics_transcriber/frontend/index.html,sha256=KfqJVONzpUyPIwV73nZRiCWlwLnFWeB3z0vzxDPNudU,376
29
+ lyrics_transcriber/frontend/package-lock.json,sha256=-VEaxgVZhB6rbaxiZPy3_qGsMuVlSYxZZg-K3mvhS4A,149189
30
+ lyrics_transcriber/frontend/package.json,sha256=7WBOIcjE3T8bg9GpJWziPYyhTe724AFnHJOtJi-XCpY,1006
31
+ lyrics_transcriber/frontend/public/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
32
+ lyrics_transcriber/frontend/src/App.tsx,sha256=7160hv2mRVzBTkr7c9bxt4sKEBVexqMQXxLqHl_nrQ0,5942
33
+ lyrics_transcriber/frontend/src/api.ts,sha256=grunhu6O_qjo5ohECSTPHQDl4eD3YlsHh6smt19E1AE,1889
34
+ lyrics_transcriber/frontend/src/components/CorrectionMetrics.tsx,sha256=hYBywAhwY8HkRCBYiT3TQw2tJos7DFLqpRZuPEnOVbg,5335
35
+ lyrics_transcriber/frontend/src/components/DebugPanel.tsx,sha256=g1TCRax6XiBgAUGb7_ahjtSUyO0yZ-ZRMxkn2oSIGiQ,15155
36
+ lyrics_transcriber/frontend/src/components/DetailsModal.tsx,sha256=5WxBYcdxHl3gXHfdX6ImwwlVXu8UMzPJ-pbckz7vFtg,12664
37
+ lyrics_transcriber/frontend/src/components/FileUpload.tsx,sha256=Q_Y2YvlVGJvucdoDBbbI2pzymycWAprrc7vtSEGuIHs,2375
38
+ lyrics_transcriber/frontend/src/components/LyricsAnalyzer.tsx,sha256=DfcdGX593nogI70opQodEj7HwBII-h9IOW-edFlMQ8E,18827
39
+ lyrics_transcriber/frontend/src/components/ReferenceView.tsx,sha256=-S-m53IOgeh9qb_lIsNslNNt99gSvVj7DwuwBD7-S-4,11903
40
+ lyrics_transcriber/frontend/src/components/TranscriptionView.tsx,sha256=IBK64z6GLbIIfDm6mhWOeKn-vEOPnErV6mgjRUz4OlM,5895
41
+ lyrics_transcriber/frontend/src/components/constants.ts,sha256=x45nkGUNzykJEGVNzsyaDBeMuF_nGz4qk5SW0QrbWlk,456
42
+ lyrics_transcriber/frontend/src/components/styles.ts,sha256=nWthPdUbz4cHbUL0LjDe-IeNs92KLev9OMsosZWa3Kc,411
43
+ lyrics_transcriber/frontend/src/main.tsx,sha256=gKJOIr1laz68BhgxWz0JXb1LNacA2oxfbypxW_B1USo,139
44
+ lyrics_transcriber/frontend/src/types.ts,sha256=nT1-xAmDmXTT1uh69e0tS6nPa1cyyly2VfleiOH71II,3822
45
+ lyrics_transcriber/frontend/src/vite-env.d.ts,sha256=ZZlpNvuwQpFfe3SiAPzd5-QQ8ypmmxq5WXz6pLD63bU,38
46
+ lyrics_transcriber/frontend/tsconfig.app.json,sha256=7aUBVcaBqEtmtfQXsbwsgBxSUng06xzQi5t4QCgWQ3E,665
47
+ lyrics_transcriber/frontend/tsconfig.json,sha256=AOS5v1AsNPL3wGc8bt58Ybh8HHpbYrlK91q0KIzaSgs,627
48
+ lyrics_transcriber/frontend/tsconfig.node.json,sha256=oMBhK5xufBrVE7SkbADRxA3pxm8_L9m5YwtCOZSafsc,536
49
+ lyrics_transcriber/frontend/tsconfig.tsbuildinfo,sha256=ECcqHaEztFfmI_wXvNu9BufuHvdLAA82k7bhl_DyyAw,437
50
+ lyrics_transcriber/frontend/vite.config.d.ts,sha256=S5bdGf0pSdKM6A6RNBKwAm3EIeW_bDHYfHtesRtXU7Q,76
51
+ lyrics_transcriber/frontend/vite.config.js,sha256=rJsgKgeHdZ3lUbab4NaNcxVsiUmmtTQee4iPweN5Ktc,165
52
+ lyrics_transcriber/frontend/vite.config.ts,sha256=TTbbNSKnst0Q4JNuEAQ3PH7mXxD3zXkgzXZBBFnBWkU,161
22
53
  lyrics_transcriber/lyrics/base_lyrics_provider.py,sha256=l61XJCvazt7wb6_vIQ23N8x9Otane8Pac5nvnBVCig8,6563
23
54
  lyrics_transcriber/lyrics/genius.py,sha256=x8dNOygrDRZgwK0v2qK6F6wmqGEIiXe_Edgx-IkNWHA,5003
24
55
  lyrics_transcriber/lyrics/spotify.py,sha256=9n4n98xS_BrpTPZg-24n0mzyPk9vkdmhy6T8ei8imh4,3599
@@ -72,15 +103,15 @@ lyrics_transcriber/output/segment_resizer.py,sha256=b553FCdcjYAl9T1IA5K6ya0pcn1-
72
103
  lyrics_transcriber/output/subtitles.py,sha256=BQy7N_2zdBBWEiHL0NWFz3ZgAerWqQvTLALgxxK3Etk,16920
73
104
  lyrics_transcriber/output/video.py,sha256=kYGeEMYtoJvrGnMuyNpuSmu2DTskGDXBNlrv6ddvC8I,8485
74
105
  lyrics_transcriber/review/__init__.py,sha256=_3Eqw-uXZhOZwo6_sHZLhP9vxAVkLF9EBXduUvPdLjQ,57
75
- lyrics_transcriber/review/server.py,sha256=xUW55PhAeCKldXFm6F2X7waYid5vI_BsiPSoF4KnO0g,4744
106
+ lyrics_transcriber/review/server.py,sha256=oGP5NvuvAyZyaYYKST4yLWmGMu_l-ry65DXjgTKAhDg,4588
76
107
  lyrics_transcriber/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
108
  lyrics_transcriber/storage/dropbox.py,sha256=Dyam1ULTkoxD1X5trkZ5dGp5XhBGCn998moC8IS9-68,9804
78
109
  lyrics_transcriber/transcribers/audioshake.py,sha256=QzKGimVa6BovlvYFj35CbGpaGePI_DApAJGEBR_JQLc,8709
79
110
  lyrics_transcriber/transcribers/base_transcriber.py,sha256=yPzUWPTCGmzE97H5Rz6g61e-qEGL77ZzUoiBOmswhts,5973
80
111
  lyrics_transcriber/transcribers/whisper.py,sha256=P0kas2_oX16MO1-Qy7U5gl5KQN-RuUIJZz7LsEFLUiE,12906
81
112
  lyrics_transcriber/types.py,sha256=xGf3hkTRcGZTTAjMVIev2i2DOU6co0QGpW8NxvaBQAA,16759
82
- lyrics_transcriber-0.34.0.dist-info/LICENSE,sha256=BiPihPDxhxIPEx6yAxVfAljD5Bhm_XG2teCbPEj_m0Y,1069
83
- lyrics_transcriber-0.34.0.dist-info/METADATA,sha256=-NmP0C2ecou2bru2kFgDVCchjN10D-QdZsigcETfCFM,5856
84
- lyrics_transcriber-0.34.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
85
- lyrics_transcriber-0.34.0.dist-info/entry_points.txt,sha256=ChnmR13YoalGnC3sHW0TppX5FbhEXntYIha24tVQJ1M,104
86
- lyrics_transcriber-0.34.0.dist-info/RECORD,,
113
+ lyrics_transcriber-0.34.2.dist-info/LICENSE,sha256=BiPihPDxhxIPEx6yAxVfAljD5Bhm_XG2teCbPEj_m0Y,1069
114
+ lyrics_transcriber-0.34.2.dist-info/METADATA,sha256=0NSOrwR1JM9-gSURz9VRbcEO5ktuCaMZylGQ8ojWrrw,5856
115
+ lyrics_transcriber-0.34.2.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
116
+ lyrics_transcriber-0.34.2.dist-info/entry_points.txt,sha256=ChnmR13YoalGnC3sHW0TppX5FbhEXntYIha24tVQJ1M,104
117
+ lyrics_transcriber-0.34.2.dist-info/RECORD,,