Spaces:
Runtime error
Runtime error
Added python adapter for masteringModule
#29
by isururana - opened
- mastering.py +19 -0
mastering.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import subprocess
|
| 2 |
+
#input path of audio file
|
| 3 |
+
#inPath = "audioTracks/CinematicBoom.mp3"
|
| 4 |
+
|
| 5 |
+
#desired path of output
|
| 6 |
+
#outPath = "masteredAudio/CinematicBoomMastered.mp3"
|
| 7 |
+
|
| 8 |
+
# try:
|
| 9 |
+
# output = subprocess.check_output(["node", "masteringModule/main.js", "--input", inputPath, "--output", outputPath])
|
| 10 |
+
# print(output.decode())
|
| 11 |
+
# except subprocess.CalledProcessError as e:
|
| 12 |
+
# print("Error running JavaScript file:", e)
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def masterAudio(inputPath,outputPath):
|
| 16 |
+
master = subprocess.run(["node", "masteringModule/main.js", "--input", inputPath, "--output", outputPath])
|
| 17 |
+
|
| 18 |
+
# testing
|
| 19 |
+
# masterAudio(inputPath,outputPath)
|