Generation

generate functionThu, 26 Jan 2023

run SOX to files from a folder named "char", and save processed files to a folder named "out"

def process_audio(input_folder, output_folder) Dir["#{input_folder}/*.wav"].each do |file| sox = "sox #{file} #{output_folder}/#{file}" system(sox) end end process_audio("char", "out")

Questions about programming?Chat with your personal AI assistant