Banuka commited on
Commit
dc2ff81
Β·
verified Β·
1 Parent(s): 36396fa
Files changed (1) hide show
  1. mixing.py +4 -3
mixing.py CHANGED
@@ -2,13 +2,14 @@ import os
2
  from pydub import AudioSegment
3
 
4
  # Using raw strings to avoid issues with backslashes
5
- sound1 = AudioSegment.from_wav(r"audio\mixkit-distant-explosion-1690.wav")
6
- sound2 = AudioSegment.from_wav(r"audio\videoplayback_mastered (1).wav")
7
 
8
  # mix sound2 with sound1, starting at 1000ms into sound1)
9
  output = sound1.overlay(sound2, position=1000)
10
 
11
 
12
  # save the result
13
- output.export(r"mixedAudio\mixed_haptic_audioFile.wav", format="wav")
 
14
 
 
2
  from pydub import AudioSegment
3
 
4
  # Using raw strings to avoid issues with backslashes
5
+ sound1 = AudioSegment.from_mp3(r"audio\540553_badoink_bass-sine-pulse (mp3cut.net).mp3")
6
+ sound2 = AudioSegment.from_mp3(r"audio\y2mate.is - Cinematic Boom Sound Effect-_ttHanoHTL4-192k-1710149220_mastered.mp3")
7
 
8
  # mix sound2 with sound1, starting at 1000ms into sound1)
9
  output = sound1.overlay(sound2, position=1000)
10
 
11
 
12
  # save the result
13
+ output.export(r"mixedAudio\mixed_haptic_audioFile.wav", format="mp3")
14
+
15