Spaces:
Runtime error
Runtime error
Update mixing.py
Browse files
mixing.py
CHANGED
|
@@ -20,6 +20,7 @@ def mixingAudio(sound1_path, sound2_path,position):
|
|
| 20 |
sound1_path = check_and_convert(sound1_path)
|
| 21 |
sound2_path = check_and_convert(sound2_path)
|
| 22 |
|
|
|
|
| 23 |
sound1 = AudioSegment.from_file(sound1_path)
|
| 24 |
sound2 = AudioSegment.from_file(sound2_path)
|
| 25 |
|
|
@@ -28,10 +29,4 @@ def mixingAudio(sound1_path, sound2_path,position):
|
|
| 28 |
|
| 29 |
# Save the result (assuming mp3 format)
|
| 30 |
output.export(r"mixedAudio\mixed_haptic_audioFile.mp3", format="mp3")
|
| 31 |
-
return "The audio
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
# for testing
|
| 35 |
-
# sound1_path = r"audio\mixkit-distant-explosion-1690.wav"
|
| 36 |
-
# sound2_path = r"audio\videoplayback_mastered (1).wav"
|
| 37 |
-
# mixingAudio(sound1_path, sound2_path,1000)
|
|
|
|
| 20 |
sound1_path = check_and_convert(sound1_path)
|
| 21 |
sound2_path = check_and_convert(sound2_path)
|
| 22 |
|
| 23 |
+
# Load audio files
|
| 24 |
sound1 = AudioSegment.from_file(sound1_path)
|
| 25 |
sound2 = AudioSegment.from_file(sound2_path)
|
| 26 |
|
|
|
|
| 29 |
|
| 30 |
# Save the result (assuming mp3 format)
|
| 31 |
output.export(r"mixedAudio\mixed_haptic_audioFile.mp3", format="mp3")
|
| 32 |
+
return "The audio has been mixed."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|