Giter Site home page Giter Site logo

audio_style_transfer_pytorch's Introduction

audio_style_transfer_pytorch

Implementation of Dmitry Ulyanov's neural-style-audio-tf (Audio style transfer) with Pytorch.
Codes are heavily inspired by:
Dmitry's code: https://github.com/DmitryUlyanov/neural-style-audio-tf
Pytorch implementation of image transfer: https://pytorch.org/tutorials/advanced/neural_style_tutorial.html

Requirements

  • Python=3.8
  • pytorch==1.8.1
  • For others, see requirements.txt.

Environments

For Linux envnironment, use conde below (You can use codes in pytorch.org for installation on your own os.
conda create -n {name of environment} python=3.8
pip install -r requirements.txt
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

Training

You have two options:

  1. If you want to just try one-by-one, just open jupyter notebook file ("Python3 Audio Style Transfer Run.ipynb") and follow the procedure.
  2. If you have multiple contents and styles, set working directorys for content files and style files in configs.py and run the code below:
python run_functions.py -p {which phase of spectrogram you are going to use} -s {tag when saving synthesized audio files}

Notes

There are some differences between Dmitry's code and mine that:

  1. Instead of using tensorflow v1.0 like Dmitry, I've used latest pytorch (v1.8.1) for implementation.
  2. I used Prem Seetharaman's STFT class constructed with pytorch. Thus, when synthesizing the sound, one can choose either pase of content or style for synthesis.
  3. I've customized codes so that one can generate combinations of multiple content sounds and multiple style sounds.

June 2021, Dabin Moon

audio_style_transfer_pytorch's People

Contributors

dabsdamoon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.