0

I'm trying to combine all the .wav files in a folder to singe large .wav please help

import subprocess
import fnmatch
import os

matches = []
for root, dirnames, filenames in 
os.walk('/Users/user/Downloads/audio_files'):
    for filename in fnmatch.filter(filenames, '*.WAV'):
        matches.append(root.replace('/Volumes/UNTITLED/',''))

folders = set(matches)
print(folders)
sudarsan vs
  • 113
  • 1
  • 8
  • Does this answer your question? [How to join two wav files using python?](https://stackoverflow.com/questions/2890703/how-to-join-two-wav-files-using-python) – Anil Sep 22 '22 at 13:56

1 Answers1

0

You should use wave library from Python. Refer to the link

Also there are few existing question

  • You can add as many files as you want. Refer to this answer [link](https://stackoverflow.com/a/2900266/8477049). While writing frames to output file, you can use for loop instead. Hope it helps! –  Sep 30 '19 at 10:54