[PYTHON] I tried to synthesize WAV files using Pydub.

I found a library called Pydub (http://pydub.com/) that can easily manipulate music data, so I synthesized WAV files and played with them.

Install with pip install pydub with ffmpeg or avconv.

The source code looks like this

#!/usr/bin/env python2.7
#-*- coding: utf-8 -*-

from pydub import AudioSegment

sound1 = AudioSegment.from_wav("path to wav file 1")
sound2 = AudioSegment.from_wav("path to wav file 2")
sound3 = AudioSegment.from_wav("path to wav file 3")

combined_sounds = sound1 + sound2 + sound3
combined_sounds.export("path to save path/combined_sounds.wav", format="wav")

Recommended Posts

I tried to synthesize WAV files using Pydub.
I tried using "Syncthing" to synchronize files on multiple PCs
I tried using Azure Speech to Text.
I tried to classify text using TensorFlow
I tried to predict Covid-19 using Darts
I tried using parameterized
I tried using argparse
I tried using mimesis
Using Keras's stateful RNN, I tried automatic composition based on wav files.
I tried using anytree
I tried using aiomysql
I tried using Summpy
I want to visualize csv files using Vega-Lite!
I tried using coturn
I tried using Pipenv
I tried using matplotlib
I tried using "Anvil".
I tried using Hubot
I tried using ESPCN
I tried using openpyxl
I tried using Ipython
I tried to debug.
I tried using PyCaret
I tried using cron
I tried using ngrok
I tried using face_recognition
I tried to paste
I tried using Jupyter
I tried using PyCaret
I tried using Heapq
I tried using doctest
I tried using folium
I tried using jinja2
I tried using folium
I tried using time-window
I tried to make a ○ ✕ game using TensorFlow
I tried to get an AMI using AWS Lambda
I tried to approximate the sin function using chainer
I tried to become an Ann Man using OpenCV
I tried to identify the language using CNN + Melspectogram
I tried to access Google Spread Sheets using Python
I tried to complement the knowledge graph using OpenKE
I tried to draw a configuration diagram using Diagrams
I tried to compress the image using machine learning
I tried to learn PredNet
[I tried using Pythonista 3] Introduction
I tried using easydict (memo).
I tried to organize SVM.
I tried face recognition using Face ++
I tried using Random Forest
I tried using BigQuery ML
I tried to implement PCANet
I tried using Amazon Glacier
I tried using git inspector
I tried to reintroduce Linux
[Python] I tried using OpenPose
I tried to introduce Pylint
I tried to summarize SparseMatrix
I tried using magenta / TensorFlow
I tried to touch jupyter
I tried to implement StarGAN (1)