Skip to content

ryan0507/VoiceConversion

Repository files navigation

VoiceConversion

2021-2 YBIGTA Conference

#Preprocess Dataset

  1. Install ffmpeg with apt and pip install youtube-dl
  2. Set Playlist and get the URL of the youtube playlist
  3. Get wav file below youtube-dl commands
youtube-dl --extract-audio --audio-format wav -i PLCVawrYUsJRvAIs5IxhbbksZtXFE0snnh 

--audio-format : Automatically executre ffmpeg
-i : Identify playlist ID which placed after URL playlist=PLCVawrYUsJRvAIs5IxhbbksZtXFE0snnh

  1. Use spleeter to seperate vocals and MR files (Can Skip)

You can find Separator class with spleeter.separator

from spleeter.separator import Separator

# Using embedded configuration.
separator = Separator('spleeter:2stems')

# Using custom configuration file.
separator = Separator('/path/to/config.json')

You can find AudioAdapter to sperate files spleeter.audio.adapter

# Use audio loader explicitly for loading audio waveform :
from spleeter.audio.adapter import AudioAdapter

audio_loader = AudioAdapter.default()
sample_rate = 44100
waveform, _ = audio_loader.load('/path/to/audio/file', sample_rate=sample_rate)

# Perform the separation :
prediction = separator.separate(waveform)

https://github.com/deezer/spleeter/wiki/4.-API-Reference#separator

For convenience already prepared at data_preprocessing.py

  1. Change PATH if you need to change data_preprocessing.py
if __name__ == '__main__':

    # Configuration of dataset path
    # CHANGE IF YOU NEED
    base_path = '/home/ryan0507/VoiceConversion/data/'
    dataset_dir = '/home/ryan0507/VoiceConversion/data'
  1. After Run data_preprocessing.py you can get vocal and MR files for the playlist

About

2021-2 YBIGTA Conference

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages